Commit 091e9281 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Add Ada module with RI interfaces

parent a7a10dbc
@@-- OpenGEODE's generate code goes into the "code" folder
@@IF@@ @_Language_@ = SDL
../code/@_LOWER:Name_@_ri.ads
@@ELSE@@
@_LOWER:Name_@_ri.ads
@@-- The up to date list of tags available for this template is available here:
@@-- If you have no internet access you can also use (with vim) Ctrl-W-f then Ctrl-W-L (or gf)
@@-- in vim to open the doc: $HOME/tool-inst/share/kazoo/doc/templates_skeletons_sub_function.ascii
@@--
-- DO NOT EDIT THIS FILE, IT WILL BE OVERWRITTEN DURING THE BUILD
@@TABLE'ALIGN_ON("use ")@@
with @_CAPITALIZE:ASN1_Modules_@; use @_CAPITALIZE:ASN1_Modules_@;
@@END_TABLE@@
package @_CAPITALIZE:Name_@_RI is
@_Required_Interfaces'Indent_@
@@TABLE@@
-- Timer @_Timers_@ Set and Reset functions
procedure Set_@_CAPITALIZE:Timers_@ (Value : in out asn1SccT_UInt32)
with Import,
Convention => C,
Link_Name => "@_LOWER:Name_@_RI_SET_@_Timers_@";
procedure Reset_@_CAPITALIZE:Timers_@
with Import,
Convention => C,
Link_Name => "@_LOWER:Name_@_RI_RESET_@_Timers_@";
@@END_TABLE@@
end @_CAPITALIZE:Name_@_RI;
@@-- The up to date list of tags available for this template is available here:
@@-- If you have no internet access you can also use (with vim) Ctrl-W-f then Ctrl-W-L (or gf)
@@-- in vim to open the doc: $HOME/tool-inst/share/kazoo/doc/templates_skeletons_sub_interface.ascii
@@IF@@ @_Direction_@ = RI and not @_Is_Timer_@
@@IF@@ @_EXIST:Param_Names_@
@@INLINE@@
procedure @_CAPITALIZE:Name_@
@@INLINE(\()(; )(\))@@
@@TABLE@@
@@IF@@ @_Param_Directions_@ = "PARAM_IN"
@_CAPITALIZE:Param_Names_@ : in out asn1Scc@_CAPITALIZE:REPLACE_ALL(-/_):Param_Types_@
@@ELSE@@
@_CAPITALIZE:Param_Names_@ : out asn1Scc@_CAPITALIZE:REPLACE_ALL(-/_):Param_Types_@
@@END_IF@@
@@END_TABLE@@
@@END_INLINE@@
@@END_INLINE@@
@@ELSE@@
procedure @_CAPITALIZE:Name_@
@@END_IF@@
with Import,
Convention => C,
Link_Name => "@_LOWER:Parent_Function_@_RI_@_Name_@";
@@END_IF@@
@@-- This template must return either TRUE or something else (meaning FALSE)
@@-- It is used to determine if the other templates in this folder will be
@@-- processed or ignored.
@@-- One folder can contain two templates: one for a function, and one for
@@-- a corresponding makefile (or build script)
@@-- The name of the function is read from template "function-filename.tmplt"
@@-- The name of the makefile is read from template "makefile-filename.tmplt"
@@-- These files are optional, if absent no error is raised
@@-- The following tags are available in this template:
@@--
@@-- @_Name_@ : The name of the function
@@-- @_Is_Type_@ : True if function type
@@-- @_Instance_Of_@ : Name of instance or empty string
@@-- @_Language_@ : Implementation language for the function
@@-- @_Filename_Is_Present_@ : True if target function output already exists
@@-- @_Makefile_Is_Present_@ : True if target build script already exists
@@-- @_C_Middleware_@ : True if middleware is in C (e.g. PO-HI-C)
@@IF@@ (@_Language_@ = Ada or @_Language_@ = SDL) and not @_Is_Type_@ and @_Instance_Of_@ = ""
TRUE
@@END_IF@@
@@-- The following tags are available in this template: @@-- The up to date list of tags available for this template is available here:
@@-- If you have no internet access you can also use (with vim) Ctrl-W-f then Ctrl-W-L (or gf)
@@-- in vim to open the doc: $HOME/tool-inst/share/kazoo/doc/templates_skeletons_sub_function.ascii
@@-- @@--
@@-- @_Name_@ : The name of the function
@@-- @_Language_@ : The implementation language
@@-- @_List_Of_PIs_@ : List of all Provided Interfaces (just names)
@@-- @_List_Of_RIs_@ : List of all Required Interfaces (just names)
@@-- @_List_Of_Sync_PIs@ : List of synchronous Provided Interfaces
@@-- @_List_Of_Sync_RIs@ : List of synchronous Required Interfaces
@@-- @_List_Of_ASync_PIs@ : List of asynchronous Provided Interfaces
@@-- @_List_Of_ASync_RIs@ : List of asynchronous Required Interfaces
@@-- @_ASN1_Modules_@ : List of ASN.1 Modules names
@@-- @_ASN1_Files_@ : List of ASN.1 Files with path
@@-- @_Timers_@ : List of timers (just names)
@@-- @_Has_Context_@ : Flag, True if there are context parameters
@@-- @_CP_Names_@ : List of Context Parameter names
@@-- @_CP_Types_@ : List of Context Parameter types
@@-- @_Provided_Interfaces_@ : From template: Provided interfaces with params
@@-- @_Required_Interfaces_@ : From template: Required interfaces with params
@@-- @_Property_Names_@ : List of User-defined properties (names)
@@-- @_Property_Values_@ : List of User-defined properties (values)
@@-- @_Is_Type_@ : Flag, True if function is a component type
@@-- @_Instance_Of_@ : Optional name of component type
-- Header file for function @_Name_@ in @_Language_@ language
-- Generated by TASTE on @_NOW_@ -- Generated by TASTE on @_NOW_@
-- Context Parameters present : @_YES_NO:Has_Context_@
-- Provided interfaces : @_List_Of_PIs_@
-- Required interfaces : @_List_Of_RIs_@
-- DO NOT EDIT THIS FILE, IT WILL BE OVERWRITTEN DURING THE BUILD -- DO NOT EDIT THIS FILE, IT WILL BE OVERWRITTEN DURING THE BUILD
@@TABLE@@ @@TABLE'ALIGN_ON("use ")@@
with @_CAPITALIZE:ASN1_Modules_@; with @_CAPITALIZE:ASN1_Modules_@; use @_CAPITALIZE:ASN1_Modules_@;
use @_CAPITALIZE:ASN1_Modules_@;
@@END_TABLE@@ @@END_TABLE@@
@@-- @@--
@@-- Include package with context parameters, if present @@-- Include package with context parameters, if present
...@@ -38,35 +15,18 @@ use @_CAPITALIZE:ASN1_Modules_@; ...@@ -38,35 +15,18 @@ use @_CAPITALIZE:ASN1_Modules_@;
with Context_@_CAPITALIZE:Name_@; with Context_@_CAPITALIZE:Name_@;
@@END_IF@@ @@END_IF@@
-- Access to required interfaces is specified in this package:
with @_CAPITALIZE:Name_@_RI; use @_CAPITALIZE:Name_@_RI;
package @_CAPITALIZE:Name_@ is package @_CAPITALIZE:Name_@ is
@@-- Iterate over each context parameter @@-- Iterate over each context parameter
@@-- The pragma Export makes them visible as globals, e.g. for PeekPoke @@-- The pragma Export makes them visible as globals, e.g. for PeekPoke
@@TABLE@@ @@TABLE@@
@_CAPITALIZE:CP_Names_@ : asn1Scc@_CAPITALIZE:REPLACE((-)/_):CP_Types_@ := Context_@_CAPITALIZE:Name_@.@_CAPITALIZE:Name_@_Ctxt.@_CAPITALIZE:CP_Names_@; @_CAPITALIZE:CP_Names_@ : asn1Scc@_CAPITALIZE:REPLACE(-/_):CP_Types_@ := Context_@_CAPITALIZE:Name_@.@_CAPITALIZE:Name_@_Ctxt.@_CAPITALIZE:CP_Names_@;
pragma Export (C, @_CAPITALIZE:CP_Names_@, "@_LOWER:Name_@_@_LOWER:CP_Names_@"); pragma Export (C, @_CAPITALIZE:CP_Names_@, "@_LOWER:Name_@_@_LOWER:CP_Names_@");
@@END_TABLE@@ @@END_TABLE@@
-- PROVIDED INTERFACES ---------------------------------------------------
@_Provided_Interfaces'Indent_@ @_Provided_Interfaces'Indent_@
@@IF@@ @_Required_Interfaces_@ /= ""
-- REQUIRED INTERFACES ---------------------------------------------------
@@END_IF@@
@_Required_Interfaces'Indent_@
@@TABLE@@
-- Timer @_Timers_@ Set and Reset functions
procedure Set_@_CAPITALIZE:Timers_@ (Value : in out asn1SccT_UInt32)
with Import,
Convention => C,
Link_Name => "@_LOWER:Name_@_RI_SET_@_Timers_@";
procedure Reset_@_CAPITALIZE:Timers_@
with Import,
Convention => C,
Link_Name => "@_LOWER:Name_@_RI_RESET_@_Timers_@";
@@END_TABLE@@
end @_CAPITALIZE:Name_@; end @_CAPITALIZE:Name_@;
@@-- The following tags are available in this template: @@-- The up to date list of tags available for this template is available here:
@@-- @@-- If you have no internet access you can also use (with vim) Ctrl-W-f then Ctrl-W-L (or gf)
@@-- @_Name_@ : The name of the interface @@-- in vim to open the doc: $HOME/tool-inst/share/kazoo/doc/templates_skeletons_sub_interface.ascii
@@-- @_Direction_@ : "PI" or "RI" @@IF@@ @_Direction_@ = PI
@@-- @_Kind_@ : The RCM Kind @@IF@@ @_EXIST:Param_Names_@
@@-- @_Parent_Function_@ : The name of the function @@INLINE@@
@@-- @_Param_Names_@ : List of parameter names procedure @_CAPITALIZE:Name_@
@@-- @_Param_Types_@ : |_ Corresponding parameter types @@INLINE(\()(; )(\))@@
@@-- @_Param_Directions_@ : |_ Corresponding direction @@TABLE@@
@@IF@@ @_Direction_@ = PI or not @_Is_Timer_@ @@IF@@ @_Param_Directions_@ = "PARAM_IN"
@@IF@@ @_EXIST:Param_Names_@ @_CAPITALIZE:Param_Names_@ : in out asn1Scc@_CAPITALIZE:REPLACE_ALL((-)/_):Param_Types_@
@@INLINE@@ @@ELSE@@
@_CAPITALIZE:Param_Names_@ : out asn1Scc@_CAPITALIZE:REPLACE_ALL((-)/_):Param_Types_@
@@END_IF@@
@@END_TABLE@@
@@END_INLINE@@
@@END_INLINE@@
@@ELSE@@
procedure @_CAPITALIZE:Name_@ procedure @_CAPITALIZE:Name_@
@@INLINE(\()(; )(\))@@ @@END_IF@@
@@TABLE@@ with Export,
@@IF@@ @_Param_Directions_@ = "PARAM_IN" Convention => C,
@_Param_Names_@ : in out asn1Scc@_CAPITALIZE:REPLACE_ALL((-)/_):Param_Types_@ Link_Name => "@_LOWER:Parent_Function_@_PI_@_Name_@";
@@ELSE@@
@_Param_Names_@ : out asn1Scc@_CAPITALIZE:REPLACE_ALL((-)/_):Param_Types_@
@@END_IF@@
@@END_TABLE@@
@@END_INLINE@@
@@END_INLINE@@
@@ELSE@@
procedure @_CAPITALIZE:Name_@
@@END_IF@@
@@IF@@ @_Direction_@ = "PI"
with Export,
Convention => C,
Link_Name => "@_LOWER:Parent_Function_@_PI_@_Name_@";
@@ELSE@@
with Import,
Convention => C,
Link_Name => "@_LOWER:Parent_Function_@_RI_@_Name_@";
@@-- procedure RIÜ@_CAPITALIZE:Name_@ renames @_CAPITALIZE:Name_@;
@@END_IF@@
@@END_IF@@ @@END_IF@@
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment