POK
/home/jaouen/pok_official/pok/trunk/libpok/ada/arinc653/apex-sampling_ports.ads
00001 -- ---------------------------------------------------------------------------
00002 -- --
00003 -- SAMPLING PORT constant and type definitions and management services --
00004 -- --
00005 -- ---------------------------------------------------------------------------
00006 package APEX.Sampling_Ports is
00007    Max_Number_Of_Sampling_Ports : constant :=
00008       System_Limit_Number_Of_Sampling_Ports;
00009    subtype Sampling_Port_Name_Type is Name_Type;
00010    type Sampling_Port_Id_Type is private;
00011    Null_Sampling_Port_Id : constant Sampling_Port_Id_Type;
00012    type Validity_Type is (Invalid, Valid);
00013    type Sampling_Port_Status_Type is record
00014        Refresh_Period    : System_Time_Type;
00015        Max_Message_Size : Message_Size_Type;
00016        Port_Direction    : Port_Direction_Type;
00017        Last_Msg_Validity : Validity_Type;
00018    end record;
00019    procedure Create_Sampling_Port
00020       (Sampling_Port_Name : in Sampling_Port_Name_Type;
00021        Max_Message_Size   : in Message_Size_Type;
00022        Port_Direction     : in Port_Direction_Type;
00023        Refresh_Period     : in System_Time_Type;
00024        Sampling_Port_Id   : out Sampling_Port_Id_Type;
00025        Return_Code        : out Return_Code_Type);
00026    procedure Write_Sampling_Message
00027       (Sampling_Port_Id : in Sampling_Port_Id_Type;
00028        Message_Addr     : in Message_Addr_Type;
00029        Length           : in Message_Size_Type;
00030        Return_Code      : out Return_Code_Type);
00031    procedure Read_Sampling_Message
00032       (Sampling_Port_Id : in Sampling_Port_Id_Type;
00033        Message_Addr     : in Message_Addr_Type;
00034    -- The message address is passed IN, although the respective message is
00035    -- passed OUT
00036        Length           : out Message_Size_Type;
00037        Validity         : out Validity_Type;
00038        Return_Code      : out Return_Code_Type);
00039    procedure Get_Sampling_Port_Id
00040       (Sampling_Port_Name : in Sampling_Port_Name_Type;
00041        Sampling_Port_Id   : out Sampling_Port_Id_Type;
00042        Return_Code        : out Return_Code_Type);
00043    procedure Get_Sampling_Port_Status
00044       (Sampling_Port_Id     : in Sampling_Port_Id_Type;
00045        Sampling_Port_Status : out Sampling_Port_Status_Type;
00046        Return_Code          : out Return_Code_Type);
00047 private
00048    type Sampling_Port_Id_Type is new APEX_Integer;
00049    Null_Sampling_Port_Id : constant Sampling_Port_Id_Type := 0;
00050    pragma Convention (C, Validity_Type);
00051    pragma Convention (C, Sampling_Port_Status_Type);
00052 
00053    -- POK BINDINGS
00054    pragma Import (C, Create_Sampling_Port, "CREATE_SAMPLING_PORT");
00055    pragma Import (C, Write_Sampling_Message, "WRITE_SAMPLING_MESSAGE");
00056    pragma Import (C, Read_Sampling_Message, "READ_SAMPLING_MESSAGE");
00057    pragma Import (C, Get_Sampling_Port_Id, "GET_SAMPLING_PORT_ID");
00058    pragma Import (C, Get_Sampling_Port_Status, "GET_SAMPLING_PORT_STATUS");
00059    -- END OF POK BINDINGS
00060 end APEX.Sampling_Ports;