Added temporary specs to work with the design topology
Showing
2 changed files
with
476 additions
and
0 deletions
Logging/V1.0.0/Logging.xid
0 → 100644
1 | <?xml version="1.0" encoding="UTF-8" ?> | ||
2 | |||
3 | <specification xmlns="http://xid.location.studio/XID/XtensibleInterfaceDefinition.xsd" | ||
4 | xmlns:xid="http://xid.location.studio/XID/XtensibleInterfaceDefinition.xsd" | ||
5 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
6 | xsi:schemaLocation="http://xid.location.studio/XID/XtensibleInterfaceDefinition.xsd XtensibleInterfaceDefinition.xsd" | ||
7 | identity="Logging.xid"> | ||
8 | <title>Tensor Logging Messages</title> | ||
9 | <comment> | ||
10 | This file contains the base type definitions for logging messages and data. All ENT micro-service compliant systems shall support these datatypes | ||
11 | for capturing various types of logging information including actionable messages, trace, and usage data. Logging messages are polymorphic and extensible | ||
12 | as needed to support various types of information. | ||
13 | </comment> | ||
14 | |||
15 | <import ref="http://xid.location.studio/XID/TensorDefinitions.xid" local="TensorDefinitions.xid" /> | ||
16 | |||
17 | <namespace name="Logging"> | ||
18 | <using namespace="Tensor"/> | ||
19 | |||
20 | <!-- | ||
21 | ******************************************************* | ||
22 | Enumeration Definitions | ||
23 | ******************************************************* | ||
24 | --> | ||
25 | <enum name="MessageType" type="Tensor.uint8" default="undefined"> | ||
26 | <comment> | ||
27 | Message types define the base type identifiers for logging messages. These are used to | ||
28 | identify the type of logging data. The Message type is not a closed set and can be extended as needed. | ||
29 | The types defined here are common to every system. Type values below 64 are reserved for the core logging extensions | ||
30 | Any non-core message types should define type identifiers greater than 64. | ||
31 | </comment> | ||
32 | <literal name="undefined" value="0"> | ||
33 | <comment>Message type is not defined. This is a reserved value and should not be used in most situations.</comment> | ||
34 | </literal> | ||
35 | <literal name="ActionMsg" value="1"> | ||
36 | <comment>Defines a message that requires some responsive action. See Tensor.Logging.ActionMsg structure for more information.</comment> | ||
37 | </literal> | ||
38 | <literal name="TraceMsg" value="2"> | ||
39 | <comment>Defines a message capturing software trace data typically used for debugging. See Tensor.Logging.TraceMsg structure for more information.</comment> | ||
40 | </literal> | ||
41 | <literal name="UsageMsg" value="3"> | ||
42 | <comment>Defines a message for capturing usage data. See Tensor.Logging.UsageMsg for more information.</comment> | ||
43 | </literal> | ||
44 | <literal name="MetricMsg" value="4"> | ||
45 | <comment>Defines a message for capturing metric data. See Tensor.Logging.MetricMsg for more information.</comment> | ||
46 | </literal> | ||
47 | </enum> | ||
48 | |||
49 | <enum name="Severity" type="int8" default="indeterminate"> | ||
50 | <comment> | ||
51 | Severity is defined as part of an Tensor.Logging.ActionMsg describing the severity of the issue. This is an extensible list that can be added to as | ||
52 | new severities are determine. In general, try to use the core defined severities or add new core ones as needed. Custom severity should be avoided. If defined, | ||
53 | however, start with values > 64. Values less than 64 are reserved. | ||
54 | </comment> | ||
55 | <literal name="indeterminate" value="0"> | ||
56 | <comment>Severity of the issue is indeterminate.</comment> | ||
57 | </literal> | ||
58 | <literal name="warning" value="1"> | ||
59 | <comment> | ||
60 | Severity indicates message is a warning regarding the specified issue. Warnings describe a potental issue that | ||
61 | may require additional monitoring over time. However, it is not deemed as having a significant | ||
62 | impaction on system operation. | ||
63 | </comment> | ||
64 | </literal> | ||
65 | <literal name="minor" value="2"> | ||
66 | <comment> | ||
67 | Message is describing a minor issue, which requires some action. A | ||
68 | minor issue is something that does not have a wide scale impact on system operation. | ||
69 | For example a minor issue might be something that would affect a single transaction. | ||
70 | </comment> | ||
71 | </literal> | ||
72 | <literal name="major" value="3"> | ||
73 | <comment> | ||
74 | Message is describing a major issue, which requires action. A | ||
75 | major issue is something that affects the system in a signficant way | ||
76 | such as having impact on multiple transactions. | ||
77 | </comment> | ||
78 | </literal> | ||
79 | <literal name="critical" value="4"> | ||
80 | <comment> | ||
81 | Message is describing a critical issue, which requires immediate action. Critical issues | ||
82 | are typically catastrophic system issues affecting all transactions in a very significant way. | ||
83 | </comment> | ||
84 | </literal> | ||
85 | <literal name="cleared" value="5"> | ||
86 | <comment>Message is describing an issue has been resolved or no longer requires actions.</comment> | ||
87 | </literal> | ||
88 | </enum> | ||
89 | |||
90 | <enum name="Category" type="int8" default="processingError"> | ||
91 | <comment> | ||
92 | The category decribes the general category for an ActionMsg. This is an extensible list that can be added to as | ||
93 | new categories are needed. In general, try to use the core defined categories or add new ones as needed. Custom categories should start with | ||
94 | values > 64. Values less than 64 are reserved. | ||
95 | </comment> | ||
96 | <literal name ="undefined" value ="0"> | ||
97 | <comment>Action category is undefined or not known.</comment> | ||
98 | </literal> | ||
99 | <literal name="communications" value="1"> | ||
100 | <comment>A communications and/or networking related issue.</comment> | ||
101 | </literal> | ||
102 | <literal name="qualityOfService" value="2"> | ||
103 | <comment>A quality of service related issue.</comment> | ||
104 | </literal> | ||
105 | <literal name="processingError" value="3"> | ||
106 | <comment>A processing or runtime related issue.</comment> | ||
107 | </literal> | ||
108 | <literal name="equipment" value="4"> | ||
109 | <comment>An equipment related issue.</comment> | ||
110 | </literal> | ||
111 | <literal name="environmental" value="5"> | ||
112 | <comment>A environment related issue.</comment> | ||
113 | </literal> | ||
114 | </enum> | ||
115 | |||
116 | <enum name="TraceLevel" type="Tensor.int8" default="undefined"> | ||
117 | <comment>Trace level defines the level of tracing information reported. This allows for filtering of information based on rank.</comment> | ||
118 | <literal name="undefined" value="0"> | ||
119 | <comment>Trace level is not defined.</comment> | ||
120 | </literal> | ||
121 | <literal name="overview" value="1"> | ||
122 | <comment>Information contained in the trace message is high-level or summary.</comment> | ||
123 | </literal> | ||
124 | <literal name="trace" value="2"> | ||
125 | <comment>Information contained in the trace message is related to program flow and sequencing.</comment> | ||
126 | </literal> | ||
127 | <literal name="detail" value="3"> | ||
128 | <comment>Information contained in the trace message is detailed information.</comment> | ||
129 | </literal> | ||
130 | <literal name="debug" value="4"> | ||
131 | <comment>Information contained in the trace message contains debugging information.</comment> | ||
132 | </literal> | ||
133 | </enum> | ||
134 | |||
135 | <struct name="DebugInfo"> | ||
136 | <comment> | ||
137 | Structure captures the file and line number information for Trace Messages. This provides information about where the trace message was sent. | ||
138 | </comment> | ||
139 | <elem name="file" type="Tensor.string" multiplicity="1"> | ||
140 | <comment>File name where this message was logged.</comment> | ||
141 | </elem> | ||
142 | <elem name="line" type="Tensor.uint32" multiplicity="1"> | ||
143 | <comment>Line number in file where this message is logged.</comment> | ||
144 | </elem> | ||
145 | <elem name="thid" type="Tensor.uint64" multiplicity="1" default="0"> | ||
146 | <comment>Optional Thread ID, if not specified, default value is 0.</comment> | ||
147 | </elem> | ||
148 | |||
149 | </struct> | ||
150 | |||
151 | <!-- | ||
152 | ******************************************************* | ||
153 | Metric Structure Definitions | ||
154 | ******************************************************* | ||
155 | --> | ||
156 | |||
157 | <enum name="MetricType" type="Tensor.uint8" default="undefined"> | ||
158 | <literal name="undefined" value="0"> | ||
159 | <comment>Metric type is not defined. This is a reserved value and should not be used in most situations.</comment> | ||
160 | </literal> | ||
161 | <literal name="PegCount" value="1"> | ||
162 | <comment>Defines a simple monotonically incremented counter.</comment> | ||
163 | </literal> | ||
164 | <literal name="AppMetrics" value="2"> | ||
165 | <comment>Defines a complex metric measuring duration and concurrency.</comment> | ||
166 | </literal> | ||
167 | </enum> | ||
168 | |||
169 | <struct name="Metric"> | ||
170 | <elem name="metricType" type="MetricType" multiplicity="1" rttd="true"> | ||
171 | <comment>This specifies the type of the reported metric.</comment> | ||
172 | </elem> | ||
173 | <elem name="name" type="string" multiplicity="1"> | ||
174 | <comment>Name of the reported metric.</comment> | ||
175 | </elem> | ||
176 | </struct> | ||
177 | |||
178 | <struct name="PegCount" type="Metric" rttkey="Logging.MetricType.PegCount"> | ||
179 | <elem name="value" type="uint32" multiplicity="1"> | ||
180 | <comment>Value of peg count since last reporting.</comment> | ||
181 | </elem> | ||
182 | </struct> | ||
183 | |||
184 | <struct name="AppMetrics" type="Metric" rttkey="Logging.MetricType.AppMetrics"> | ||
185 | <elem name="totalCount" type="uint32" multiplicity="1"> | ||
186 | <comment>Total count of invocations since last reporting.</comment> | ||
187 | </elem> | ||
188 | <elem name="currentCount" type="uint32" multiplicity="1"> | ||
189 | <comment>concurrent invocations at time of reporting.</comment> | ||
190 | </elem> | ||
191 | <elem name="peakCount" type="uint32" multiplicity="1"> | ||
192 | <comment>Peak concurrent invocations since last reporting.</comment> | ||
193 | </elem> | ||
194 | <elem name="totalTime" type="uint64" multiplicity="1"> | ||
195 | <comment>Total time spent on invocations in nanoseconds since last reporting.</comment> | ||
196 | </elem> | ||
197 | <elem name="peakTime" type="uint64" multiplicity="1"> | ||
198 | <comment>Peak time for an invocation in nanoseconds since last reporting.</comment> | ||
199 | </elem> | ||
200 | <elem name="successCount" type="uint32" multiplicity="1"> | ||
201 | <comment>Count of successful invocations since last reporting.</comment> | ||
202 | </elem> | ||
203 | <elem name="failureCount" type="uint32" multiplicity="1"> | ||
204 | <comment>Count of failed invocations since last reporting.</comment> | ||
205 | </elem> | ||
206 | </struct> | ||
207 | |||
208 | |||
209 | |||
210 | <!-- | ||
211 | ******************************************************* | ||
212 | Message Structure Definitions | ||
213 | ******************************************************* | ||
214 | --> | ||
215 | |||
216 | <struct name="MessageBase"> | ||
217 | <comment> | ||
218 | Base type for all messages. This contains only the polymorphic type data. The structure Message derives from this | ||
219 | structure and provides common fields typically useful in logging related applications. Derive from this structure | ||
220 | if messages are related to logging but do not require the standard fields. It is recommended that most specializations | ||
221 | should start with Message as the base type. | ||
222 | </comment> | ||
223 | <elem name="type" type="MessageType" multiplicity="1" rttd="true"> | ||
224 | <comment> This specifies the type of message.</comment> | ||
225 | </elem> | ||
226 | <elem name="date" type="datetime" multiplicity="1"> | ||
227 | <comment>The date/time the message occured.</comment> | ||
228 | </elem> | ||
229 | <elem name="source" type="Tensor.uri" multiplicity="1"> | ||
230 | <comment>URI Identifying name of the component or process logging the message.</comment> | ||
231 | </elem> | ||
232 | <elem name="info" type="string" multiplicity="0..1"> | ||
233 | <comment>Optional free form string data.</comment> | ||
234 | </elem> | ||
235 | <elem name="data" type="Tensor.json" multiplicity="0..1"> | ||
236 | <comment>Optional structured data.</comment> | ||
237 | </elem> | ||
238 | <elem name="debug" type="DebugInfo" multiplicity="0..1"> | ||
239 | <comment>Optional debug information for message.</comment> | ||
240 | </elem> | ||
241 | </struct> | ||
242 | |||
243 | <!-- Message type --> | ||
244 | <struct name="TransactionMsg" type="MessageBase"> | ||
245 | <comment> | ||
246 | Basic logging message data common to all types of logging. This specializes MessageBase and is the standard logging message. Create custom message types as needed; however, consider | ||
247 | specializing from the core defined sub-types of ActionMsg, Trace, or Usage depending upon need. In most cases, you should not use this message directly. | ||
248 | </comment> | ||
249 | <elem name="tid" type="Tensor.UUID" multiplicity="1"> | ||
250 | <comment>Unique ID identifying the internal transaction related to the message.</comment> | ||
251 | </elem> | ||
252 | <elem name="etid" type="string" multiplicity="0..1"> | ||
253 | <comment>Optional externally defined transaction ID.</comment> | ||
254 | </elem> | ||
255 | <elem name="acctid" type="string" multiplicity="0..1"> | ||
256 | <comment>Optional externally defined account/group identifier.</comment> | ||
257 | </elem> | ||
258 | <elem name="devid" type="string" multiplicity="0..1"> | ||
259 | <comment>Optional externally defined device identifier.</comment> | ||
260 | </elem> | ||
261 | <elem name="appid" type="string" multiplicity="0..1"> | ||
262 | <comment>Optional externally defined application (or application key) identifier.</comment> | ||
263 | </elem> | ||
264 | |||
265 | </struct> | ||
266 | |||
267 | <!-- ActionMsg type --> | ||
268 | <struct name="ActionMsg" type="TransactionMsg" rttkey="Logging.MessageType.ActionMsg"> | ||
269 | <comment> | ||
270 | A message that requires another system/user to respond with some action. | ||
271 | </comment> | ||
272 | <elem name="id" type="Tensor.uint32" multiplicity="1"> | ||
273 | <comment>Error code identifying the fault type</comment> | ||
274 | </elem> | ||
275 | <elem name="severity" type="Severity" multiplicity="1"/> | ||
276 | <elem name="category" type="Category" multiplicity="1"/> | ||
277 | <elem name="iid" type="Tensor.uri" multiplicity="0..1"> | ||
278 | <comment>Optional incident identifier. Should uniquely define the action issue for future reference.</comment> | ||
279 | </elem> | ||
280 | |||
281 | </struct> | ||
282 | |||
283 | <!-- TraceMsg type --> | ||
284 | <struct name="TraceMsg" type="TransactionMsg" rttkey="Logging.MessageType.TraceMsg"> | ||
285 | <comment> | ||
286 | Trace message for general logging and reporting of information | ||
287 | </comment> | ||
288 | <elem name="level" type="TraceLevel" multiplicity="1"> | ||
289 | <comment>Indicates the level of the trace: overview is the highest level and debug is the lowest</comment> | ||
290 | </elem> | ||
291 | </struct> | ||
292 | |||
293 | <!-- UsageMsg type --> | ||
294 | <struct name="UsageMsg" type="TransactionMsg" rttkey="Logging.MessageType.UsageMsg"> | ||
295 | <comment> | ||
296 | Message capturing usage information for reporting statistical, transactional, edge, location, or other useful information generated in the normal | ||
297 | operation of the system. | ||
298 | </comment> | ||
299 | <elem name="uri" type="Tensor.uri" multiplicity="1" rttd="true"> | ||
300 | <comment> Usage id specific to a type of usage information. Can be general or application specific.</comment> | ||
301 | </elem> | ||
302 | </struct> | ||
303 | |||
304 | <!-- MetricMsg type --> | ||
305 | <struct name="MetricMsg" type="MessageBase" rttkey="Logging.MessageType.MetricMsg"> | ||
306 | <elem name="start" type="datetime" multiplicity="1"> | ||
307 | <comment>The date/time of the start of the report interval. date is end the end of the report interval.</comment> | ||
308 | </elem> | ||
309 | <elem name="duration" type="uint16" multiplicity="1"> | ||
310 | <tag name="unit" value="sec"/> | ||
311 | <comment>The interval in seconds for the metric report.</comment> | ||
312 | </elem> | ||
313 | <elem name="metrics" type="Metric" multiplicity="1..*"> | ||
314 | <comment>List of metrics being reported.</comment> | ||
315 | </elem> | ||
316 | </struct> | ||
317 | |||
318 | <!-- | ||
319 | ******************************************************* | ||
320 | Standard Usage Definitions | ||
321 | ******************************************************* | ||
322 | --> | ||
323 | |||
324 | <!--TaskReport Msg--> | ||
325 | <struct name="TaskReport" type="Logging.UsageMsg" rttkey='"tpf://taskrpt"'> | ||
326 | <comment> | ||
327 | Message reports processing task result data. Tasks are any execution unit the | ||
328 | that is deemed to have a specific beginning and end. This is a fairly generic | ||
329 | definition making the usage report suitable for a variety of applications. | ||
330 | </comment> | ||
331 | <elem name="taskid" type="string" multiplicity="1"> | ||
332 | <comment> | ||
333 | The unique tasks identifier. A source may have multiple tasks, this field assigns | ||
334 | an identifier that uniquely characterizes what the task was that was accomplished. | ||
335 | </comment> | ||
336 | </elem> | ||
337 | <elem name="start" type="datetime" multiplicity="1"> | ||
338 | <comment> | ||
339 | The start time at which the processor is used. | ||
340 | </comment> | ||
341 | </elem> | ||
342 | <elem name="duration" type="uint32" multiplicity="1"> | ||
343 | <tag name="unit" value="usec"/> | ||
344 | <comment> | ||
345 | The duration of the processing in microseconds. This is not meant to be a high | ||
346 | resolution duration monitoring, implement a metric counter for precise timing data. | ||
347 | </comment> | ||
348 | </elem> | ||
349 | <elem name="status" type="ResultCode" multiplicity="1"> | ||
350 | <comment>The task result code.</comment> | ||
351 | </elem> | ||
352 | </struct> | ||
353 | |||
354 | </namespace> | ||
355 | </specification> |
TensorCommon/V1.0.0/TensorCommon.xid
0 → 100644
1 | <?xml version="1.0" encoding="UTF-8" ?> | ||
2 | |||
3 | <specification xmlns="http://xid.location.studio/XID/XtensibleInterfaceDefinition.xsd" | ||
4 | xmlns:xid="http://xid.location.studio/XID/XtensibleInterfaceDefinition.xsd" | ||
5 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
6 | xsi:schemaLocation="http://xid.location.studio/XID/XtensibleInterfaceDefinition.xsd XtensibleInterfaceDefinition.xsd" | ||
7 | identity="TensorCommmon.xid"> | ||
8 | <title>Tensor Commmon Defitions</title> | ||
9 | <comment></comment> | ||
10 | <artifact></artifact> | ||
11 | |||
12 | <import ref="http://xid.location.studio/XID/TensorDefinitions.xid" local="TensorDefinitions.xid" /> | ||
13 | |||
14 | <namespace name="Tensor"> | ||
15 | <struct name="NameValue" > | ||
16 | <comment>A string base name value pair entry.</comment> | ||
17 | <elem name="name" type="Tensor.string"/> | ||
18 | <elem name="value" type="Tensor.string"/> | ||
19 | </struct> | ||
20 | |||
21 | <enum name="ResultCode" type="Tensor.int8" default="undefined"> | ||
22 | <comment>General processing result codes.</comment> | ||
23 | <literal name="success" value="1"/> | ||
24 | <literal name="undefined" value="0"/> | ||
25 | <literal name="failure" value="-1" /> | ||
26 | <literal name="busy" value="-2" /> | ||
27 | <literal name="notprocesssed" value="-3"/> | ||
28 | </enum> | ||
29 | |||
30 | <struct name="VoidType"> | ||
31 | <comment>Reserved type used in various translations to preserve translation. It has no purpose but as a placeholder.</comment> | ||
32 | <elem name="reserved" type="Tensor.uint16" multiplicity="1"/> | ||
33 | </struct> | ||
34 | |||
35 | |||
36 | <!-- | ||
37 | ************************************ | ||
38 | * Command API Implementation | ||
39 | ************************************ | ||
40 | --> | ||
41 | <struct name="Command"> | ||
42 | <comment>A TPF command structure compatible with the TPF Framework Commander Component.</comment> | ||
43 | <elem name="name" type="Tensor.string" multiplicity="1"> | ||
44 | <comment>The command name including scope specifiers. Convention is to use a '.' as a scope separator | ||
45 | such as[component name].[command name].</comment> | ||
46 | </elem> | ||
47 | |||
48 | <elem name="etid" type="Tensor.string" multiplicity="0..1"> | ||
49 | <comment> | ||
50 | Optional external transaction identifier for the caller to uniquely identify and track | ||
51 | the command and corresponding results. | ||
52 | </comment> | ||
53 | </elem> | ||
54 | |||
55 | <elem name="argument" type="NameValue" multiplicity="0..*"> | ||
56 | <comment> | ||
57 | Each command may have zero or more arguments. | ||
58 | They may be name/value or oridinal/value arguments. | ||
59 | Both name and value are required. | ||
60 | </comment> | ||
61 | </elem> | ||
62 | </struct> | ||
63 | |||
64 | <struct name="CommandResponse"> | ||
65 | <comment> | ||
66 | The command response structure containing information resulting from executing the | ||
67 | command (success or failure). Check the result code for details on status of executing the | ||
68 | command a value of 1 means success, value of 0 is undefined, See ResultCode for other standard | ||
69 | result codes. Each operation may define additional codes. | ||
70 | </comment> | ||
71 | <elem name="name" type="Tensor.string" multiplicity="1"> | ||
72 | <comment> | ||
73 | The command name including scope specifiers. Convention is to use a '.' as a scope separator | ||
74 | such as[component name].[command name]. | ||
75 | </comment> | ||
76 | </elem> | ||
77 | <elem name="result" type="Tensor.int8" multiplicity="1"> | ||
78 | <comment>The processing result code. 1 is success, 0 is undefined, -1 is a failure.</comment> | ||
79 | </elem> | ||
80 | |||
81 | <elem name="etid" type="Tensor.string" multiplicity="0..1"> | ||
82 | <comment> | ||
83 | Optional external transaction identifier for the caller to uniquely identify and track | ||
84 | the command and corresponding results. | ||
85 | </comment> | ||
86 | </elem> | ||
87 | |||
88 | <elem name="output" type="Tensor.string" multiplicity="0..1"> | ||
89 | <comment> | ||
90 | Optional command output stored as a string. Interpeting the output data is dependent upon the | ||
91 | command function executed and what data formats are as an encodded string. | ||
92 | </comment> | ||
93 | </elem> | ||
94 | </struct> | ||
95 | |||
96 | <interface name="CommandApi"> | ||
97 | <comment>Interface executing commands inside TPF Containers.</comment> | ||
98 | |||
99 | <operation name="Execute"> | ||
100 | <comment> | ||
101 | Executes the specified command elements. Can specify whether to return responses (default true) or not using wantresponses. | ||
102 | </comment> | ||
103 | <input name="input" sid="0x0100"> | ||
104 | <elem name="commands" multiplicity="1..*" type="Command"/> | ||
105 | <elem name="wantresponses" multiplicity="1" type="Tensor.bool" default="true"/> | ||
106 | </input> | ||
107 | <output name="output" sid="0x0101"> | ||
108 | <elem name="lastcommand" type="Tensor.int8" multiplicity="1"> | ||
109 | <comment>The index of the last command executed. If this is less than the total number of commands a failure occurred.</comment> | ||
110 | </elem> | ||
111 | <elem name="lastresult" type="Tensor.int8" multiplicity="1"> | ||
112 | <comment>The last processing result code. 1 is success, 0 is undefined, -1 is a failure.</comment> | ||
113 | </elem> | ||
114 | <elem name="responses" type="CommandResponse" multiplicity="1..*"> | ||
115 | <comment>A command response for each command executed.</comment> | ||
116 | </elem> | ||
117 | </output> | ||
118 | </operation> | ||
119 | </interface> | ||
120 | </namespace> | ||
121 | </specification> |
-
Please register or sign in to post a comment