-
Notifications
You must be signed in to change notification settings - Fork 76
/
strings-tm.xml
163 lines (152 loc) · 6.37 KB
/
strings-tm.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="xtce_template.xsl"?>
<!--
This file contains several examples on how to define string parameters with yamcs
-->
<xtce:SpaceSystem name="StringsTm" xmlns:xtce="http://www.omg.org/spec/XTCE/20180204" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.omg.org/spec/XTCE/20180204 https://www.omg.org/spec/XTCE/20180204/SpaceSystem.xsd" shortDescription="Testing Yamcs XTCE processing" operationalStatus="unittest">
<xtce:TelemetryMetaData>
<xtce:ParameterTypeSet>
<!-- null terminated string in fixed size buffer
The string is maximum 6 bytes long;
If it is maximum size the terminator will not be present. -->
<xtce:StringParameterType name="string1">
<xtce:StringDataEncoding encoding="UTF-8">
<xtce:SizeInBits>
<xtce:Fixed>
<xtce:FixedValue>48</xtce:FixedValue>
</xtce:Fixed>
<xtce:TerminationChar>00</xtce:TerminationChar>
</xtce:SizeInBits>
</xtce:StringDataEncoding>
</xtce:StringParameterType>
<!-- Fixed size string in fixed size buffer.
The string is always 6 bytes long. -->
<xtce:StringParameterType name="string2">
<xtce:StringDataEncoding encoding="UTF-8">
<xtce:SizeInBits>
<xtce:Fixed>
<xtce:FixedValue>48</xtce:FixedValue>
</xtce:Fixed>
</xtce:SizeInBits>
</xtce:StringDataEncoding>
</xtce:StringParameterType>
<!-- Null terminated string in undefined buffer.
The terminator is mandatory in this case.
The buffer is effectively as long as the string + terminator
The maxSizeInBits refers to the size of the buffer, so the maximum size of the string is 5.
Note the _yamcs_ignore parameter reference which is used to workaround XTCE mandating a dynamic value
-->
<xtce:StringParameterType name="string3">
<xtce:StringDataEncoding encoding="UTF-8">
<xtce:Variable maxSizeInBits="48">
<xtce:DynamicValue>
<xtce:ParameterInstanceRef parameterRef="_yamcs_ignore" />
</xtce:DynamicValue>
<xtce:TerminationChar>00</xtce:TerminationChar>
</xtce:Variable>
</xtce:StringDataEncoding>
</xtce:StringParameterType>
<!-- prefixed size string in buffer whose size is given by another parameter -->
<xtce:StringParameterType name="string4">
<xtce:StringDataEncoding encoding="UTF-8">
<xtce:Variable maxSizeInBits="48">
<xtce:DynamicValue>
<xtce:ParameterInstanceRef parameterRef="uint16_param2" />
<xtce:LinearAdjustment slope="8" />
</xtce:DynamicValue>
<xtce:LeadingSize sizeInBitsOfSizeTag="8" />
</xtce:Variable>
</xtce:StringDataEncoding>
</xtce:StringParameterType>
<!-- prefixed size string in undefined buffer.
The buffer is effectively as long as the prefix + string.
The maxSizeInBits refers to the size of the buffer, so the maximum size of the string is 4.
Note the _yamcs_ignore parameter reference which is used to workaround XTCE mandating a dynamic value
-->
<xtce:StringParameterType name="string5">
<xtce:StringDataEncoding encoding="UTF-8">
<xtce:Variable maxSizeInBits="48">
<xtce:DynamicValue>
<xtce:ParameterInstanceRef parameterRef="_yamcs_ignore" />
</xtce:DynamicValue>
<xtce:LeadingSize sizeInBitsOfSizeTag="16" />
</xtce:Variable>
</xtce:StringDataEncoding>
</xtce:StringParameterType>
<!-- string in buffer whose size is given by another parameter -->
<xtce:StringParameterType name="string6">
<xtce:StringDataEncoding encoding="UTF-8">
<xtce:Variable maxSizeInBits="48">
<xtce:DynamicValue>
<xtce:ParameterInstanceRef parameterRef="uint16_param2" />
<xtce:LinearAdjustment slope="8" />
</xtce:DynamicValue>
</xtce:Variable>
</xtce:StringDataEncoding>
</xtce:StringParameterType>
<xtce:IntegerParameterType signed="false" name="uint16">
<xtce:IntegerDataEncoding encoding="unsigned" sizeInBits="16" />
</xtce:IntegerParameterType>
</xtce:ParameterTypeSet>
<xtce:ParameterSet>
<xtce:Parameter name="string1" parameterTypeRef="string1" />
<xtce:Parameter name="string2" parameterTypeRef="string2" />
<xtce:Parameter name="string3" parameterTypeRef="string3" />
<xtce:Parameter name="string4" parameterTypeRef="string4" />
<xtce:Parameter name="string5" parameterTypeRef="string5" />
<xtce:Parameter name="string6" parameterTypeRef="string6" />
<xtce:Parameter name="uint16_param1" parameterTypeRef="uint16" />
<xtce:Parameter name="uint16_param2" parameterTypeRef="uint16" />
</xtce:ParameterSet>
<xtce:ContainerSet>
<xtce:SequenceContainer name="packet1">
<xtce:EntryList>
<xtce:ParameterRefEntry parameterRef="string1" />
<xtce:ParameterRefEntry parameterRef="uint16_param1" />
</xtce:EntryList>
</xtce:SequenceContainer>
<xtce:SequenceContainer name="packet2">
<xtce:EntryList>
<xtce:ParameterRefEntry parameterRef="string2" />
<xtce:ParameterRefEntry parameterRef="uint16_param1" />
</xtce:EntryList>
</xtce:SequenceContainer>
<xtce:SequenceContainer name="packet3">
<xtce:EntryList>
<xtce:ParameterRefEntry parameterRef="string3" />
<xtce:ParameterRefEntry parameterRef="uint16_param1" />
</xtce:EntryList>
</xtce:SequenceContainer>
<xtce:SequenceContainer name="packet4">
<xtce:EntryList>
<xtce:ParameterRefEntry parameterRef="uint16_param2" />
<xtce:ParameterRefEntry parameterRef="string4" />
<xtce:ParameterRefEntry parameterRef="uint16_param1" />
</xtce:EntryList>
</xtce:SequenceContainer>
<xtce:SequenceContainer name="packet5">
<xtce:EntryList>
<xtce:ParameterRefEntry parameterRef="string5" />
<xtce:ParameterRefEntry parameterRef="uint16_param1" />
</xtce:EntryList>
</xtce:SequenceContainer>
<xtce:SequenceContainer name="packet6">
<xtce:EntryList>
<xtce:ParameterRefEntry parameterRef="uint16_param2" />
<xtce:ParameterRefEntry parameterRef="string6" />
<xtce:ParameterRefEntry parameterRef="uint16_param1" />
</xtce:EntryList>
</xtce:SequenceContainer>
</xtce:ContainerSet>
</xtce:TelemetryMetaData>
<xtce:CommandMetaData>
<xtce:ArgumentTypeSet>
<xtce:IntegerArgumentType name="uint16"></xtce:IntegerArgumentType>
</xtce:ArgumentTypeSet>
<xtce:MetaCommandSet>
<xtce:MetaCommand name="cmd1">
</xtce:MetaCommand>
</xtce:MetaCommandSet>
</xtce:CommandMetaData>
</xtce:SpaceSystem>