buildsupport_utils.ads 3.2 KB
Newer Older
Maxime Perrotin's avatar
Maxime Perrotin committed
1
--  *************************** buildsupport ****************************  --
Maxime Perrotin's avatar
Maxime Perrotin committed
2
--  (c) 2017 European Space Agency - maxime.perrotin@esa.int
Maxime Perrotin's avatar
Maxime Perrotin committed
3
4
5
--  LGPL license, see LICENSE file

--  Set of helper functions for buildsupport
Maxime Perrotin's avatar
Maxime Perrotin committed
6
with Ocarina,
Thanassis Tsiodras's avatar
Thanassis Tsiodras committed
7
     Ocarina.Types,
8
9
     Ada.Containers.Indefinite_Ordered_Maps,
     Ada.Containers.Vectors;
Maxime Perrotin's avatar
Maxime Perrotin committed
10

Maxime Perrotin's avatar
Maxime Perrotin committed
11
12
use Ocarina,
    Ada.Containers;
Maxime Perrotin's avatar
Maxime Perrotin committed
13
14
15

package Buildsupport_Utils is

Thanassis Tsiodras's avatar
Thanassis Tsiodras committed
16
   use Ocarina.Types;
Maxime Perrotin's avatar
Maxime Perrotin committed
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62

   procedure Banner;

   procedure Usage;

   procedure Exit_On_Error (Error : Boolean; Reason : String);

   type Synchronism is (Sync, Async);

   procedure Init;

   type Supported_RCM_Operation_Kind is (Unprotected_Operation,
                                         Protected_Operation,
                                         Variator_Operation,
                                         Modifier_Operation,
                                         Cyclic_Operation,
                                         Sporadic_Operation,
                                         Unknown_Operation);

   function Get_RCM_Operation_Kind
     (E : Node_Id)
     return Supported_RCM_Operation_Kind;

   function Get_RCM_Operation (E : Node_Id) return Node_Id;

   function Get_RCM_Period (D : Node_Id) return Unsigned_Long_Long;

   function Get_APLC_Binding (E : Node_Id) return List_Id;

   type Supported_ASN1_Encoding is (Default, Native, UPER, ACN);

   function Get_ASN1_Encoding (E : Node_Id) return Supported_ASN1_Encoding;

   type Supported_ASN1_Basic_Type is (ASN1_Sequence,
                                      ASN1_SequenceOf,
                                      ASN1_Enumerated,
                                      ASN1_Set,
                                      ASN1_SetOf,
                                      ASN1_Integer,
                                      ASN1_Boolean,
                                      ASN1_Real,
                                      ASN1_OctetString,
                                      ASN1_Choice,
                                      ASN1_String,
                                      ASN1_Unknown);

63
64
65
   package Property_Maps is new Indefinite_Ordered_Maps (String, String);
   package String_Vectors is new Vectors (Natural, String);

Maxime Perrotin's avatar
Maxime Perrotin committed
66
67
68
69
70
71
72
73
74
75
   function Get_ASN1_Basic_Type (E : Node_Id) return Supported_ASN1_Basic_Type;

   function Get_Ada_Package_Name (D : Node_Id) return Name_Id;

   function Get_Ellidiss_Tool_Version (D : Node_Id) return Name_Id;

   function Get_Interface_Name (D : Node_Id) return Name_Id;

   function Get_ASN1_Module_Name (D : Node_Id) return String;

Maxime Perrotin's avatar
Maxime Perrotin committed
76
77
   function Get_Properties_Map (D : Node_Id) return Property_Maps.Map;

78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
   type Taste_Interface is
       record
           null;
       end record;

   subtype Taste_Provided_Interface is Taste_Interface;
   subtype Taste_Required_Interface is Taste_Interface;

   package Interfaces is new Vectors (Natural, Taste_Interface);

   type Taste_Function is
       record
           Name_Full_Case : String;
           Language       : Supported_Source_Language;
           Zip_File       : String;
           Context_Params : Property_Maps.Map;
           Timers         : String_Vectors.Vector;
           Provided       : Interfaces.Vector;
           Required       : Interfaces.Vector;
       end record;

Maxime Perrotin's avatar
Maxime Perrotin committed
99
end Buildsupport_Utils;