context_parameters.tmplt 1.27 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
@@-- Generate an ASN.1 module for context parameters
@@-- The following tags are available in this template:
@@--
@@-- @_Name_@           : Function name
@@-- @_Sort_Set_@       : Set of types used for this Context Parameter file
@@-- @_Module_Set_@     : ... corresponding module (needed for ASN.1 "IMPORTS")
@@-- @_CP_Name_@        : Table of context parameter names
@@-- @_CP_Sort_@        : ... corresponding ASN.1 type
@@-- @_CP_ASN1_Module_@ : ... in ASN.1 module
@@-- @_CP_Value_@       : ... with default value
Maxime Perrotin's avatar
Maxime Perrotin committed
11
Context-@_REPLACE_ALL(_/-):LOWER:Name_@ DEFINITIONS ::=
12 13 14 15
BEGIN
   IMPORTS
@@INLINE(      )(\n      )(;\n)@@
   @@TABLE@@
Maxime Perrotin's avatar
Maxime Perrotin committed
16
      @_REPLACE_ALL(_/-):Sort_Set_@ FROM @_REPLACE_ALL(_/-):Module_Set_@
17 18 19 20
   @@END_TABLE@@
@@END_INLINE@@

--  Group all context parameters of this function in a record
Maxime Perrotin's avatar
Maxime Perrotin committed
21
Context-@_REPLACE_ALL(_/-):LOWER:Name_@ ::= SEQUENCE {
22 23
@@INLINE(   )(,\n   )(\n)@@
   @@TABLE@@
Maxime Perrotin's avatar
Maxime Perrotin committed
24
      @_REPLACE_ALL((_)/-):LOWER:CP_Name_@ @_REPLACE_ALL(_/-):CP_Sort_@
25 26 27 28 29
   @@END_TABLE@@
@@END_INLINE@@
}

--  Declare a constant with the values set by the user in the interface view
Maxime Perrotin's avatar
Maxime Perrotin committed
30
@_REPLACE_ALL(_/-):LOWER:Name_@-ctxt Context-@_REPLACE_ALL(_/-):LOWER:Name_@ ::= {
31 32
@@INLINE(   )(,\n   )(\n)@@
   @@TABLE@@
Maxime Perrotin's avatar
Maxime Perrotin committed
33
      @_REPLACE_ALL(_/-):LOWER:CP_Name_@ @_CP_Value_@
34 35 36 37
   @@END_TABLE@@
@@END_INLINE@@
}
END