POK
/home/jaouen/pok_official/pok/trunk/libpok/ada/arinc653/apex-partitions.ads
00001 -- ---------------------------------------------------------------------------
00002 -- --
00003 -- PARTITION constant and type definitions and management services --
00004 -- --
00005 -- ---------------------------------------------------------------------------
00006 with APEX.Processes;
00007 package APEX.Partitions is
00008    Max_Number_Of_Partitions : constant := System_Limit_Number_Of_Partitions;
00009    type Operating_Mode_Type is (Idle, Cold_Start, Warm_Start, Normal);
00010    type Partition_Id_Type is private;
00011    Null_Partition_Id : constant Partition_Id_Type;
00012    type Start_Condition_Type is
00013       (Normal_Start,
00014        Partition_Restart,
00015        Hm_Module_Restart,
00016        Hm_Partition_Restart);
00017    type Partition_Status_Type is record
00018        Period          : System_Time_Type;
00019        Duration        : System_Time_Type;
00020        Identifier      : Partition_Id_Type;
00021        Lock_Level      : APEX.Processes.Lock_Level_Type;
00022        Operating_Mode : Operating_Mode_Type;
00023        Start_Condition : Start_Condition_Type;
00024    end record;
00025    procedure Get_Partition_Status
00026       (Partition_Status : out Partition_Status_Type;
00027        Return_Code      : out Return_Code_Type);
00028    procedure Set_Partition_Mode
00029       (Operating_Mode : in Operating_Mode_Type;
00030        Return_Code    : out Return_Code_Type);
00031 private
00032    type Partition_ID_Type is new APEX_Integer;
00033    Null_Partition_Id : constant Partition_Id_Type := 0;
00034    pragma Convention (C, Operating_Mode_Type);
00035    pragma Convention (C, Start_Condition_Type);
00036    pragma Convention (C, Partition_Status_Type);
00037 
00038    -- POK BINDINGS
00039    pragma Import (C, Get_Partition_Status, "GET_PARTITION_STATUS");
00040    pragma Import (C, Set_Partition_Mode, "SET_PARTITION_MODE");
00041    -- END OF POK BINDINGS
00042 end APEX.Partitions;