-
Key: XTCE13-176
-
Status: closed
-
Source: NASA ( Mr. James Kevin Rice)
-
Summary:
Maybe we should align with yamcs
initial value
Initial (default) value given to a parameter or command argument.
Note that this value can be overwritten for specific parameters, or command arguments using a column of the same name in the Commands and Parameters sheets.
The value must be understandable for the used engineering type.
For binary, use a hexadecimal notation.
For booleans, use a value of true or false.
For arrays, specify a value in JSON format: [-3, -2.4, 5].
For aggregates, specify a value in JSON format:
{member1: 1, member2: 2}.
-
Reported: XTCE 1.2 — Thu, 7 Nov 2024 16:04 GMT
-
Disposition: Resolved — XTCE 1.3
-
Disposition Summary:
Update annotation for initialValue
This proposal adds flexibility in the definition of initial values for Aggregate/Structure Member elements. In addition, it also adds a previously missing functionality to specify initial values for array elements.
Original definition of ArrayDataTypeType:
<complexType name="ArrayDataTypeType" abstract="true">
<annotation>
<documentation xml:lang="en">A base schema type for describing an array data type. The number of and size of each dimension is defined in its two child types. See NameReferenceType, ArrayArgumentType and ArrayParameterType.</documentation>
</annotation>
<complexContent>
<extension base="xtce:NameDescriptionType">
<attribute name="arrayTypeRef" type="xtce:NameReferenceType" use="required">
<annotation>
<documentation xml:lang="en">Reference to the data type that represents the type of the elements for this array.</documentation>
</annotation>
</attribute>
</extension>
</complexContent>
</complexType>Proposed new definition of ArrayDataTypeType:
(the only change is to add the initialValue attribute)
<complexType name="ArrayDataTypeType" abstract="true">
<annotation>
<documentation xml:lang="en">A base schema type for describing an array data type. The number of and size of each dimension is defined in its two child types. See NameReferenceType, ArrayArgumentType and ArrayParameterType.</documentation>
</annotation>
<complexContent>
<extension base="xtce:NameDescriptionType">
<attribute name="arrayTypeRef" type="xtce:NameReferenceType" use="required">
<annotation>
<documentation xml:lang="en">Reference to the data type that represents the type of the elements for this array.</documentation>
</annotation>
</attribute>
<attribute name="initialValue" type="string">
<annotation>
<documentation xml:lang="en">Initial values for the individual elements of the array may be provided here at the type definition using JSON style array notation (e.g. [1, 2, 3]). It may be multi-dimension, in which case the sequence matches the sequence of the Dimension elements in the DimensionList. When provided here, the initialValue attributes in the type definition specified in attribute arrayTypeRef are ignored.</documentation>
</annotation>
</attribute>
</extension>
</complexContent>
</complexType>Original definition of AggregateDataType:
<complexType name="AggregateDataType" abstract="true">
<annotation>
<documentation xml:lang="en">A base schema type for describing a complex data type analogous to a C-struct. Each field of the data type is called a Member. Each Member is part of the MemberList which forms the list of items to be placed under this data type's name. The MemberList defines a data block and block's size is defined by the DataEncodings of each Member's type reference. The data members are ordered and contiguous in the MemberList element (packed). Each member may be addressed by the dot syntax similar to C such as P.voltage if P is the referring parameter and voltage is of a member of P's aggregate type. See MemberType, MemberListType, DataEncodingType, NameReferenceType, AggregateParameterType and AggregateArgumentType.</documentation>
</annotation>
<complexContent>
<extension base="xtce:NameDescriptionType">
<sequence>
<element name="MemberList" type="xtce:MemberListType">
<annotation>
<documentation xml:lang="en">Ordered list of the members of the aggregate/structure. Members are contiguous.</documentation>
</annotation>
</element>
</sequence>
</extension>
</complexContent>
</complexType>Proposed new definition of AggregateDataType:
(the only change is to add the initialValue attribute)
<complexType name="AggregateDataType" abstract="true">
{ "member1": 2, "member2": "foo" }
<annotation>
<documentation xml:lang="en">A base schema type for describing a complex data type analogous to a C-struct. Each field of the data type is called a Member. Each Member is part of the MemberList which forms the list of items to be placed under this data type's name. The MemberList defines a data block and block's size is defined by the DataEncodings of each Member's type reference. The data members are ordered and contiguous in the MemberList element (packed). Each member may be addressed by the dot syntax similar to C such as P.voltage if P is the referring parameter and voltage is of a member of P's aggregate type. See MemberType, MemberListType, DataEncodingType, NameReferenceType, AggregateParameterType and AggregateArgumentType.</documentation>
</annotation>
<complexContent>
<extension base="xtce:NameDescriptionType">
<sequence>
<element name="MemberList" type="xtce:MemberListType">
<annotation>
<documentation xml:lang="en">Ordered list of the members of the aggregate/structure. Members are contiguous.</documentation>
</annotation>
</element>
</sequence>
<attribute name="initialValue" type="string">
<annotation>
<documentation xml:lang="en">Initial values for the individual members of the aggregate/structure may be provided here at the type definition using JSON style notation (e.g. ''). When Member elements provide initialValue attributes, they take precedence over these since these are at the type definition level and the Member element acts like a Parameter element. These may also recurse into members that are also aggregates.</documentation>
</annotation>
</attribute>
</extension>
</complexContent>
</complexType>Now with the type definition side done, the ParameterType and ArgumentType elements need updates as well.
Original definition of ParameterType:
<complexType name="ParameterType">
<annotation>
<documentation xml:lang="en">Describe the properties of a telemetry parameter, including its data type (parameter type). The bulk of properties associated with a telemetry parameter are in its parameter type. The initial value specified here, overrides the initial value in the parameter type. A parameter may be local, in which case its parameter type would have no data encodings. Ideally such a definition would also set data source in parameter properties to "local" but the syntax does not enforce this. See BaseDataType, BaseTimeDataType, and NameReferenceType.</documentation>
</annotation>
<complexContent>
<extension base="xtce:NameDescriptionType">
<sequence>
<element name="ParameterProperties" type="xtce:ParameterPropertiesType" minOccurs="0">
<annotation>
<documentation xml:lang="en">Specify additional properties for this Parameter used by the implementation of tailor the behavior and attributes of the Parameter. When not specified, the defaults on the ParameterProperties element attributes are assumed.</documentation>
</annotation>
</element>
</sequence>
<attribute name="parameterTypeRef" type="xtce:NameReferenceType" use="required">
<annotation>
<documentation xml:lang="en">Specify the reference to the parameter type from the ParameterTypeSet area using the path reference rules, either local to this SpaceSystem, relative, or absolute.</documentation>
</annotation>
</attribute>
<attribute name="initialValue" type="string" use="optional">
<annotation>
<documentation xml:lang="en">Specify as: integer data type using xs:integer, float data type using xs:double, string data type using xs:string, boolean data type using xs:boolean, binary data type using xs:hexBinary, enum data type using label name, relative time data type using xs:duration, absolute time data type using xs:dateTime. Values must not exceed the characteristics for the data type or this is a validation error. Takes precedence over an initial value given in the data type. Values are calibrated unless there is an option to override it.</documentation>
<appinfo>The value type must match the Parameter type</appinfo>
</annotation>
</attribute>
</extension>
</complexContent>
</complexType>Proposed new definition of ParameterType:
(Only the initialValue attribute documentation changed)
<complexType name="ParameterType">
{"member1": 1, "member2": "foo"}
<annotation>
<documentation xml:lang="en">Describe the properties of a telemetry parameter, including its data type (parameter type). The bulk of properties associated with a telemetry parameter are in its parameter type. The initial value specified here, overrides the initial value in the parameter type. A parameter may be local, in which case its parameter type would have no data encodings. Ideally such a definition would also set data source in parameter properties to "local" but the syntax does not enforce this. See BaseDataType, BaseTimeDataType, and NameReferenceType.</documentation>
</annotation>
<complexContent>
<extension base="xtce:NameDescriptionType">
<sequence>
<element name="ParameterProperties" type="xtce:ParameterPropertiesType" minOccurs="0">
<annotation>
<documentation xml:lang="en">Specify additional properties for this Parameter used by the implementation of tailor the behavior and attributes of the Parameter. When not specified, the defaults on the ParameterProperties element attributes are assumed.</documentation>
</annotation>
</element>
</sequence>
<attribute name="parameterTypeRef" type="xtce:NameReferenceType" use="required">
<annotation>
<documentation xml:lang="en">Specify the reference to the parameter type from the ParameterTypeSet area using the path reference rules, either local to this SpaceSystem, relative, or absolute.</documentation>
</annotation>
</attribute>
<attribute name="initialValue" type="string" use="optional">
<annotation>
<documentation xml:lang="en">Specify as: integer data type using xs:integer, float data type using xs:double, string data type using xs:string, boolean data type using xs:boolean, binary data type using xs:hexBinary, enum data type using label name, relative time data type using xs:duration, absolute time data type using xs:dateTime, arrays using JSON syntax (e.g. '[1, 3, 4]', and aggregates using JSON syntax '' ). Values must not exceed the characteristics for the data type or this is a validation error. Takes precedence over an initial value given in the data type. Values are calibrated unless there is an option to override it.</documentation>
<appinfo>The value type must match the Parameter type</appinfo>
</annotation>
</attribute>
</extension>
</complexContent>
</complexType>Original definition of ArgumentType:
<complexType name="ArgumentType">
<annotation>
<documentation xml:lang="en">An Argument has a name and can take on values with the underlying value type described by the ArgumentTypeRef. Describe the properties of a command argument referring to a data type (argument type). The bulk of properties associated with a command argument are in its argument type. The initial value specified here, overrides the initial value in the argument type. See BaseDataType, BaseTimeDataType and NameReferenceType.</documentation>
</annotation>
<complexContent>
<extension base="xtce:NameDescriptionType">
<attribute name="argumentTypeRef" type="xtce:NameReferenceType" use="required">
<annotation>
<documentation xml:lang="en">Specify the reference to the argument type from the ArgumentTypeSet area using the path reference rules, either local to this SpaceSystem, relative, or absolute.</documentation>
</annotation>
</attribute>
<attribute name="initialValue" type="string">
<annotation>
<documentation xml:lang="en">Specify as: integer data type using xs:integer, float data type using xs:double, string data type using xs:string, boolean data type using xs:boolean, binary data type using xs:hexBinary, enum data type using label name, relative time data type using xs:duration, absolute time data type using xs:dateTime. Values must not exceed the characteristics for the data type or this is a validation error. Takes precedence over an initial value given in the data type. Values are calibrated unless there is an option to override it.</documentation>
<appinfo>The value type must match the Argument type</appinfo>
</annotation>
</attribute>
</extension>
</complexContent>
</complexType>Proposed new definition of ArgumentType:
(Only the initialValue attribute documentation changed)
<complexType name="ArgumentType">
{"member1": 1, "member2": "foo"}
<annotation>
<documentation xml:lang="en">An Argument has a name and can take on values with the underlying value type described by the ArgumentTypeRef. Describe the properties of a command argument referring to a data type (argument type). The bulk of properties associated with a command argument are in its argument type. The initial value specified here, overrides the initial value in the argument type. See BaseDataType, BaseTimeDataType and NameReferenceType.</documentation>
</annotation>
<complexContent>
<extension base="xtce:NameDescriptionType">
<attribute name="argumentTypeRef" type="xtce:NameReferenceType" use="required">
<annotation>
<documentation xml:lang="en">Specify the reference to the argument type from the ArgumentTypeSet area using the path reference rules, either local to this SpaceSystem, relative, or absolute.</documentation>
</annotation>
</attribute>
<attribute name="initialValue" type="string">
<annotation>
<documentation xml:lang="en">Specify as: integer data type using xs:integer, float data type using xs:double, string data type using xs:string, boolean data type using xs:boolean, binary data type using xs:hexBinary, enum data type using label name, relative time data type using xs:duration, absolute time data type using xs:dateTime, arrays using JSON syntax (e.g. '[1, 3, 4]', and aggregates using JSON syntax '' ). Values must not exceed the characteristics for the data type or this is a validation error. Takes precedence over an initial value given in the data type. Values are calibrated unless there is an option to override it.</documentation>
<appinfo>The value type must match the Argument type</appinfo>
</annotation>
</attribute>
</extension>
</complexContent>
</complexType> -
Updated: Tue, 1 Jul 2025 15:05 GMT
XTCE13 — Yamcs supports json syntax for array and aggregate parameter/args initial value
- Key: XTCE13-176
- OMG Task Force: XML Telemetric & Command Exchange Format 1.3 (XTCE) RTF