POK
apex-health_monitoring.ads
1 -- ---------------------------------------------------------------------------
2 -- --
3 -- ERROR constant and type definitions and management services --
4 -- --
5 -- ---------------------------------------------------------------------------
6 with APEX.Processes;
7 package APEX.Health_Monitoring is
8  Max_Error_Message_Size : constant := 64;
9  subtype Error_Message_Size_Type is APEX_Integer range
10  1 .. Max_Error_Message_Size;
11  type Error_Message_Type is
12  array (Error_Message_Size_Type) of APEX_Byte;
13  type Error_Code_Type is (
14  Deadline_Missed,
15  Application_Error,
16  Numeric_Error,
17  Illegal_Request,
18  Stack_Overflow,
19  Memory_Violation,
20  Hardware_Fault,
21  Power_Fail);
22  type Error_Status_Type is record
23  Error_Code : Error_Code_Type;
24  Length : Error_Message_Size_Type;
25  Failed_Process_Id : APEX.Processes.Process_Id_Type;
26  Failed_Address : System_Address_Type;
27  Message : Error_Message_Type;
28  end record;
29  procedure Report_Application_Message
30  (Message_Addr : in Message_Addr_Type;
31  Length : in Message_Size_Type;
32  Return_Code : out Return_Code_Type);
33  procedure Create_Error_Handler
34  (Entry_Point : in System_Address_Type;
35  Stack_Size : in APEX.Processes.Stack_Size_Type;
36  Return_Code : out Return_Code_Type);
37  procedure Get_Error_Status
38  (Error_Status : out Error_Status_Type;
39  Return_Code : out Return_Code_Type);
40  procedure Raise_Application_Error
41  (Error_Code : in Error_Code_Type;
42  Message_Addr : in Message_Addr_Type;
43  Length : in Error_Message_Size_Type;
44  Return_Code : out Return_Code_Type);
45 private
46  pragma Convention (C, Error_Code_Type);
47  pragma Convention (C, Error_Status_Type);
48 end APEX.Health_Monitoring;