The SCADE mappers are stored in files scade5_A_mapper.py
and scade6_A_mapper.py
.
Only minor differences exist between the two mappers, to accomodate for some type-specific
changes introduced in SCADE6.
All type declarations are placed in a System_Types
SCADE package.
- BOOLEANs are mapped to
bool
s.
- INTEGERs are mapped to
int
s.
- REALs are mapped to
real
s.
- Any ENUMERATED is mapped as a SCADE enumeration (with the possible value for the
option enclosed in brackets, after the option name).
- SEQUENCEs are mapped to compound SCADE structures (defined by opening and closing
braces in SCADE6, or opening and closing brackets in SCADE5). The field names used
are the same ones as those used in the ASN.1 grammar, with any non-alphanumeric character
changed into '
_
'.
- CHOICEs are handled just like SEQUENCEs, but with an extra field (
choiceIdx
of type int
that denotes which option is actually used in the
Choice (the index starts at 1 for the first option).
- SEQUENCE OFs are mapped using the '
^
' syntax, adding the cardinality immediately
after the carret (taken from the maximum size contraint of the SEQUENCE OF).
- SETs and SET OFs are handled just as SEQUENCE and SEQUENCE OFs.