POK
/home/jaouen/pok_official/pok/trunk/libpok/include/arinc653/partition.h
00001 /*
00002  *                               POK header
00003  * 
00004  * The following file is a part of the POK project. Any modification should
00005  * made according to the POK licence. You CANNOT use this file or a part of
00006  * this file is this part of a file for your own project
00007  *
00008  * For more information on the POK licence, please see our LICENCE FILE
00009  *
00010  * Please follow the coding guidelines described in doc/CODING_GUIDELINES
00011  *
00012  *                                      Copyright (c) 2007-2009 POK team 
00013  *
00014  * Created by julien on Thu Jan 15 23:34:13 2009 
00015  */
00016 
00017 
00018 #ifdef POK_NEEDS_ARINC653_PARTITION
00019 
00020 #include <arinc653/types.h>
00021 #include <arinc653/process.h>
00022 
00023 #ifndef APEX_PARTITION
00024 #define APEX_PARTITION
00025 #define   MAX_NUMBER_OF_PARTITIONS   SYSTEM_LIMIT_NUMBER_OF_PARTITIONS
00026 typedef enum
00027 {
00028    IDLE       = 0,
00029    COLD_START = 1,
00030    WARM_START = 2,
00031    NORMAL     = 3
00032 } OPERATING_MODE_TYPE;
00033 
00034 typedef   APEX_INTEGER     PARTITION_ID_TYPE;
00035 typedef enum
00036 {
00037    NORMAL_START          = 0,
00038    PARTITION_RESTART     = 1,
00039    HM_MODULE_RESTART     = 2,
00040    HM_PARTITION_RESTART  = 3
00041 } START_CONDITION_TYPE;
00042 
00043 typedef struct {
00044    SYSTEM_TIME_TYPE      PERIOD;
00045    SYSTEM_TIME_TYPE      DURATION;
00046    PARTITION_ID_TYPE     IDENTIFIER;
00047    LOCK_LEVEL_TYPE       LOCK_LEVEL;
00048    OPERATING_MODE_TYPE OPERATING_MODE;
00049    START_CONDITION_TYPE START_CONDITION;
00050 } PARTITION_STATUS_TYPE;
00051 
00052 extern void GET_PARTITION_STATUS (
00053       /*out*/ PARTITION_STATUS_TYPE     *PARTITION_STATUS,
00054       /*out*/ RETURN_CODE_TYPE          *RETURN_CODE );
00055 extern void SET_PARTITION_MODE (
00056       /*in */ OPERATING_MODE_TYPE       OPERATING_MODE,
00057       /*out*/ RETURN_CODE_TYPE          *RETURN_CODE );
00058 #endif
00059 
00060 #endif