og_B_mapper.py
.
Combined with the work done inside buildSupport
, the mapper is responsible
for writing the code for the following macros (per ASN.1 Type):
DECODE_UPER_TypeName(pBuffer, iBufferSize, pSdlVar)
, with pBuffer
and iBufferSize pointing to the input buffer and input buffer size, respectively.
pSdlVar points to the ObjectGeode variable that will receive the data. The choice
between OSS and Semantix's compiler is done on the command line of aadl2glueC
(depending on the existence or absence of the argument -useOSS
).
DECODE_NATIVE_TypeName(pBuffer, iBufferSize, pSdlVar)
, with pBuffer
and iBufferSize pointing to the input buffer and input buffer size, respectively.
pSdlVar points to the ObjectGeode variable that will receive the data. Notice that
the data pointed to by pBuffer are in fact the memory dump of the corresponding
ASN1SCC generated data structures.
ENCODE_UPER_NAME(varName, param1)
, with
varName being the output buffer (declared with DECLARE
and DEFINE_Typename
,
see below) and param1 pointing to the source ObjectGeode variable.
ENCODE_NATIVE_NAME(varName, param1)
, with
varName being the output buffer (declared with DECLARE
and DEFINE_Typename
,
see below) and param1 pointing to the source ObjectGeode variable.
DECLARE_Typename(varName)
which translates to an appropriate
declaration for a buffer named varname
.
DEFINE_Typename(varName)
which translates to an appropriate
definition for a buffer named varname
.
vm_if.c
, hpostdef.h
and hpredef.h
. More specifically:
G2S_OUTPUT(...);
sdl_loop_FVNAME();
G2S_OUTPUT(...);
sdl_loop_FVNAME();
DEFINE_ASN1TYPENAME(name_of_variable)
must be issued, to reserve
space for the variable. The macro knows (by construction) what size to
reserve to accomodate the maximum configuration of this message.
Also, for each Required Interface used by the modeled APLC, this header file must also declare a C MACRO:
#define riname(param1, param2, ...)...which will: