POK
/home/jaouen/pok_official/pok/trunk/libpok/ada/arinc653/apex-queuing_ports.ads
00001 -- ---------------------------------------------------------------------------
00002 -- --
00003 -- QUEUING PORT constant and type definitions and management services --
00004 -- --
00005 -- ---------------------------------------------------------------------------
00006 with APEX.Processes;
00007 package APEX.Queuing_Ports is
00008    Max_Number_Of_Queuing_Ports : constant :=
00009       System_Limit_Number_Of_Queuing_Ports;
00010    subtype Queuing_Port_Name_Type is Name_Type;
00011    type Queuing_Port_Id_Type is private;
00012    Null_Queuing_Port_Id : constant Queuing_Port_Id_Type;
00013    type Queuing_Port_Status_Type is record
00014        Nb_Message         : Message_Range_Type;
00015        Max_Nb_Message     : Message_Range_Type;
00016        Max_Message_Size : Message_Size_Type;
00017        Port_Direction     : Port_Direction_Type;
00018        Waiting_Processes : APEX.Processes.Waiting_Range_Type;
00019    end record;
00020    procedure Create_Queuing_Port
00021       (Queuing_Port_Name : in Queuing_Port_Name_Type;
00022        Max_Message_Size    : in Message_Size_Type;
00023        Max_Nb_Message      : in Message_Range_Type;
00024        Port_Direction      : in Port_Direction_Type;
00025        Queuing_Discipline : in Queuing_Discipline_Type;
00026        Queuing_Port_Id     : out Queuing_Port_Id_Type;
00027        Return_Code         : out Return_Code_Type);
00028    procedure Send_Queuing_Message
00029       (Queuing_Port_Id : in Queuing_Port_Id_Type;
00030        Message_Addr     : in Message_Addr_Type;
00031        Length           : in Message_Size_Type;
00032        Time_Out         : in System_Time_Type;
00033        Return_Code      : out Return_Code_Type);
00034    procedure Receive_Queuing_Message
00035       (Queuing_Port_Id : in Queuing_Port_Id_Type;
00036        Time_Out         : in System_Time_Type;
00037        Message_Addr     : in Message_Addr_Type;
00038    -- The message address is passed IN, although the respective message is
00039    -- passed OUT
00040        Length           : out Message_Size_Type;
00041        Return_Code      : out Return_Code_Type);
00042    procedure Get_Queuing_Port_Id
00043       (Queuing_Port_Name : in Queuing_Port_Name_Type;
00044        Queuing_Port_Id    : out Queuing_Port_Id_Type;
00045        Return_Code        : out Return_Code_Type);
00046    procedure Get_Queuing_Port_Status
00047       (Queuing_Port_Id      : in Queuing_Port_Id_Type;
00048        Queuing_Port_Status : out Queuing_Port_Status_Type;
00049        Return_Code          : out Return_Code_Type);
00050 private
00051    type Queuing_Port_Id_Type is new APEX_Integer;
00052    Null_Queuing_Port_Id : constant Queuing_Port_Id_Type := 0;
00053    pragma Convention (C, Queuing_Port_Status_Type);
00054 
00055    -- POK BINDINGS
00056    pragma Import (C, Create_Queuing_Port, "CREATE_QUEUING_PORT");
00057    pragma Import (C, Send_Queuing_Message, "SEND_QUEUING_PORT_MESSAGE");
00058    pragma Import (C, Receive_Queuing_Message, "RECEIVE_QUEUING_MESSAGE");
00059    pragma Import (C, Get_Queuing_Port_Id, "GET_QUEUING_PORT_ID");
00060    pragma Import (C, Get_Queuing_Port_Status, "GET_QUEUING_PORT_STATUS");
00061    -- END OF POK BINDINGS
00062 end APEX.Queuing_Ports;