TensorCommon.xid
5.39 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
<?xml version="1.0" encoding="UTF-8" ?>
<specification xmlns="http://xid.location.studio/XID/XtensibleInterfaceDefinition.xsd"
xmlns:xid="http://xid.location.studio/XID/XtensibleInterfaceDefinition.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xid.location.studio/XID/XtensibleInterfaceDefinition.xsd XtensibleInterfaceDefinition.xsd"
identity="TensorCommmon.xid">
<title>Tensor Commmon Defitions</title>
<comment></comment>
<artifact></artifact>
<import ref="http://xid.location.studio/XID/TensorDefinitions.xid" local="TensorDefinitions.xid" />
<namespace name="Tensor">
<struct name="NameValue" >
<comment>A string base name value pair entry.</comment>
<elem name="name" type="Tensor.string"/>
<elem name="value" type="Tensor.string"/>
</struct>
<enum name="ResultCode" type="Tensor.int8" default="undefined">
<comment>General processing result codes.</comment>
<literal name="success" value="1"/>
<literal name="undefined" value="0"/>
<literal name="failure" value="-1" />
<literal name="busy" value="-2" />
<literal name="notprocesssed" value="-3"/>
</enum>
<struct name="VoidType">
<comment>Reserved type used in various translations to preserve translation. It has no purpose but as a placeholder.</comment>
<elem name="reserved" type="Tensor.uint16" multiplicity="1"/>
</struct>
<!--
************************************
* Command API Implementation
************************************
-->
<struct name="Command">
<comment>A TPF command structure compatible with the TPF Framework Commander Component.</comment>
<elem name="name" type="Tensor.string" multiplicity="1">
<comment>The command name including scope specifiers. Convention is to use a '.' as a scope separator
such as[component name].[command name].</comment>
</elem>
<elem name="etid" type="Tensor.string" multiplicity="0..1">
<comment>
Optional external transaction identifier for the caller to uniquely identify and track
the command and corresponding results.
</comment>
</elem>
<elem name="argument" type="NameValue" multiplicity="0..*">
<comment>
Each command may have zero or more arguments.
They may be name/value or oridinal/value arguments.
Both name and value are required.
</comment>
</elem>
</struct>
<struct name="CommandResponse">
<comment>
The command response structure containing information resulting from executing the
command (success or failure). Check the result code for details on status of executing the
command a value of 1 means success, value of 0 is undefined, See ResultCode for other standard
result codes. Each operation may define additional codes.
</comment>
<elem name="name" type="Tensor.string" multiplicity="1">
<comment>
The command name including scope specifiers. Convention is to use a '.' as a scope separator
such as[component name].[command name].
</comment>
</elem>
<elem name="result" type="Tensor.int8" multiplicity="1">
<comment>The processing result code. 1 is success, 0 is undefined, -1 is a failure.</comment>
</elem>
<elem name="etid" type="Tensor.string" multiplicity="0..1">
<comment>
Optional external transaction identifier for the caller to uniquely identify and track
the command and corresponding results.
</comment>
</elem>
<elem name="output" type="Tensor.string" multiplicity="0..1">
<comment>
Optional command output stored as a string. Interpeting the output data is dependent upon the
command function executed and what data formats are as an encodded string.
</comment>
</elem>
</struct>
<interface name="CommandApi">
<comment>Interface executing commands inside TPF Containers.</comment>
<operation name="Execute">
<comment>
Executes the specified command elements. Can specify whether to return responses (default true) or not using wantresponses.
</comment>
<input name="input" sid="0x0100">
<elem name="commands" multiplicity="1..*" type="Command"/>
<elem name="wantresponses" multiplicity="1" type="Tensor.bool" default="true"/>
</input>
<output name="output" sid="0x0101">
<elem name="lastcommand" type="Tensor.int8" multiplicity="1">
<comment>The index of the last command executed. If this is less than the total number of commands a failure occurred.</comment>
</elem>
<elem name="lastresult" type="Tensor.int8" multiplicity="1">
<comment>The last processing result code. 1 is success, 0 is undefined, -1 is a failure.</comment>
</elem>
<elem name="responses" type="CommandResponse" multiplicity="1..*">
<comment>A command response for each command executed.</comment>
</elem>
</output>
</operation>
</interface>
</namespace>
</specification>