53afcc83 by Michael B. Mathews

V1.1 with updated JSON and XMF types and proper references.

1 parent 561a0aa9
<?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="ApiBase.xid.xml">
<title>Tensor Microservices API Base Definitions</title>
<comment>
This document defines the common types API service interface (input and output base structures) for the Tensor microservices definitions.
</comment>
<import ref="https://xid.location.studio/Tensor/V1.1/Common.xid.xml" local="Common.xid.xml" />
<namespace name="Tensor">
<!--
*******************************
*InputBase Type Definition
*******************************
-->
<struct name="InputBase" >
<comment>Base input fields for operations supporting asynchronous transaction information.</comment>
<elem name="devid" multiplicity="0..1" type="string" ord="64">
<comment>
Optional device identifier, that provides a consistent multi-transaction identifier
for a device or equivalent (e.g. service identifier) providing the data. Any errors or issues resulting from processing the data will include this identifier
in the system logs, providing traceability. Identifier should be unique.
</comment>
</elem>
<elem name="etid" multiplicity="0..1" type="string" ord="65">
<comment>
Optional external transaction identifier for the caller to uniquely identify and track
the transaction and corresponding results. These identifiers will appear in the
service logs for traceability analysis. The format of the transaction identifier is up to the caller
and can be anything: e.g. [uuid], [id1.subid0], [numerical], etc. This data is never interpreted by
the service.
</comment>
</elem>
<elem name="directive" multiplicity="0..*" type="NameValue" ord="66">
<comment>
A set of directives to influence processing.
</comment>
</elem>
</struct>
<!--
*******************************
*OutputBase Type Definition
*******************************
-->
<struct name="OutputBase" >
<comment>Base output fields common to operations supporting asynchronous returning transaction information.</comment>
<elem name="devid" multiplicity="0..1" type="string" ord="64">
<comment>
Device identifier provided at operation input, provides a consistent identifier
for a device or equivalent (e.g. service identifier) providing the data. Any errors or issues resulting from processing the data will include this identifier
in the service logs, providing traceability.
</comment>
</elem>
<elem name="etid" multiplicity="0..1" type="string" ord="65">
<comment>
Optional external transaction identifier for the caller to uniquely identify and track
the transaction and corresponding results. These identifiers appear in the
ILP system logs for traceability analysis. The format of the transaction identifier is up to the caller
and can be anything: e.g. [uuid], [id1.subid0], [numerical], etc. This data is never interpreted by
the ILP system.
</comment>
</elem>
<elem name="resultcode" type="ResultCode" multiplicity="1" ord="66">
<comment>Result of the operation.</comment>
</elem>
<elem name="errinfo" type="Tensor.string" multiplicity="0..1" ord="67">
<comment>Error information if result was not success.</comment>
</elem>
</struct>
</namespace>
</specification>
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright (c) 2017, 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="Command.xid.xml">
<title>Tensor Command</title>
<comment></comment>
<artifact></artifact>
<import ref="https://xid.location.studio/Tensor/V1.1/Common.xid.xml" local="Common.xid.xml" />
<namespace name="Tensor">
<!--
************************************
* 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" ord="64">
<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" ord="65">
<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..*" ord="66">
<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" ord="64">
<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" ord="65">
<comment>
Optional external transaction identifier for the caller to uniquely identify and track
the command and corresponding results.
</comment>
</elem>
<elem name="result" type="Tensor.int8" multiplicity="1" ord="66">
<comment>The processing result code. 1 is success, 0 is undefined, -1 is a failure.</comment>
</elem>
<elem name="output" type="Tensor.string" multiplicity="0..1" ord="67">
<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" ord="64"/>
<elem name="wantresponses" multiplicity="1" type="Tensor.bool" ord="65" default="true"/>
</input>
<output name="output" sid="0x0101">
<elem name="lastcommand" type="Tensor.int8" multiplicity="1" ord="64">
<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" ord="65">
<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..*" ord="66">
<comment>A command response for each command executed.</comment>
</elem>
</output>
</operation>
</interface>
</namespace>
</specification>
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright (c) 2017, 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="Common.xid.xml">
<title>Tensor Common Definitions</title>
<comment></comment>
<artifact></artifact>
<import ref="https://xid.location.studio/Tensor/V1.1/Definitions.xid.xml" local="Definitions.xid.xml" />
<namespace name="Tensor">
<struct name="NameValue" >
<comment>A string base name value pair entry.</comment>
<elem name="name" type="Tensor.string" ord="64"/>
<elem name="value" type="Tensor.string" ord="65"/>
</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="processingError" value="-3"/>
<literal name="parsingError" value="-4"/>
<literal name="malformedRequest" value="-5"/>
<literal name="encodingError" value="-6"/>
</enum>
<struct name="VoidType">
<comment>Reserved type used in various translations to preserve translation. It has no purpose but as a placeholder. This is different from type "void" in Definitions.xid</comment>
<elem name="reserved" type="Tensor.uint16" multiplicity="1" ord="64"/>
</struct>
<enum name="WirelineFormat" type="Tensor.uint8" default="undefined">
<comment>Enum defines the wireline data format of XID interactions. These are defined to facilitate standard definitions within XID interactions independent of the
specific transport protocol or XID conduit.</comment>
<literal name ="undefined" value = "0"/>
<literal name ="raw" value = "1"/>
<literal name ="base64" value = "2"/>
<literal name ="hex" value = "3"/>
</enum>
<enum name="ContentType" type="Tensor.uint8" default="undefined">
<comment>Enum defines the content type of XID interactions. These are defined to facilitate standard definitions within XID interactions independent of the
specific transport protocol or XID conduit.</comment>
<literal name ="undefined" value = "0"/>
<literal name ="dataobject" value = "1"/>
<literal name ="xmf" value = "2"/>
<literal name ="json" value = "3"/>
</enum>
<enum name="InteractionRole" type="Tensor.uint8" default="undefined">
<comment>InteractionRole defines the role of the conduit in a XID interaction.
A Conduit port must adopt either the target or initiator role to preserve
interaction continuity and conventions.</comment>
<literal name ="undefined" value = "0"/>
<literal name ="target" value = "1"/>
<literal name ="initiator" value = "2"/>
</enum>
</namespace>
</specification>
# Tensor XIDs #
Tensor XIDs have all their ordinals (i.e. tags) specified and do not use packed data types. Therefore, XIDData.prop is not strictly needed but is supplied as a check-n-balance.
## Generate / Verify XIDData.prop ##
~~~sh
$ java -Xnoclassgc -jar $XIDSDK/bin/xidcg.jar \
-v \
-prop https://xid.location.studio/Tensor/V1.1/XIDData.prop \
https://xid.location.studio/Tensor/V1.1/ApiBase.xid.xml \
https://xid.location.studio/Tensor/V1.1/Command.xid.xml \
https://xid.location.studio/Tensor/V1.1/Common.xid.xml \
https://xid.location.studio/Tensor/V1.1/Definitions.xid.xml \
https://xid.location.studio/Tensor/V1.1/Logging.xid.xml
OR
$ java -Xnoclassgc -jar $XIDSDK/bin/xidcg.jar \
-v \
-prop XIDData.prop \
ApiBase.xid.xml \
Command.xid.xml \
Common.xid.xml \
Definitions.xid.xml \
Logging.xid.xml
~~~
If xidcg reports:
~~~
Generating: xidout/meta/XID/XIDData.prop
~~~
Then something has changed and XIDData.prop needs to get updated.
Ord.Logging.ActionMsg.category=98
Ord.Logging.ActionMsg.id=96
Ord.Logging.ActionMsg.iid=99
Ord.Logging.ActionMsg.severity=97
Ord.Logging.AppMetrics.currentCount=81
Ord.Logging.AppMetrics.failureCount=86
Ord.Logging.AppMetrics.peakCount=82
Ord.Logging.AppMetrics.peakTime=84
Ord.Logging.AppMetrics.successCount=85
Ord.Logging.AppMetrics.totalCount=80
Ord.Logging.AppMetrics.totalTime=83
Ord.Logging.DebugInfo.file=64
Ord.Logging.DebugInfo.line=65
Ord.Logging.DebugInfo.thid=66
Ord.Logging.MessageBase.data=68
Ord.Logging.MessageBase.date=65
Ord.Logging.MessageBase.debug=69
Ord.Logging.MessageBase.info=67
Ord.Logging.MessageBase.source=66
Ord.Logging.MessageBase.type=64
Ord.Logging.Metric.metricType=64
Ord.Logging.Metric.name=65
Ord.Logging.MetricMsg.duration=81
Ord.Logging.MetricMsg.metrics=82
Ord.Logging.MetricMsg.start=80
Ord.Logging.PegCount.value=80
Ord.Logging.TaskReport.duration=114
Ord.Logging.TaskReport.start=113
Ord.Logging.TaskReport.result=115
Ord.Logging.TaskReport.taskid=112
Ord.Logging.TraceMsg.level=96
Ord.Logging.TransactionMsg.acctid=82
Ord.Logging.TransactionMsg.appid=84
Ord.Logging.TransactionMsg.devid=83
Ord.Logging.TransactionMsg.etid=81
Ord.Logging.TransactionMsg.tid=80
Ord.Logging.UsageMsg.uri=96
Ord.Tensor.Command.argument=66
Ord.Tensor.Command.etid=65
Ord.Tensor.Command.name=64
Ord.Tensor.CommandApi.Execute.Input.commands=64
Ord.Tensor.CommandApi.Execute.Input.wantresponses=65
Ord.Tensor.CommandApi.Execute.Output.lastcommand=64
Ord.Tensor.CommandApi.Execute.Output.lastresult=65
Ord.Tensor.CommandApi.Execute.Output.responses=66
Ord.Tensor.CommandResponse.etid=65
Ord.Tensor.CommandResponse.name=64
Ord.Tensor.CommandResponse.output=67
Ord.Tensor.CommandResponse.result=66
Ord.Tensor.InputBase.devid=64
Ord.Tensor.InputBase.directive=66
Ord.Tensor.InputBase.etid=65
Ord.Tensor.NameValue.name=64
Ord.Tensor.NameValue.value=65
Ord.Tensor.OutputBase.devid=64
Ord.Tensor.OutputBase.errinfo=67
Ord.Tensor.OutputBase.etid=65
Ord.Tensor.OutputBase.resultcode=66
Ord.Tensor.VoidType.reserved=64
SID.Tensor.CommandApi.Execute.Input=256
SID.Tensor.CommandApi.Execute.Output=257
Size.Logging.ActionMsg=-1
Size.Logging.AppMetrics=-1
Size.Logging.DebugInfo=-1
Size.Logging.MessageBase=-1
Size.Logging.Metric=-1
Size.Logging.MetricMsg=-1
Size.Logging.PegCount=-1
Size.Logging.TaskReport=-1
Size.Logging.TraceMsg=-1
Size.Logging.TransactionMsg=-1
Size.Logging.UsageMsg=-1
Size.Tensor.Command=-1
Size.Tensor.CommandApi.Execute.Input=-1
Size.Tensor.CommandApi.Execute.Output=-1
Size.Tensor.CommandResponse=-1
Size.Tensor.InputBase=-1
Size.Tensor.NameValue=-1
Size.Tensor.OutputBase=-1
Size.Tensor.VoidType=-1
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!