See information about the latest product version
Message Sets: Importing from C (MRM): supported features
The C importer uses default values when mapping C data types to message model elements.
The following table shows how the C definitions influence the XML Schema settings in the message model. Some xsd types have '-' after the type. This character indicates that it is an anonymous simple type based on this type. For strings, the purpose of the anonymous type is to add a maximum length restriction; for numeric types, the purpose of the anonymous type is to add either a minimum or a maximum value restriction.
C data type | XML Schema data | Notes |
---|---|---|
Char | xsd:string- | maxlength=1 |
Char[10] | xsd:string- | maxlength=10 |
Char[10][3] | xsd:string- | maxlength=3 |
Char[10][3][6] | xsd:string- | maxlength=6 |
Unsigned Char | xsd:unsignedByte | |
Unsigned Char[2] | xsd:unsignedByte | maxOccurs=2 |
Signed Char | xsd:byte | |
Signed Char[2] | xsd:byte | maxOccurs=2 |
Int | xsd:int | |
Int[2] | xsd:int | maxOccurs=2 |
Int[2][3] | xsd:int | maxOccurs=6 |
Unsigned Int | xsd:unsignedInt | |
Short | xsd:short | |
Unsigned Short | xsd:unsignedShort | |
Long | xsd:int | |
Long Long Int | xsd:long | |
Float | xsd:float | |
Double | xsd:double | |
Long Double (see note 1) | xsd:double | |
<any pointer type> | xsd:hexBinary- | maxlength=(see note 2) |
<any enum> | (see note 3) |
The following table shows how C definitions influence the physical MRM CWF characteristics of the elements that are generated in the message model.
C data type | CWF Physical type | CWF Length characteristics | Other CWF characteristics |
---|---|---|---|
Char | Fixed Length | Length = 1 Length Units = Bytes |
|
Char[10] | Fixed Length | Length = 10 Length Units = Bytes |
Left justify |
Char[10][3] | Fixed Length | Length = 3 (and Max Occurs = 10) Length Units = bytes |
Left justify |
Char[10][3][6] | Fixed Length | Length =6 (and Max Occurs = 30) Length Units = bytes |
Left justify |
Unsigned Char | Integer | Length = 1 | Signed = no |
Unsigned Char[2] | Integer | Length = 1 (and Max Occurs = 2) |
Signed = no |
Signed Char | Integer | Length = 1 | Signed = yes |
Signed Char[2] | Integer | Length = 1 (and Max Occurs = 2) |
Signed = yes |
Int | Integer | Length = 4 | Signed = yes |
Int[2] | Integer | Length = 4 (and Max Occurs = 2) |
Signed = yes |
Int[2][3] | Integer | Length = 4 (and Max Occurs = 6) |
Signed = yes |
Unsigned Int | Integer | Length = 4 | Signed = no |
Short | Integer | Length = 2 | Signed = yes |
Unsigned Short | Integer | Length = 2 | Signed = no |
Long | Integer | Length = 4 (see note 4) | Signed = yes |
Long Long Int | Integer | Length = 8 | Signed = yes |
Float | Float | Length = 4 | |
Double | Float | Length = 8 | |
Long Double (see note 1) | Float | Length = 8 | |
<any pointer type> | (see note 2) | ||
<any enum> | Integer | (see note 3) |
- Do not set the value of C importer option size of long double to 128 bit. This option does not import successfully; use the default 64 bit.
- The length is affected by the Address Size C importer option:
- For 32 bit, CWF length = 4 bytes.
- For 64 bit, CWF length = 8 bytes.
- The type and length of an enum is affected by the Size of enum C
importer option:
- For 1: Logical type = xsd:byte, CWF physical type = Integer, CWF length = 1 byte.
- For 2: Logical type = xsd:short, CWF physical type = Integer, CWF length = 2 bytes.
- For 4: Logical type = xsd:int, CWF physical type = Integer, CWF length = 4 bytes.
- For Compact: The smallest representation is chosen that the enumeration fits into.
- The length of a long is affected by the Address Size C
importer option:
- For 32 bit: CWF length = 4 bytes.
- For 64 bit: CWF length = 8 bytes.
- Element names that clash with Java™ language keywords are modified by prefixing them with a single underscore character.
- The _Packed keyword is not supported. Only ANSI C declarations are supported.
- The C long long data type is not supported.
- C++ object oriented extensions are not supported. Only ANSI C declarations are supported.
- Pointers will be imported as xsd:integer with CWF length set to 4.
- Recursive C structures are not supported. If a nested structure contains a structure with a name that is the same as the parent structure, the import succeeds, but the logical definitions are not correct. To avoid this problem, ensure that the name of the nested structure is not the same as that of the outer or parent structure.