POK
/home/jaouen/pok_official/pok/trunk/libpok/ada/arinc653/apex-events.ads
00001 -- ---------------------------------------------------------------------------
00002 -- --
00003 -- EVENT constant and type definitions and management services --
00004 -- --
00005 -- ---------------------------------------------------------------------------
00006 with APEX.Processes;
00007 package APEX.Events is
00008    Max_Number_Of_Events : constant := System_Limit_Number_Of_Events;
00009    subtype Event_Name_Type is Name_Type;
00010    type Event_Id_Type is private;
00011    Null_Event_Id : constant Event_Id_Type;
00012    type Event_State_Type is (Down, Up);
00013    type Event_Status_Type is record
00014        Event_State       : Event_State_Type;
00015        Waiting_Processes : APEX.Processes.Waiting_Range_Type;
00016    end record;
00017    procedure Create_Event
00018       (Event_Name : in Event_Name_Type;
00019        Event_Id    : out Event_Id_Type;
00020        Return_Code : out Return_Code_Type);
00021    procedure Set_Event
00022       (Event_Id    : in Event_Id_Type;
00023        Return_Code : out Return_Code_Type);
00024    procedure Reset_Event
00025       (Event_Id    : in Event_Id_Type;
00026        Return_Code : out Return_Code_Type);
00027    procedure Wait_Event
00028       (Event_Id    : in Event_Id_Type;
00029        Time_Out    : in System_Time_Type;
00030        Return_Code : out Return_Code_Type);
00031    procedure Get_Event_Id
00032       (Event_Name : in Event_Name_Type;
00033        Event_Id    : out Event_Id_Type;
00034        Return_Code : out Return_Code_Type);
00035    procedure Get_Event_Status
00036       (Event_Id     : in Event_Id_Type;
00037        Event_Status : out Event_Status_Type;
00038        Return_Code : out Return_Code_Type);
00039 private
00040    type Event_Id_Type is new APEX_Integer;
00041    Null_Event_Id : constant Event_Id_Type := 0;
00042    pragma Convention (C, Event_State_Type);
00043    pragma Convention (C, Event_Status_Type);
00044 
00045    -- POK BINDINGS
00046    pragma Import (C, Create_Event, "CREATE_EVENT");
00047    pragma Import (C, Set_Event, "SET_EVENT");
00048    pragma Import (C, Reset_Event, "RESET_EVENT");
00049    pragma Import (C, Wait_Event, "WAIT_EVENT");
00050    pragma Import (C, Get_Event_Id, "GET_EVENT_ID");
00051    pragma Import (C, Get_Event_Status, "GET_EVENT_STATUS");
00052     -- END OF POK BINDINGS
00053 end APEX.Events;