POK
partition.h
1 /*
2  * POK header
3  *
4  * The following file is a part of the POK project. Any modification should
5  * made according to the POK licence. You CANNOT use this file or a part of
6  * this file is this part of a file for your own project
7  *
8  * For more information on the POK licence, please see our LICENCE FILE
9  *
10  * Please follow the coding guidelines described in doc/CODING_GUIDELINES
11  *
12  * Copyright (c) 2007-2009 POK team
13  *
14  * Created by julien on Thu Jan 15 23:34:13 2009
15  */
16 
17 
18 #ifdef POK_NEEDS_ARINC653_PARTITION
19 
20 #include <arinc653/types.h>
21 #include <arinc653/process.h>
22 
23 #ifndef APEX_PARTITION
24 #define APEX_PARTITION
25 #define MAX_NUMBER_OF_PARTITIONS SYSTEM_LIMIT_NUMBER_OF_PARTITIONS
26 typedef enum
27 {
28  IDLE = 0,
29  COLD_START = 1,
30  WARM_START = 2,
31  NORMAL = 3
32 } OPERATING_MODE_TYPE;
33 
34 typedef APEX_INTEGER PARTITION_ID_TYPE;
35 typedef enum
36 {
37  NORMAL_START = 0,
38  PARTITION_RESTART = 1,
39  HM_MODULE_RESTART = 2,
40  HM_PARTITION_RESTART = 3
41 } START_CONDITION_TYPE;
42 
43 typedef struct {
44  SYSTEM_TIME_TYPE PERIOD;
45  SYSTEM_TIME_TYPE DURATION;
46  PARTITION_ID_TYPE IDENTIFIER;
47  LOCK_LEVEL_TYPE LOCK_LEVEL;
48  OPERATING_MODE_TYPE OPERATING_MODE;
49  START_CONDITION_TYPE START_CONDITION;
51 
52 extern void GET_PARTITION_STATUS (
53  /*out*/ PARTITION_STATUS_TYPE *PARTITION_STATUS,
54  /*out*/ RETURN_CODE_TYPE *RETURN_CODE );
55 extern void SET_PARTITION_MODE (
56  /*in */ OPERATING_MODE_TYPE OPERATING_MODE,
57  /*out*/ RETURN_CODE_TYPE *RETURN_CODE );
58 #endif
59 
60 #endif