ocarina_lib_1.1.0_56e84ebe/src/generators/ocarina-generators-po_hi_ada-runtime.ads

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 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
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
------------------------------------------------------------------------------
--                                                                          --
--                           OCARINA COMPONENTS                             --
--                                                                          --
--                  OCARINA.GENERATORS.PO_HI_ADA.RUNTIME                    --
--                                                                          --
--                                 S p e c                                  --
--                                                                          --
--               Copyright (C) 2006-2007, GET-Telecom Paris.                --
--                                                                          --
-- Ocarina  is free software;  you  can  redistribute  it and/or  modify    --
-- it under terms of the GNU General Public License as published by the     --
-- Free Software Foundation; either version 2, or (at your option) any      --
-- later version. Ocarina is distributed  in  the  hope  that it will be    --
-- useful, but WITHOUT ANY WARRANTY;  without even the implied warranty of  --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General --
-- Public License for more details. You should have received  a copy of the --
-- GNU General Public License distributed with Ocarina; see file COPYING.   --
-- If not, write to the Free Software Foundation, 51 Franklin Street, Fifth --
-- Floor, Boston, MA 02111-1301, USA.                                       --
--                                                                          --
-- As a special exception,  if other files  instantiate  generics from this --
-- unit, or you link  this unit with other files  to produce an executable, --
-- this  unit  does not  by itself cause  the resulting  executable to be   --
-- covered  by the  GNU  General  Public  License. This exception does not  --
-- however invalidate  any other reasons why the executable file might be   --
-- covered by the GNU Public License.                                       --
--                                                                          --
--                 Ocarina is maintained by the Ocarina team                --
--                       (ocarina-users@listes.enst.fr)                     --
--                                                                          --
------------------------------------------------------------------------------

package Ocarina.Generators.PO_HI_Ada.Runtime is

   --  Runtime Units

   type RU_Id is
     (RU_Null,
      RU_Ada,
      RU_Ada_Exceptions,
      RU_Ada_Real_Time,
      RU_PolyORB_HI,
      RU_PolyORB_HI_Cyclic_Task,
      RU_PolyORB_HI_Sporadic_Task,
      RU_Deployment,
      RU_GNAT,
      RU_GNAT_Sockets,
      RU_Interfaces,
      RU_Interfaces_C,
      RU_PolyORB_HI_Marshallers_G,
      RU_Marshallers,
      RU_PolyORB_HI_Messages,
      RU_Naming,
      RU_PolyORB_HI_Output_Low_Level,
      RU_PolyORB_HI_Output,
      RU_PolyORB_HI_Protocols,
      RU_Standard,
      RU_Subprograms,
      RU_PolyORB_HI_Transport_Low_Level,
      RU_PolyORB_HI_Transport_Low_Level_Extras,
      RU_PolyORB_HI_Transport,
      RU_Types,
      RU_SOIF_MTS_Wrapper_Ada,
      RU_SOIF_MTS_Wrapper_Ada_Structures,
      RU_PolyORB_HI_Suspenders,
      RU_System_Time,
      RU_System);

   --  Runtime Entities

   type RE_Id is
     (RE_Null,                       --  Workaround to denote a null RE
      RE_Off,                        --  Off
      RE_On,                         --  On
      RE_SOIF_MTS_Naming_Entry,      --  SOIF_MTS_Naming_Entry
      RE_SOIF_MTS_Naming_Store,      --  SOIF_MTS_Naming_Store
      RE_Node_Type,                  --  Deployment.Node_Type
      RE_Entity_Type,                --  Deployment.Entity_Type
      RE_Clock,                      --  Ada.Real_Time.Clock
      RE_Nanoseconds,                --  Ada.Real_Time.Nanoseconds
      RE_Microseconds,               --  Ada.Real_Time.Microseconds
      RE_Milliseconds,               --  Ada.Real_Time.Milliseconds
      RE_Seconds,                    --  Ada.Real_Time.Seconds
      RE_Minutes,                    --  Ada.Real_Time.Minutes
      RE_Time,                       --  Ada.Real_Time.Time
      RE_Time_Span,                  --  Ada.Real_Time.Time_Span
      RE_Family_Inet,                --  GNAT.Sockets.Family_Inet
      RE_Inet_Addr,                  --  GNAT.Sockets.Inet_Addr
      RE_No_Inet_Addr,               --  GNAT.Sockets.No_Inet_Addr
      RE_No_Port,                    --  GNAT.Sockets.No_Port
      RE_Port_Type,                  --  GNAT.Sockets.Port_Type
      RE_Sock_Addr_Type,             --  GNAT.Sockets.Sock_Addr_Type
      RE_Char_Array,                 --  Interfaces.C.char_array
      RE_Nul,                        --  Interfaces.C.nul
      RE_Marshall_Request,           --  Marshallers.Marshall_Request
      RE_Unmarshall_Request,         --  Marshallers.Unmarshall_Request
      RE_Message_Type,               --  Messages.Message_Type,
      RE_Reallocate,                 --  Messages.Reallocate
      RE_Non_Blocking_Receive,       --  Protocols.Non_Blocking_Receive
      RE_Send,                       --  Protocols.Send
      RE_Initialize,                 --  Transport.Initialize
      RE_SOIF_MTS_ASSERT_V1_SPACEWIRE_PID, --  SOIF_MTS_Wrapper_Ada
      RE_SOIF_MTS_NON_GUARANTEED_DELIVERY, --  SOIF_MTS_Wrapper_Ada
      RE_SOIF_MTS_Naming_Entry_Type, --  SOIF_MTS_Wrapper_Ada.Structures
      --                                   .SOIF_MTS_Naming_Entry_Type
      RE_SOIF_MTS_Naming_Store_Type, --  SOIF_MTS_Wrapper_Ada.Structures
      --                                   .SOIF_MTS_Naming_Store_Type
      RE_Boolean,                    --  Standard.Boolean
      RE_Integer,                    --  Standard.Integer
      RE_Natural,                    --  Standard.Natural
      RE_Float,                      --  Standard.Float
      RE_String,                     --  Standard.String
      RE_Character,                  --  Standard.Character
      RE_Wide_Character,             --  Standard.Wide_Character
      RE_Suspend_Forever,            --  Suspenders.Suspend_Forever
      RE_Unblock_All_Tasks,          --  Suspenders.Unblock_All_Tasks
      RE_Default_Priority,           --  System.Default_Priority
      RE_Priority);                  --  System.Priority

   RE_Unit_Table : constant array (RE_Id) of RU_Id
     := (RE_Null                       => RU_Null,
         RE_Off                        => RU_Null,
         RE_On                         => RU_Null,
         RE_SOIF_MTS_Naming_Entry      => RU_Null,
         RE_SOIF_MTS_Naming_Store      => RU_Null,
         RE_Node_Type                  => RU_Deployment,
         RE_Entity_Type                => RU_Deployment,
         RE_Clock                      => RU_Ada_Real_Time,
         RE_Nanoseconds                => RU_Ada_Real_Time,
         RE_Microseconds               => RU_Ada_Real_Time,
         RE_Milliseconds               => RU_Ada_Real_Time,
         RE_Seconds                    => RU_Ada_Real_Time,
         RE_Minutes                    => RU_Ada_Real_Time,
         RE_Time                       => RU_Ada_Real_Time,
         RE_Time_Span                  => RU_Ada_Real_Time,
         RE_Family_Inet                => RU_GNAT_Sockets,
         RE_Inet_Addr                  => RU_GNAT_Sockets,
         RE_No_Inet_Addr               => RU_GNAT_Sockets,
         RE_No_Port                    => RU_GNAT_Sockets,
         RE_Port_Type                  => RU_GNAT_Sockets,
         RE_Sock_Addr_Type             => RU_GNAT_Sockets,
         RE_Char_Array                 => RU_Interfaces_C,
         RE_Nul                        => RU_Interfaces_C,
         RE_Marshall_Request           => RU_Marshallers,
         RE_Unmarshall_Request         => RU_Marshallers,
         RE_Message_Type               => RU_PolyORB_HI_Messages,
         RE_Reallocate                 => RU_PolyORB_HI_Messages,
         RE_Non_Blocking_Receive       => RU_PolyORB_HI_Protocols,
         RE_Send                       => RU_PolyORB_HI_Protocols,
         RE_Initialize                 => RU_PolyORB_HI_Transport,
         RE_SOIF_MTS_ASSERT_V1_SPACEWIRE_PID
           => RU_SOIF_MTS_Wrapper_Ada_Structures,
         RE_SOIF_MTS_NON_GUARANTEED_DELIVERY
           => RU_SOIF_MTS_Wrapper_Ada_Structures,
         RE_SOIF_MTS_Naming_Entry_Type => RU_SOIF_MTS_Wrapper_Ada_Structures,
         RE_SOIF_MTS_Naming_Store_Type => RU_SOIF_MTS_Wrapper_Ada_Structures,
         RE_Boolean                    => RU_Standard,
         RE_Integer                    => RU_Standard,
         RE_Natural                    => RU_Standard,
         RE_Float                      => RU_Standard,
         RE_String                     => RU_Standard,
         RE_Character                  => RU_Standard,
         RE_Wide_Character             => RU_Standard,
         RE_Suspend_Forever            => RU_PolyORB_HI_Suspenders,
         RE_Unblock_All_Tasks          => RU_PolyORB_HI_Suspenders,
         RE_Default_Priority           => RU_System,
         RE_Priority                   => RU_System);

   procedure Initialize;
   procedure Reset;

   function RE (Id : RE_Id; Withed : Boolean := True) return Node_Id;
   --  Return a designator for entity Id

   function RU (Id : RU_Id; Withed : Boolean := True) return Node_Id;
   --  Return a node for Unit Id

end Ocarina.Generators.PO_HI_Ada.Runtime;