View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003512 | 10000-006: Mappings | Spec | public | 2016-08-18 11:42 | 2016-12-06 17:40 |
Reporter | BjarneBostrom | Assigned To | randyarmstrong | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Summary | 0003512: Null encoding for Enumeration | ||||
Description | Spec ver 1.03 Part 6 section 5.2.3 states: "Enumerations are encoded as Int32 values." Some programming languages allows enums to have value null (e.g. in java enums are just a normal class with has a number of static members for each possible value of the enum, therefore a variable holding enum value can also be null). The spec should clearly define if a datatype cannot be null or define how null value should be encoded. In the case of Enumerations value '-1' could be used to indicate null value. However for backwards compatibility it might be better to just specify that Enumeration cannot be null (like integer types, although some programming languages have a null encoding for them too..). In case the Enumeration cannot be null, what should be used as a default value when the enumeration is part of a structure that would be null (section 5.2.3 in part 6 does state that "... the encoder shall create a new instance with default values for all fields and serialize that.")? Also as a sidenote the spec does not define starting value of enums (e.g. uamodeler seems to start from 0, which is the same as in many programming languages). While this may be obivious, in my opinion it should still be defined in the spec. | ||||
Tags | No tags attached. | ||||
Commit Version | |||||
Fix Due Date | |||||
|
add a table of built in types indicating if each is nullable. |
|
Added description to 1.04 DRAFT 09 An Enumeration does not have a NULL value. If the value of an Enumeration is not known the default value is 0. This may not always be a valid Enumeration value and decoders must map it to a suitable default if the the DevelopmentPlatform does not allow invalid values to be represented. |
|
Agreed to changes in telecon. |
Date Modified | Username | Field | Change |
---|---|---|---|
2016-08-18 11:42 | BjarneBostrom | New Issue | |
2016-08-30 15:41 | Jim Luth | Note Added: 0007161 | |
2016-08-30 15:41 | Jim Luth | Target Version | => 1.04 |
2016-08-30 15:42 | Jim Luth | Assigned To | => randyarmstrong |
2016-08-30 15:42 | Jim Luth | Status | new => assigned |
2016-12-04 21:39 | randyarmstrong | Note Added: 0007409 | |
2016-12-04 21:39 | randyarmstrong | Status | assigned => resolved |
2016-12-04 21:39 | randyarmstrong | Resolution | open => fixed |
2016-12-06 17:40 | Jim Luth | Note Added: 0007446 | |
2016-12-06 17:40 | Jim Luth | Status | resolved => closed |
2016-12-06 17:40 | Jim Luth | Fixed in Version | => 1.04 |