ocarina-backends-po_hi_c-runtime.ads 28.7 KB
Newer Older
1
2
3
4
5
6
7
8
------------------------------------------------------------------------------
--                                                                          --
--                           OCARINA COMPONENTS                             --
--                                                                          --
--     O C A R I N A . B A C K E N D S . P O _ H I _ C . R U N T I M E      --
--                                                                          --
--                                 S p e c                                  --
--                                                                          --
9
--          Copyright (C) 2008-2012, European Space Agency (ESA).           --
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
--                                                                          --
-- 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.Backends.PO_HI_C.Runtime is

   --  Headers file that can be included

   type RH_Id is
     (RH_Null,                       --  Workaround to denote a null RH
      RH_PO_HI_Task,                 --  po_hi_task header
      RH_PO_HI_Time,                 --  po_hi_time header
      RH_PO_HI_Common,               --  po_hi_common header
43
      RH_PO_HI_Lua,                  --  po_hi_lua
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
      RH_PO_HI_Main,                 --  po_hi_main header
      RH_PO_HI_Messages,             --  po_hi_messages header
      RH_PO_HI_Protected,            --  po_hi_protected header
      RH_PO_HI_Marshallers,          --  po_hi_marshallers header
      RH_PO_HI_Returns,              --  po_hi_returns header
      RH_PO_HI_Transport,            --  po_hi_marshallers header
      RH_PO_HI_Types,                --  po_hi_types header
      RH_PO_HI_Gqueue,               --  po_hi_gqueue header
      RH_PO_HI_Simulink,             --  po_hi_simulink header
      RH_PO_HI_Utils,                --  po_hi_utils header
      RH_Activity,                   --  the activity header
      RH_Request,                    --  the request header
      RH_Types,                      --  the types header
      RH_Marshallers,                --  the marshallers header
      RH_Subprograms,                --  the subprograms
      RH_Deployment
     );

   --  Runtime Entities

   type RE_Id is
     (RE_Null,                           --  Workaround to denote a null RE
      RE_Microseconds,                   --  __po_hi_microseconds
      RE_Milliseconds,                   --  __po_hi_milliseconds
      RE_Seconds,                        --  __po_hi_seconds
      RE_Minutes,                        --  __po_hi_minutes
      RE_Create_Periodic_Task,           -- __po_hi_create_periodic_task
      RE_Create_Sporadic_Task,           -- __po_hi_create_sporadic_task
72
      RE_Task_Wait_Offset,               -- __po_hi_task_wait_offset
73
74
      RE_Wait_For_Next_Period,           -- __po_hi_task_wait_for_next_period
      RE_Initialize,                     -- __po_hi_initialize
75
      RE_Initialize_Early,               -- __po_hi_initialize_early
76
      RE_LUA_Load,                       -- __po_hi_lua_load
77
78
79
80
81
82
83
84
      RE_LUA_Init_Function_Call,         -- __po_hi_lua_init_function_call
      RE_LUA_Perform_Function_Call,      -- __po_hi_lua_perform_function_call
      RE_LUA_Push_Boolean,               -- __po_hi_lua_push_boolean
      RE_LUA_Push_Number,                -- __po_hi_lua_push_number
      RE_LUA_Push_String,                -- __po_hi_lua_push_string
      RE_LUA_Get_Boolean,                -- __po_hi_lua_get_boolean
      RE_LUA_Get_Number,                 -- __po_hi_lua_get_number
      RE_LUA_Get_String,                 -- __po_hi_lua_get_string
85
86
      RE_LUA_Load_File,                  -- __po_hi_lua_load_file
      RE_LUA_Load_File_With_Function,    -- __po_hi_lua_load_file_with_function
87
88
89
90
91
92
93
94
95
96
97
98
99
      RE_Wait_Initialization,            -- __po_hi_wait_initialization
      RE_Marshall_Bool,                  -- __po_hi_marshall_bool
      RE_Unmarshall_Bool,                -- __po_hi_unmarshall_bool
      RE_Marshall_Char,                  -- __po_hi_marshall_char
      RE_Unmarshall_Char,                -- __po_hi_unmarshall_char
      RE_Marshall_Float,                 -- __po_hi_marshall_float
      RE_Unmarshall_Float,               -- __po_hi_unmarshall_float
      RE_Marshall_Float32,               -- __po_hi_marshall_float32
      RE_Unmarshall_Float32,             -- __po_hi_unmarshall_float32
      RE_Marshall_Float64,               -- __po_hi_marshall_float64
      RE_Unmarshall_Float64,             -- __po_hi_unmarshall_float64
      RE_Marshall_Request,               -- __po_hi_marshall_request
      RE_Unmarshall_Request,             -- __po_hi_unmarshall_request
100
101
      RE_Marshall_Asn1_Request,          -- __po_hi_marshall_asn1_request
      RE_Unmarshall_Asn1_Request,        -- __po_hi_unmarshall_asn1_request
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
      RE_Marshall_Int,                   -- __po_hi_marshall_int
      RE_Unmarshall_Int,                 -- __po_hi_unmarshall_int
      RE_Marshall_Int8,                  -- __po_hi_marshall_int8
      RE_Unmarshall_Int8,                -- __po_hi_unmarshall_int8
      RE_Marshall_Int16,                 -- __po_hi_marshall_int16
      RE_Unmarshall_Int16,               -- __po_hi_unmarshall_int16
      RE_Marshall_Int32,                 -- __po_hi_marshall_int32
      RE_Unmarshall_Int32,               -- __po_hi_unmarshall_int32
      RE_Marshall_Int64,                 -- __po_hi_marshall_int64
      RE_Unmarshall_Int64,               -- __po_hi_unmarshall_int64
      RE_Marshall_Uint8,                 -- __po_hi_marshall_uint8
      RE_Unmarshall_Uint8,               -- __po_hi_unmarshall_uint8
      RE_Marshall_Uint16,                -- __po_hi_marshall_uint16
      RE_Unmarshall_Uint16,              -- __po_hi_unmarshall_uint16
      RE_Marshall_Uint32,                -- __po_hi_marshall_uint32
      RE_Unmarshall_Uint32,              -- __po_hi_unmarshall_uint32
      RE_Marshall_Uint64,                -- __po_hi_marshall_uint64
      RE_Unmarshall_Uint64,              -- __po_hi_unmarshall_uint64
      RE_Marshall_Port,                  -- __po_hi_marshall_port
      RE_Unmarshall_Port,                -- __po_hi_unmarshall_port
      RE_Marshall_Array,                 -- __po_hi_marshall_array
      RE_Unmarshall_Array,               -- __po_hi_unmarshall_array
124
      RE_Send_Output,                    -- __po_hi_send_output
125
      RE_Get_Entity_From_Global_Port,    -- __po_hi_get_entity_from_global_port
126
127
128
129
130
131
132
133
134
135
136
137
      RE_Gqueue_Init,                    -- __po_hi_gqueue_init
      RE_Gqueue_Store_In,                -- __po_hi_gqueue_store_in
      RE_Gqueue_Store_Out,               -- __po_hi_gqueue_store_out
      RE_Gqueue_Get_Count,               -- __po_hi_gqueue_get_count
      RE_Gqueue_Send_Output,             -- __po_hi_gqueue_send_output
      RE_Gqueue_Get_Value,               -- __po_hi_gqueue_get_value
      RE_Gqueue_Next_Value,              -- __po_hi_gqueue_next_value
      RE_Gqueue_Wait_For_Incoming_Event, -- __po_hi_gqueue_wait_for_incoming
      RE_Compute_Next_Period,            -- __po_hi_compute_next_period
      RE_Simulate_WCET,                  -- __po_hi_simulate_wcet
      RE_Sporadic_Wait,                  -- __po_hi_sporadic_wait
      RE_Compute_Miss,                   -- __po_hi_compute_miss
138
      RE_Deployment_Endiannesses,        -- __po_hi_deployment_endiannesses
139
      RE_Sporadic_Wait_Release,          -- __po_hi_sporadic_wait_release
julien.delange's avatar
julien.delange committed
140
      RE_Transport_Send_Default,         -- __po_hi_transport_send_default
141
142
143
144
145
146
147
148
149
150
      RE_Main_Deliver,                   -- __po_hi_main_deliver
      RE_Msg_Reallocate,                 -- __po_hi_msg_reallocate
      RE_Copy_Array,                     -- __po_hi_copy_array
      RE_Protected_Lock,                 -- __po_hi_protected_lock
      RE_Protected_Unlock,               -- __po_hi_protected_unlock
      RE_Simulink_Init,                  -- __po_hi_simulink_init
      RE_Simulink_Find_Signal,           -- __po_hi_simulink_find_signal
      RE_Simulink_Find_Var,              -- __po_hi_simulink_find_var
      RE_Simulink_Find_Parameter,        -- __po_hi_simulink_find_parameter
      RE_Simulink_Update,                -- __po_hi_simulink_update
151
      RE_Wait_End_Of_Instrumentation,    -- __po_hi_wait_end_of_instrumentation
152
153
154
      RE_Wait_For_Tasks,                 -- __po_hi_wait_for_tasks

      RE_Default_Priority,               --  __PO_HI_DEFAULT_PRIORITY
155
      RE_Marshallers_Asn1_Copy_Member,   --  __PO_HI_MARSHALLERS_ASN1_COPY_MEMB
156
157
158
159
160
161
162
      RE_Main_Type,                      --  __PO_HI_MAIN_TYPE
      RE_Main_Args,                      --  __PO_HI_MAIN_ARGS
      RE_Main_Name,                      --  __PO_HI_MAIN_NAME
      RE_Main_Return,                    --  __PO_HI_MAIN_RETURN
      RE_Nb_Servers,                     --  __PO_HI_NB_SERVERS
      RE_Nb_Ports,                       --  __PO_HI_NB_PORTS
      RE_Noport,                         --  __PO_HI_NOPORT
163
164
      RE_Bigendian,                      --  __PO_HI_BIGENDIAN
      RE_Littleendian,                   --  __PO_HI_LITTLEENDIAN
165
166
      RE_Noaddr,                         --  __PO_HI_NOADDR
      RE_No_Device,                      --  __PO_HI_NO_DEVICE
167
168
      RE_Unused_Node,                    --  __PO_HI_UNUSED_NODE
      RE_Nb_Protected,                   --  __PO_HI_NB_PROTECTED
169
170
171
172
      RE_Protected_Regular,              --  __PO_HI_PROTECTED_REGULAR
      RE_Protected_PIP,                  --  __PO_HI_PROTECTED_PIP
      RE_Protected_PCP,                  --  __PO_HI_PROTECTED_PCP
      RE_Protected_IPCP,                 --  __PO_HI_PROTECTED_IPCP
173
      RE_Nb_Nodes,                       --  __PO_HI_NB_NODES
174
      RE_Nb_Devices,                     --  __PO_HI_NB_DEVICES
175
      RE_Nb_Buses,                       --  __PO_HI_NB_BUSES
176
      RE_Nb_Protocols,                   --  __PO_HI_NB_PROTOCOLS
177
      RE_My_Node,                        --  __PO_HI_MY_NODE
178
179
180
181
182
183
184
185
      RE_Gqueue_Fifo_Indata,             --  __PO_HI_GQUEUE_FIFO_DATA
      RE_Gqueue_Fifo_Out,                --  __PO_HI_GQUEUE_FIFO_OUT
      RE_Nb_Operations,                  --  __PO_HI_NB_OPERATIONS
      RE_Nb_Entities,                    --  __PO_HI_NB_ENTITIES
      RE_Simulink_Node,                  --  __PO_HI_SIMULINK_NODE
      RE_Simulink_Init_Func,             --  __PO_HI_SIMULINK_INIT
      RE_Simulink_Model_Type,            --  __PO_HI_SIMULINK_MODEL
      RE_Nb_Tasks,                       --  __PO_HI_NB_TASKS
186
187
188
189
190
191
192
193
194
195
196
197
      RE_In_Data_Inter_Process,
      RE_In_Data_Intra_Process,
      RE_Out_Data_Inter_Process,
      RE_Out_Data_Intra_Process,
      RE_In_Event_Inter_Process,
      RE_In_Event_Intra_Process,
      RE_Out_Event_Inter_Process,
      RE_Out_Event_Intra_Process,
      RE_In_Event_Data_Inter_Process,
      RE_In_Event_Data_Intra_Process,
      RE_Out_Event_Data_Inter_Process,
      RE_Out_Event_Data_Intra_Process,
198
      RE_Need_Driver_Sockets,            --  __PO_HI_NEED_DRIVER_SOCKETS
199
200
201
      RE_SUCCESS,                        --  __PO_HI_SUCCESS

      RE_Task_Id,                        --  __po_hi_task_id
202
      RE_Device_Id,                      --  __po_hi_device_id
203
      RE_Port_Kind_T,                    --  __po_hi_port_kind_t
204
      RE_Bus_Id,                         --  __po_hi_bus_id
205
206
207
208
209
210
211
      RE_Entity_T,                       --  __po_hi_entity_t
      RE_Inetport_T,                     --  __po_hi_inetport_t
      RE_Inetaddr_T,                     --  __po_hi_inetaddr_t
      RE_Protected_T,                    --  __po_hi_protected_t
      RE_Entity_Server_T,                --  __po_hi_entity_server_t
      RE_Operation_T,                    --  __po_hi_operation_t
      RE_Request_T,                      --  __po_hi_request_t
212
      RE_Protected_Protocol_T,           --  __po_hi_protected_protocol_t
213
      RE_Bool_T,                         --  __po_hi_bool_t
214
      RE_Lua_Context_T,                  --  __po_hi_lua_context_t
215
216
      RE_Asn1_Pkt_T,                     --  __po_hi_asn1_pkt_t
      RE_Asn1_Buffer_T,                  --  __po_hi_asn1_buffer_t
217
      RE_Time_T,                         --  __po_hi_time_t
218
      RE_Byte_T,                         --  __po_hi_byte_t
219
220
221
222
223
224
225
226
227
228
229
230
      RE_Uint64_T,                       --  __po_hi_uint64_t
      RE_Uint32_T,                       --  __po_hi_uint32_t
      RE_Uint16_T,                       --  __po_hi_uint16_t
      RE_Uint8_T,                        --  __po_hi_uint8_t
      RE_Int8_T,                         --  __po_hi_int8_t
      RE_Int16_T,                        --  __po_hi_int16_t
      RE_Int32_T,                        --  __po_hi_int32_t
      RE_Int64_T,                        --  __po_hi_int64_t
      RE_Float32_T,                      --  __po_hi_float32_t
      RE_Float64_T,                      --  __po_hi_float64_t
      RE_Msg_T,                          --  __po_hi_msg_t
      RE_Port_T,                         --  __po_hi_port_t
231
      RE_Protocol_Conf_T,                --  __po_hi_protocol_conf_t
232
      RE_Protocol_T,                     --  __po_hi_protocol_t
233
234
235
236
237
      RE_Local_Port_T,                   --  __po_hi_local_port_t
      RE_Node_T,                         --  __po_hi_node_t

      RE_Operation_Names,                --  __po_hi_operation_names
      RE_Ports_Names,                    --  __po_hi_port_names
238
      RE_Devices_Naming,                 --  __po_hi_devices_naming
239
      RE_Protocols_Configuration,        --  __po_hi_protocols_configuration
240
      RE_Devices_Configuration_Values,   --  __po_hi_devices_configuration_...
241
242
      RE_Devices_Nb_Accessed_Buses,      --  __po_hi_devices_nb_accessed_buses
      RE_Devices_Accessed_Buses,         --  __po_hi_devices_accessed_buses
243
244
      RE_Protected_Configuration,        --  __po_hi_protected_configuration
      RE_Protected_Priorities,           --  __po_hi_protected_priorities
245
      RE_Port_To_Device,                 --  __po_hi_port_to_device
246
      RE_Devices_To_Nodes,               --  __po_hi_devices_to_nodes
247
      RE_Port_Global_To_Entity,          --  __po_hi_port_global_to_entity
248
      RE_Port_Global_To_Device,          --  __po_hi_port_global_to_device
249
      RE_Port_Global_Names,              --  __po_hi_port_global_names
250
      RE_Port_Global_Kind,               --  __po_hi_port_global_kind
251
      RE_Port_Global_Queue_Size,         --  __po_hi_port_global_queue_size
252
      RE_Ports_Protocols,                --  __po_hi_ports_protocols
253
      RE_Port_Global_Data_Size,          --  __po_hi_port_global_data_size
254
255
256
257
      RE_Mynode,                         --  __po_hi_mynode
      RE_Node_Port,                      --  __po_hi_node_port
      RE_Node_Addr,                      --  __po_hi_node_addr
      RE_Entity_Table,                   --  __po_hi_entity_table
258
      RE_Port_Global_Model_Names,        --  __po_hi_port_global_model_names
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
      RE_Port_Global_To_Local            --  __po_hi_port_global_to_local
     );

   --  Runtime types

   subtype RT_Id is RE_Id range RE_Task_Id .. RE_Node_T;
   subtype RC_Id is RE_Id range RE_Default_Priority .. RE_SUCCESS;
   subtype RF_Id is RE_Id range RE_Null .. RE_Wait_For_Tasks;
   subtype RV_Id is RE_Id range RE_Operation_Names .. RE_Port_Global_To_Local;

   RE_Header_Table : constant array (RE_Id) of RH_Id
     := (RE_Null                           => RH_Null,
         --  Runtime functions associations
         RE_Microseconds                   => RH_PO_HI_Time,
         RE_Milliseconds                   => RH_PO_HI_Time,
         RE_Seconds                        => RH_PO_HI_Time,
         RE_Minutes                        => RH_PO_HI_Time,
julien.delange's avatar
julien.delange committed
276
         RE_Transport_Send_Default         => RH_PO_HI_Transport,
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
         RE_Unused_Node                    => RH_PO_HI_Types,
         RE_Msg_Reallocate                 => RH_PO_HI_Messages,
         RE_Marshall_Array                 => RH_PO_HI_Marshallers,
         RE_Unmarshall_Array               => RH_PO_HI_Marshallers,
         RE_Marshall_Bool                  => RH_PO_HI_Marshallers,
         RE_Unmarshall_Bool                => RH_PO_HI_Marshallers,
         RE_Marshall_Char                  => RH_PO_HI_Marshallers,
         RE_Unmarshall_Char                => RH_PO_HI_Marshallers,
         RE_Marshall_Int                   => RH_PO_HI_Marshallers,
         RE_Unmarshall_Int                 => RH_PO_HI_Marshallers,
         RE_Marshall_Int8                  => RH_PO_HI_Marshallers,
         RE_Unmarshall_Int8                => RH_PO_HI_Marshallers,
         RE_Marshall_Int16                 => RH_PO_HI_Marshallers,
         RE_Unmarshall_Int16               => RH_PO_HI_Marshallers,
         RE_Marshall_Int32                 => RH_PO_HI_Marshallers,
         RE_Unmarshall_Int32               => RH_PO_HI_Marshallers,
         RE_Marshall_Int64                 => RH_PO_HI_Marshallers,
         RE_Unmarshall_Int64               => RH_PO_HI_Marshallers,
         RE_Marshall_Uint8                 => RH_PO_HI_Marshallers,
         RE_Unmarshall_Uint8               => RH_PO_HI_Marshallers,
         RE_Marshall_Uint16                => RH_PO_HI_Marshallers,
         RE_Unmarshall_Uint16              => RH_PO_HI_Marshallers,
         RE_Marshall_Uint32                => RH_PO_HI_Marshallers,
         RE_Unmarshall_Uint32              => RH_PO_HI_Marshallers,
         RE_Marshall_Uint64                => RH_PO_HI_Marshallers,
         RE_Unmarshall_Uint64              => RH_PO_HI_Marshallers,
         RE_Marshall_Float                 => RH_PO_HI_Marshallers,
         RE_Unmarshall_Float               => RH_PO_HI_Marshallers,
         RE_Marshall_Float32               => RH_PO_HI_Marshallers,
         RE_Unmarshall_Float32             => RH_PO_HI_Marshallers,
         RE_Marshall_Float64               => RH_PO_HI_Marshallers,
         RE_Unmarshall_Float64             => RH_PO_HI_Marshallers,
         RE_Marshall_Port                  => RH_PO_HI_Marshallers,
         RE_Unmarshall_Port                => RH_PO_HI_Marshallers,
311
312
313
         RE_LUA_Load                       => RH_PO_HI_Lua,
         RE_LUA_Load_File                  => RH_PO_HI_Lua,
         RE_LUA_Load_File_With_Function    => RH_PO_HI_Lua,
314
315
316
317
318
319
320
321
         RE_LUA_Init_Function_Call         => RH_PO_HI_Lua,
         RE_LUA_Perform_Function_Call      => RH_PO_HI_Lua,
         RE_LUA_Push_Boolean               => RH_PO_HI_Lua,
         RE_LUA_Push_Number                => RH_PO_HI_Lua,
         RE_LUA_Push_String                => RH_PO_HI_Lua,
         RE_LUA_Get_Boolean                => RH_PO_HI_Lua,
         RE_LUA_Get_Number                 => RH_PO_HI_Lua,
         RE_LUA_Get_String                 => RH_PO_HI_Lua,
322
323
         RE_Marshall_Request               => RH_Marshallers,
         RE_Unmarshall_Request             => RH_Marshallers,
324
325
         RE_Marshall_Asn1_Request          => RH_Marshallers,
         RE_Unmarshall_Asn1_Request        => RH_Marshallers,
326
327
328
329
330
         RE_Create_Periodic_Task           => RH_PO_HI_Task,
         RE_Main_Deliver                   => RH_Activity,
         RE_Create_Sporadic_Task           => RH_PO_HI_Task,
         RE_Simulate_WCET                  => RH_PO_HI_Utils,
         RE_Compute_Miss                   => RH_PO_HI_Utils,
331
         RE_Deployment_Endiannesses        => RH_PO_HI_Transport,
332
         RE_Task_Wait_Offset               => RH_PO_HI_Task,
333
334
335
         RE_Wait_For_Next_Period           => RH_PO_HI_Task,
         RE_Compute_Next_Period            => RH_PO_HI_Task,
         RE_Initialize                     => RH_PO_HI_Main,
336
         RE_Initialize_Early               => RH_PO_HI_Main,
337
338
339
340
         RE_Wait_Initialization            => RH_PO_HI_Main,
         RE_Protected_Lock                 => RH_PO_HI_Protected,
         RE_Protected_Unlock               => RH_PO_HI_Protected,
         RE_Copy_Array                     => RH_PO_HI_Types,
341
         RE_Send_Output                    => RH_Activity,
342
         RE_Get_Entity_From_Global_Port    => RH_PO_HI_Transport,
343
344
345
346
347
348
349
350
351
352
353
354
355
356
         RE_Gqueue_Store_In                => RH_PO_HI_Gqueue,
         RE_Gqueue_Store_Out               => RH_PO_HI_Gqueue,
         RE_Gqueue_Send_Output             => RH_PO_HI_Gqueue,
         RE_Gqueue_Init                    => RH_PO_HI_Gqueue,
         RE_Gqueue_Get_Count               => RH_PO_HI_Gqueue,
         RE_Gqueue_Get_Value               => RH_PO_HI_Gqueue,
         RE_Gqueue_Next_Value              => RH_PO_HI_Gqueue,
         RE_Gqueue_Wait_For_Incoming_Event => RH_PO_HI_Gqueue,
         RE_Sporadic_Wait                  => RH_PO_HI_Task,
         RE_Sporadic_Wait_Release          => RH_PO_HI_Task,
         RE_Simulink_Find_Var              => RH_PO_HI_Simulink,
         RE_Simulink_Find_Signal           => RH_PO_HI_Simulink,
         RE_Simulink_Find_Parameter        => RH_PO_HI_Simulink,
         RE_Simulink_Update                => RH_PO_HI_Simulink,
357
         RE_Wait_End_Of_Instrumentation    => RH_PO_HI_Main,
358
359
360
361
362
363
         RE_Wait_For_Tasks                 => RH_PO_HI_Task,

         --  Runtime types associations

         RE_Msg_T                          => RH_PO_HI_Messages,
         RE_Task_Id                        => RH_Deployment,
364
         RE_Device_Id                      => RH_Deployment,
365
         RE_Bus_Id                         => RH_Deployment,
366
367
368
         RE_Entity_T                       => RH_Deployment,
         RE_Local_Port_T                   => RH_Deployment,
         RE_Port_T                         => RH_Deployment,
369
         RE_Protocol_Conf_T                => RH_PO_HI_Transport,
370
         RE_Protocol_T                     => RH_Deployment,
371
372
         RE_Entity_Server_T                => RH_Deployment,
         RE_Protected_T                    => RH_PO_HI_Protected,
julien.delange's avatar
julien.delange committed
373
374
         RE_Inetport_T                     => RH_PO_HI_Transport,
         RE_Inetaddr_T                     => RH_PO_HI_Transport,
375
         RE_Time_T                         => RH_PO_HI_Time,
376
         RE_Byte_T                         => RH_PO_HI_Types,
377
         RE_Lua_Context_T                  => RH_PO_HI_Lua,
378
379
         RE_Asn1_Pkt_T                     => RH_PO_HI_Marshallers,
         RE_Asn1_Buffer_T                  => RH_PO_HI_Marshallers,
380
         RE_Bool_T                         => RH_PO_HI_Types,
381
         RE_Port_Kind_T                    => RH_PO_HI_Types,
382
383
384
385
386
387
388
389
390
391
392
393
         RE_Uint8_T                        => RH_PO_HI_Types,
         RE_Int8_T                         => RH_PO_HI_Types,
         RE_Uint16_T                       => RH_PO_HI_Types,
         RE_Int16_T                        => RH_PO_HI_Types,
         RE_Uint32_T                       => RH_PO_HI_Types,
         RE_Int32_T                        => RH_PO_HI_Types,
         RE_Uint64_T                       => RH_PO_HI_Types,
         RE_Int64_T                        => RH_PO_HI_Types,
         RE_Float32_T                      => RH_PO_HI_Types,
         RE_Float64_T                      => RH_PO_HI_Types,
         RE_Node_T                         => RH_Deployment,
         RE_Operation_T                    => RH_Request,
394
         RE_Protected_Protocol_T           => RH_PO_HI_Protected,
395
396
397
398
399
         RE_Request_T                      => RH_Request,

         --  Runtime Constants associations

         RE_Default_Priority               => RH_PO_HI_Task,
400
         RE_Marshallers_Asn1_Copy_Member   => RH_PO_HI_Marshallers,
401
402
403
404
         RE_Main_Type                      => RH_PO_HI_Task,
         RE_Main_Args                      => RH_PO_HI_Task,
         RE_Main_Name                      => RH_PO_HI_Task,
         RE_Main_Return                    => RH_PO_HI_Task,
405
         RE_Nb_Nodes                       => RH_Deployment,
406
         RE_Nb_Devices                     => RH_Deployment,
407
         RE_Nb_Buses                       => RH_Deployment,
408
         RE_Nb_Protocols                   => RH_Deployment,
409
         RE_My_Node                        => RH_Deployment,
410
411
         RE_Nb_Ports                       => RH_Deployment,
         RE_Nb_Servers                     => RH_Deployment,
412
         RE_Nb_Protected                   => RH_Deployment,
413
414
415
416
417
418
419
420
         RE_Nb_Entities                    => RH_Deployment,
         RE_Simulink_Init                  => RH_PO_HI_Simulink,
         RE_Simulink_Node                  => RH_Null,
         RE_Simulink_Init_Func             => RH_Null,
         RE_Simulink_Model_Type            => RH_Null,
         RE_Gqueue_Fifo_Indata             => RH_PO_HI_Gqueue,
         RE_Gqueue_Fifo_Out                => RH_PO_HI_Gqueue,
         RE_Nb_Operations                  => RH_Request,
421
422
423
424
425
426
         RE_Protected_Configuration        => RH_PO_HI_Protected,
         RE_Protected_Priorities           => RH_PO_HI_Protected,
         RE_Protected_Regular              => RH_PO_HI_Protected,
         RE_Protected_PIP                  => RH_PO_HI_Protected,
         RE_Protected_PCP                  => RH_PO_HI_Protected,
         RE_Protected_IPCP                 => RH_PO_HI_Protected,
julien.delange's avatar
julien.delange committed
427
         RE_Noaddr                         => RH_PO_HI_Transport,
428
         RE_No_Device                      => RH_Deployment,
julien.delange's avatar
julien.delange committed
429
         RE_Noport                         => RH_PO_HI_Transport,
430
431
         RE_Bigendian                      => RH_PO_HI_Transport,
         RE_Littleendian                   => RH_PO_HI_Transport,
432
         RE_Nb_Tasks                       => RH_Deployment,
433
434
435
436
437
438
439
440
441
442
443
444
         RE_In_Data_Inter_Process          => RH_PO_HI_Types,
         RE_In_Data_Intra_Process          => RH_PO_HI_Types,
         RE_Out_Data_Inter_Process         => RH_PO_HI_Types,
         RE_Out_Data_Intra_Process         => RH_PO_HI_Types,
         RE_In_Event_Inter_Process         => RH_PO_HI_Types,
         RE_In_Event_Intra_Process         => RH_PO_HI_Types,
         RE_Out_Event_Inter_Process        => RH_PO_HI_Types,
         RE_Out_Event_Intra_Process        => RH_PO_HI_Types,
         RE_In_Event_Data_Inter_Process    => RH_PO_HI_Types,
         RE_In_Event_Data_Intra_Process    => RH_PO_HI_Types,
         RE_Out_Event_Data_Inter_Process   => RH_PO_HI_Types,
         RE_Out_Event_Data_Intra_Process   => RH_PO_HI_Types,
445
         RE_Need_Driver_Sockets            => RH_Deployment,
446
447
448
449
450
         RE_SUCCESS                        => RH_PO_HI_Returns,

         --  Variables associations

         RE_Ports_Names                    => RH_PO_HI_Types,
451
         RE_Devices_Naming                 => RH_Deployment,
452
         RE_Protocols_Configuration        => RH_Deployment,
453
         RE_Devices_Configuration_Values   => RH_Deployment,
454
455
         RE_Devices_Nb_Accessed_Buses      => RH_Deployment,
         RE_Devices_Accessed_Buses         => RH_Deployment,
456
         RE_Port_To_Device                 => RH_Deployment,
457
         RE_Devices_To_Nodes               => RH_Deployment,
458
459
         RE_Operation_Names                => RH_PO_HI_Types,
         RE_Port_Global_To_Entity          => RH_Deployment,
460
         RE_Port_Global_To_Device          => RH_Deployment,
461
         RE_Port_Global_Names              => RH_Deployment,
462
         RE_Port_Global_Queue_Size         => RH_Deployment,
463
         RE_Ports_Protocols                => RH_Deployment,
464
         RE_Port_Global_Data_Size          => RH_Deployment,
465
         RE_Port_Global_Kind               => RH_Deployment,
466
467
468
469
         RE_Mynode                         => RH_Deployment,
         RE_Node_Port                      => RH_Deployment,
         RE_Node_Addr                      => RH_Deployment,
         RE_Entity_Table                   => RH_Deployment,
470
         RE_Port_Global_Model_Names        => RH_Deployment,
471
472
473
474
475
476
477
478
479
480
481
482
         RE_Port_Global_To_Local           => RH_Deployment
        );
   procedure Initialize;
   procedure Reset;

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

   function RH (Id : RH_Id) return Node_Id;
   --  Return a node for entity RH_Id

end Ocarina.Backends.PO_HI_C.Runtime;