18 #ifdef POK_NEEDS_ARINC653_PARTITION
20 #include <arinc653/types.h>
21 #include <arinc653/partition.h>
23 #include <core/partition.h>
28 RETURN_CODE_TYPE *return_code)
30 pok_current_partition_get_id(&partition_status->IDENTIFIER);
31 pok_current_partition_get_period(&partition_status->PERIOD);
32 pok_current_partition_get_duration(&partition_status->DURATION);
33 pok_current_partition_get_lock_level(&partition_status->LOCK_LEVEL);
34 pok_current_partition_get_operating_mode(&partition_status->OPERATING_MODE);
35 pok_current_partition_get_start_condition(&partition_status->START_CONDITION);
36 *return_code = NO_ERROR;
39 void SET_PARTITION_MODE (OPERATING_MODE_TYPE operating_mode,
40 RETURN_CODE_TYPE *return_code)
42 pok_partition_mode_t core_mode;
44 pok_partition_mode_t current_mode;
46 pok_current_partition_get_operating_mode(¤t_mode);
47 switch (operating_mode)
50 core_mode = POK_PARTITION_MODE_IDLE;
54 core_mode = POK_PARTITION_MODE_NORMAL;
58 core_mode = POK_PARTITION_MODE_INIT_COLD;
59 *return_code = NOT_AVAILABLE;
63 core_mode = POK_PARTITION_MODE_INIT_WARM;
67 *return_code = INVALID_PARAM;
71 if (current_mode == core_mode)
73 *return_code = NO_ACTION;
76 if (current_mode == POK_PARTITION_MODE_INIT_COLD &&
77 core_mode == POK_PARTITION_MODE_INIT_WARM)
79 *return_code = INVALID_MODE;
82 core_ret = pok_partition_set_mode (core_mode);
83 *return_code = core_ret;