1 -- This is a compilable Ada 95 specification
for the APEX interface,
2 -- derived from section 3 of ARINC 653.
3 -- The declarations of the services given below are taken from the
4 -- standard, as are the enumerated types and the names of the others types.
5 -- However, the definitions given
for these others types, and the
6 -- names and values given below
for constants, are all implementation
8 -- All types have defining representation pragmas or clauses to ensure
9 -- representation compatibility with the C and Ada 83 bindings.
10 -- ---------------------------------------------------------------------------
12 -- Root
package providing constant and type definitions --
14 -- ---------------------------------------------------------------------------
16 -- This is the Ada 95 predefined C
interface package
20 -- ----------------------------
22 -- ----------------------------
24 -- These values define the domain limits and are implementation-dependent.
25 System_Limit_Number_Of_Partitions : constant := 32;
27 System_Limit_Number_Of_Messages : constant := 512;
29 System_Limit_Message_Size : constant := 16#10_0000#;
31 System_Limit_Number_Of_Processes : constant := 1024;
33 System_Limit_Number_Of_Sampling_Ports : constant := 1024;
35 System_Limit_Number_Of_Queuing_Ports : constant := 1024;
37 System_Limit_Number_Of_Buffers : constant := 512;
39 System_Limit_Number_Of_Blackboards : constant := 512;
41 System_Limit_Number_Of_Semaphores : constant := 512;
43 System_Limit_Number_Of_Events : constant := 512;
45 -- ----------------------------
47 -- ----------------------------
48 -- The actual sizes of these base types are system-specific and must
49 -- match those of the underlying Operating System.
50 type APEX_Byte is
new Interfaces.C.unsigned_char;
51 type APEX_Integer is
new Interfaces.C.long;
52 type APEX_Unsigned is
new Interfaces.C.unsigned_long;
53 type APEX_Long_Integer is
new Interfaces.Integer_64;
54 -- If Integer_64 is not provided in
package Interfaces, any implementation-
55 -- defined alternative 64-bit signed integer type may be used.
56 -- ----------------------------
57 -- General APEX types --
58 -- ----------------------------
59 type Return_Code_Type is (
60 No_Error, -- request valid and operation performed
61 No_Action, -- status of system unaffected by request
62 Not_Available, -- resource required by request unavailable
63 Invalid_Param, -- invalid parameter specified in request
64 Invalid_Config, -- parameter incompatible with configuration
65 Invalid_Mode, -- request incompatible with current mode
66 Timed_Out); -- time-out tied up with request has expired
67 pragma Convention (C, Return_Code_Type);
68 Max_Name_Length : constant := 30;
69 subtype Name_Type is String (1 .. Max_Name_Length);
70 subtype System_Address_Type is System.Address;
71 subtype Message_Addr_Type is System.Address;
72 subtype Message_Size_Type is APEX_Integer range
73 1 .. System_Limit_Message_Size;
74 subtype Message_Range_Type is APEX_Integer range
75 0 .. System_Limit_Number_Of_Messages;
76 type Port_Direction_Type is (Source, Destination);
77 pragma Convention (C, Port_Direction_Type);
78 type Queuing_Discipline_Type is (Fifo, Priority);
79 pragma Convention (C, Queuing_Discipline_Type);
80 subtype System_Time_Type is APEX_Long_Integer;
81 -- 64-bit
signed integer with 1 nanosecond LSB
82 Infinite_Time_Value : constant System_Time_Type;
83 Aperiodic : constant System_Time_Type;
84 Zero_Time_Value : constant System_Time_Type;
86 Infinite_Time_Value : constant System_Time_Type := -1;
87 Aperiodic : constant System_Time_Type := 0;
88 Zero_Time_Value : constant System_Time_Type := 0;