Definitions.xid.xml
18.3 KB
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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright (c) 2018, TeleCommunication Systems, Inc.,
a wholly-owned subsidiary of Comtech Telecommunications Corp.
and/or affiliates of TeleCommunication Systems, Inc.
All rights reserved.
TeleCommunication Systems, Inc. PROPRIETARY/CONFIDENTIAL.
Use is subject to license terms included in the distribution.
-->
<specification xmlns="https://xid.location.studio/schema/V1.0.0/XtensibleInterfaceDefinition.xsd"
xmlns:xid="https://xid.location.studio/schema/V1.0.0/XtensibleInterfaceDefinition.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://xid.location.studio/schema/V1.0.0/XtensibleInterfaceDefinition.xsd https://xid.location.studio/schema/V1.0.0/XtensibleInterfaceDefinition.xsd"
identity="Definitions.xid.xml">
<title>Tensor Defitions</title>
<comment>
Defines fundamental type mappings.
</comment>
<tag name="package" value="com.comtechtel"/>
<namespace name="Tensor">
<type name="void" size="0">
<comment>represents nothing. <br/>Useful in <operation> with no <input></comment>
<lang name="c" type="void"/>
<lang name="cpp" type="void"/>
<lang name="java" type="void"/>
<lang name="node" type="void"/>
</type>
<type name="bool" size="1">
<comment>represents true/false</comment>
<lang name="c" type="bool" include="stdbool.h"/>
<lang name="cpp" type="bool"/>
<lang name="java" type="XidBool" include="com.comtechtel.tensor.xid.XidBool"/>
<lang name="node" type="XidBool"/>
</type>
<type name="uint8" size="1">
<comment>8-bit, unsigned value</comment>
<lang name="c" type="uint8_t" include="stdint.h"/>
<lang name="cpp" type="uint8_t" include="cstdint"/>
<lang name="java" type="XidByte" include="com.comtechtel.tensor.xid.XidByte" />
<lang name="node" type="XidUInt8"/>
</type>
<type name="uint16" size="2">
<comment>16-bit, unsigned value</comment>
<lang name="c" type="uint16_t" include="stdint.h"/>
<lang name="cpp" type="uint16_t" include="cstdint"/>
<lang name="java" type="XidShort" include="com.comtechtel.tensor.xid.XidShort"/>
<lang name="node" type="XidUShort"/>
</type>
<type name="uint24" size="3">
<comment>24-bit, unsigned value</comment>
<lang name="c" type="uint24_t" include="Tensor/CXMF/int24.h"/>
<lang name="cpp" type="uint24_t" include="Tensor/Types/int24.h"/>
<lang name="java" type="XidInt24" include="com.comtechtel.tensor.xid.XidInt24"/>
<lang name="node" type="XidUInt24"/>
</type>
<type name="uint32" size="4">
<comment>32-bit, unsigned value</comment>
<lang name="c" type="uint32_t" include="stdint.h"/>
<lang name="cpp" type="uint32_t" include="cstdint"/>
<lang name="java" type="XidInt" include="com.comtechtel.tensor.xid.XidInt"/>
<lang name="node" type="XidUInt"/>
</type>
<type name="uint64" size="8">
<comment>64-bit, unsigned value</comment>
<lang name="c" type="uint64_t" include="stdint.h"/>
<lang name="cpp" type="uint64_t" include="cstdint"/>
<lang name="java" type="XidLong" include="com.comtechtel.tensor.xid.XidLong"/>
<lang name="node" type="XidULong"/>
</type>
<type name="int8" size="1">
<comment>8-bit, signed value</comment>
<lang name="c" type="int8_t" include="stdint.h"/>
<lang name="cpp" type="int8_t" include="cstdint"/>
<lang name="java" type="XidByte" include="com.comtechtel.tensor.xid.XidByte"/>
<lang name="node" type="XidInt8"/>
</type>
<type name="int16" size="2">
<comment>16-bit, signed value</comment>
<lang name="c" type="int16_t" include="stdint.h"/>
<lang name="cpp" type="int16_t" include="cstdint"/>
<lang name="java" type="XidShort" include="com.comtechtel.tensor.xid.XidShort" />
<lang name="node" type="XidShort"/>
</type>
<type name="int24" size="3">
<comment>24-bit, unsigned value</comment>
<lang name="c" type="int24_t" include="Tensor/CXMF/int24.h"/>
<lang name="cpp" type="int24_t" include="Tensor/Types/int24.h"/>
<lang name="java" type="XidInt24" include="com.comtechtel.tensor.xid.XidInt24"/>
<lang name="node" type="XidInt24"/>
</type>
<type name="int32" size="4">
<comment>32-bit, signed value</comment>
<lang name="c" type="int32_t" include="stdint.h"/>
<lang name="cpp" type="int32_t" include="cstdint"/>
<lang name="java" type="XidInt" include="com.comtechtel.tensor.xid.XidInt"/>
<lang name="node" type="XidInt"/>
</type>
<type name="int64" size="8">
<comment>64-bit, signed value</comment>
<lang name="c" type="int64_t" include="stdint.h"/>
<lang name="cpp" type="int64_t" include="cstdint"/>
<lang name="java" type="XidLong" include="com.comtechtel.tensor.xid.XidLong"/>
<lang name="node" type="XidLong"/>
</type>
<!--
<type name="float16" size="4">
<comment>32-bit, IEEE 754 binary16</comment>
<comment>C/cpp usually a "float"</comment>
<artifact>https://wikipedia.org/wiki/Half-precision_floating-point_format</artifact>
</type>
-->
<type name="float32" size="4">
<comment>32-bit, IEEE 754 binary32</comment>
<artifact>https://wikipedia.org/wiki/Single-precision_floating-point_format</artifact>
<lang name="c" type="float"/>
<lang name="cpp" type="float"/>
<lang name="java" type="XidFloat" include="com.comtechtel.tensor.xid.XidFloat"/>
<lang name="node" type="XidFloat"/>
</type>
<type name="float64" size="8">
<comment>64-bit, IEEE 754 binary64</comment>
<artifact>https://wikipedia.org/wiki/Double-precision_floating-point_format</artifact>
<lang name="c" type="double"/>
<lang name="cpp" type="double"/>
<lang name="java" type="XidDouble" include="com.comtechtel.tensor.xid.XidDouble"/>
<lang name="node" type="XidDouble"/>
</type>
<!--
<type name="float128" size="8">
<comment>128-bit, IEEE 754 binary128</comment>
<artifact>https://wikipedia.org/wiki/Quadruple-precision_floating-point_format</artifact>
<lang name="cpp" type="long double"/>
</type>
-->
<type name="byte" size="1">
<comment>A single byte</comment>
<lang name="c" type="uint8_t" include="stdint.h"/>
<lang name="cpp" type="uint8_t" include="cstdint"/>
<lang name="java" type="XidByte" include="com.comtechtel.tensor.xid.XidByte"/>
<lang name="node" type="XidUInt8"/>
</type>
<type name="raw">
<comment>Variable sized collection of bytes</comment>
<!-- may change this type -->
<lang name="c" type="CXMFString" include="Tensor/CXMF/CXMFString.h"/>
<lang name="cpp" type="::Tensor::XMF::Atom" include="Tensor/XMF/Atom.h"/>
<lang name="java" type="XidRaw" include="com.comtechtel.tensor.xid.XidRaw"/>
<lang name="node" type="Atom"/>
</type>
<type name="string">
<comment>Variable sized collection of characters</comment>
<lang name="c" type="CXMFString" include="Tensor/CXMF/CXMFString.h"/>
<lang name="cpp" type="std::string" include="string"/>
<lang name="java" type="XidString" include="com.comtechtel.tensor.xid.XidString"/>
<lang name="node" type="XidString"/>
</type>
<type name="datetime" size="8">
<comment>
nanoseconds since Jan 1, 1970 UTC.
ISO-8601 for string formats (e.g. JSON).
</comment>
<artifact>https://www.iso.org/standard/40874.html</artifact>
<artifact>https://wikipedia.org/wiki/ISO_8601</artifact>
<artifact>https://xkcd.com/1179</artifact>
<lang name="c" type="uint64_t" include="stdint.h"/>
<lang name="cpp" type="::Tensor::Types::DateTime" include="Tensor/Types/DateTime.h"/>
<lang name="java" type="XidDateTime" include="com.comtechtel.tensor.xid.XidDateTime"/>
<lang name="node" type="XidDateTime"/>
</type>
<type name="UUID" size="16">
<comment>16 byte UUID.</comment>
<artifact>https://wikipedia.org/wiki/Universally_unique_identifier</artifact>
<lang name="c" type="UUID" include="Tensor/CXMF/uuid.h"/>
<lang name="cpp" type="::Tensor::Types::UUID" include="Tensor/Types/uuid.h"/>
<lang name="java" type="XidUuid" include="com.comtechtel.tensor.xid.XidUuid"/>
<lang name="node" type="XidUuid"/>
</type>
<type name="uri">
<comment>Standard Universal Resource Identifier (URI)</comment>
<tag name="TODO" value="Define uri as a custom type. Use string for now."/>
<lang name="c" type="CXMFString" include="Tensor/CXMF/CXMFString.h"/>
<lang name="cpp" type="std::string" include="string"/>
<lang name="java" type="XidString" include="com.comtechtel.tensor.xid.XidString"/>
<lang name="node" type="XidString"/>
</type>
<type name="json">
<comment>JSON formatted/encoded string</comment>
<lang name="c" type="CXMFString" include="Tensor/CXMF/CXMFString.h"/>
<lang name="cpp" type="::Tensor::JSON::JSONObj" include="Tensor/JSON/TensorJSON.h"/>
<lang name="java" type="XidJSON" include="com.comtechtel.tensor.xid.XidJSON"/>
<lang name="node" type="XidString"/>
</type>
<type name="xmf">
<comment>XMF formatted/encoded data, this is straight XMF in XMF formatted data, and base64 encoded binary XMF in JSON formatted data. </comment>
<lang name="c" type="CAtom" include="Tensor/CXMF/CXMF.h"/>
<lang name="cpp" type="::Tensor::XMF::Atom" include="Tensor/XMF/Atom.h"/>
<lang name="java" type="Atom" include="com.comtechtel.tensor.xmf.Atom"/>
<lang name="node" type="Atom"/>
</type>
<type name="mac48" size="6">
<artifact>https://wikipedia.org/wiki/MAC_address</artifact>
<comment>6 byte IEEE MAC-48</comment>
<lang name="c" type="MacAddress48" include="Tensor/CXMF/MacAddress48.h"/>
<lang name="cpp" type="::Tensor::Types::MacAddress48" include="Tensor/Types/MacAddress48.h"/>
<lang name="java" type="XidMacAddress48" include="com.comtechtel.tensor.xid.XidMacAddress48"/>
<lang name="node" type="XidMacAddress48"/>
</type>
<!--
*******************************************************
Encoding Data Types
*******************************************************
-->
<!-- Encoding format type spec.-->
<type name="EncodingFormat" size="2">
<comment>
The encoding format determines how element data is run-time encoded within a particular element independent of the
transport encoding.
These values are specified in the "encoding" attribute for elements. Not all encoding formats
are supported by every wireline protocol implementation. Additionally, custom encodings may be
defined to support application defined encodings. Any non-standard encodings must be registered (to avoid collision)
and approved by the appropriate approving authority (e.g. Comtech). Values from 0 to 255 are reserved
for standard-encodings. Custom encodings start at 256(0x0100) and extend to 65535 (0xFFFF).\n
\n
This is not the same as defining in XID a raw datatype or json datatype which are NOT changeable are run-time.
\n
Example: \n
\t The message XMF but a field is defined to be encoded as JSON.\n
\t Likewise, the message is JSON, but a field is run-time encoded to be XMF.\n
\n
Data encoding format type. If 0, value is not encoded. See ResrvedEncodingFormats
for a list of standard format specifiers.
</comment>
<lang name="c" type="uint16_t" include="stdint.h" />
<lang name="cpp" type="uint16_t" include="cstdint" />
<lang name="java" type="XidShort" include="com.comtechtel.tensor.xid.XidShort" />
<lang name="node" type="XidUShort" />
</type>
<!-- ReservedEncodingFormats standard encoding formats.-->
<enum name="ReservedEncodingFormats" type="Tensor.uint16" default="natural">
<comment>
Reserved encoding formats define standard additional encodings known to all implementations.
</comment>
<literal name="natural" value="0">
<comment>
Data is not further encoded, it is in its natural wireline format.\n
This is the default value if not defined explicitly.
</comment>
</literal>
<literal name="raw" value="1">
<comment>
Data is in an unspecified binary format. The interpretation of the data is
falls to the producer and consumer of the information.
For textual wireline encodings like JSON, the data will be valid within the representation.
</comment>
</literal>
<literal name="xmf" value="2">
<comment>
Data is XMF binary format. The binary data is structured using atoms and atom lists.
For textual wireline encodings like JSON, this is XMF base64 encoded.
</comment>
</literal>
<literal name="json" value="3">
<comment>
Data is formatted as JSON compliant ascii text. For binary encodings like XMF, the content will be JSON instead.
</comment>
</literal>
</enum>
<!-- These types are not intended to be used in XID declarations. -->
<!-- They are used in XIDCG so that types are not hardcoded. -->
<!-- In theory, you can override "Atom",etc. with your our API compatible implementation,
renerate and have a completely different encoding support.
For instance, this can be used to define and encode TCAP BER.
-->
<type name="Atom">
<comment>Atom type XIDCG uses </comment>
<!-- may change this type -->
<!-- <lang name="c" type="CAtom" include="Tensor/CXMF/CXMF.h"/> -->
<lang name="c" type="CAtom" include="Tensor/CXMF/CXMF.h"/>
<lang name="cpp" type="::Tensor::XMF::Atom" include="Tensor/XMF/Atom.h"/>
<lang name="java" type="Atom" include="com.comtechtel.tensor.xmf.Atom"/>
<lang name="node" type="Atom"/>
</type>
<type name="AtomList">
<comment>AtomList type XIDCG uses </comment>
<!-- may change this type -->
<!-- <lang name="c" type="CAtomList" include="Tensor/CXMF/CXMF.h"/> -->
<lang name="c" type="CAtomList" include="Tensor/CXMF/CXMF.h"/>
<lang name="cpp" type="::Tensor::XMF::AtomList" include="Tensor/XMF/AtomList.h"/>
<lang name="java" type="AtomList" include="com.comtechtel.tensor.xmf.AtomList"/>
<lang name="node" type="AtomList"/>
</type>
<type name="PackedAtomList">
<comment>PackedAtomList type XIDCG uses </comment>
<!-- may change this type -->
<!-- <lang name="c" type="CPackedAtomList" include="Tensor/CXMF/CXMF.h"/> -->
<lang name="c" type="CPackedAtomList" include="Tensor/CXMF/CXMF.h"/>
<lang name="cpp" type="::Tensor::XMF::PackedAtomList" include="Tensor/XMF/PackedAtomList.h"/>
<lang name="java" type="PackedAtomList" include="com.comtechtel.tensor.xmf.PackedAtomList"/>
<lang name="node" type="PackedAtomList"/>
</type>
<type name="AtomListIterator">
<comment>AtomList type XIDCG uses </comment>
<!-- may change this type -->
<!-- <lang name="c" type="CAtomList" include="Tensor/CXMF/CXMF.h"/> -->
<lang name="c" type="CAtomListIterator" include="Tensor/CXMF/CXMF.h"/>
<lang name="cpp" type="::Tensor::XMF::AtomListIterator" include="Tensor/XMF/AtomList.h"/>
<lang name="java" type="AtomListIterator" include="com.comtechtel.tensor.xmf.AtomListIterator"/>
<lang name="node" type="AtomListIterator"/>
</type>
<type name="JSONObject">
<comment>JSONObject type XIDCG uses </comment>
<!-- may change this type -->
<!-- <lang name="c" type="" include=""/> -->
<lang name="cpp" type="::Tensor::JSON::JSONObj" include="Tensor/JSON/TensorJSON.h"/>
<lang name="java" type="JSONObject" include="com.comtechtel.tensor.json.JSONObject"/>
<!-- <lang name="node" type=""/> -->
</type>
<type name="JSONArray">
<comment>JSONArray type XIDCG uses </comment>
<!-- may change this type -->
<!-- <lang name="c" type="" include=""/> -->
<!-- <lang name="cpp" type="::Tensor::JSON::JSONObj" include="Tensor/JSON/TensorJSON.h"/> -->
<lang name="java" type="JSONArray" include="com.comtechtel.tensor.json.JSONArray"/>
<!-- <lang name="node" type=""/> -->
</type>
<type name="JSONException">
<comment>JSONException type XIDCG uses </comment>
<!-- may change this type -->
<!-- <lang name="c" type="" include=""/> -->
<!-- <lang name="cpp" type="::Tensor::JSON::JSONObj" include="Tensor/JSON/TensorJSON.h"/> -->
<lang name="java" type="JSONException" include="com.comtechtel.tensor.json.JSONException"/>
<!-- <lang name="node" type=""/> -->
</type>
</namespace>
</specification>