Merge branch 'ILP86' into 'master'
Refactor Common.xid creating Command.xid See merge request !1
Showing
2 changed files
with
117 additions
and
91 deletions
Tensor/V1.0.0/Command.xid.xml
0 → 100644
| 1 | <?xml version="1.0" encoding="UTF-8" ?> | ||
| 2 | |||
| 3 | <!-- | ||
| 4 | Copyright (c) 2017, TeleCommunication Systems, Inc., | ||
| 5 | a wholly-owned subsidiary of Comtech Telecommunications Corp. | ||
| 6 | and/or affiliates of TeleCommunication Systems, Inc. | ||
| 7 | All rights reserved. | ||
| 8 | TeleCommunication Systems, Inc. PROPRIETARY/CONFIDENTIAL. | ||
| 9 | Use is subject to license terms included in the distribution. | ||
| 10 | --> | ||
| 11 | |||
| 12 | <specification xmlns="https://xid.location.studio/schema/V1.0.0/XtensibleInterfaceDefinition.xsd" | ||
| 13 | xmlns:xid="https://xid.location.studio/schema/V1.0.0/XtensibleInterfaceDefinition.xsd" | ||
| 14 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| 15 | xsi:schemaLocation="https://xid.location.studio/schema/V1.0.0/XtensibleInterfaceDefinition.xsd XtensibleInterfaceDefinition.xsd" | ||
| 16 | identity="Command.xid.xml"> | ||
| 17 | <title>Tensor Command</title> | ||
| 18 | <comment></comment> | ||
| 19 | <artifact></artifact> | ||
| 20 | |||
| 21 | <import ref="https://xid.location.studio/Tensor/V1.0.0/Common.xid.xml" local="Common.xid.xml" /> | ||
| 22 | |||
| 23 | <namespace name="Tensor"> | ||
| 24 | |||
| 25 | <!-- | ||
| 26 | ************************************ | ||
| 27 | * Command API Implementation | ||
| 28 | ************************************ | ||
| 29 | --> | ||
| 30 | <struct name="Command"> | ||
| 31 | <comment>A TPF command structure compatible with the TPF Framework Commander Component.</comment> | ||
| 32 | <elem name="name" type="Tensor.string" multiplicity="1" ord="64"> | ||
| 33 | <comment>The command name including scope specifiers. Convention is to use a '.' as a scope separator | ||
| 34 | such as[component name].[command name].</comment> | ||
| 35 | </elem> | ||
| 36 | |||
| 37 | <elem name="etid" type="Tensor.string" multiplicity="0..1" ord="65"> | ||
| 38 | <comment> | ||
| 39 | Optional external transaction identifier for the caller to uniquely identify and track | ||
| 40 | the command and corresponding results. | ||
| 41 | </comment> | ||
| 42 | </elem> | ||
| 43 | |||
| 44 | <elem name="argument" type="NameValue" multiplicity="0..*" ord="66"> | ||
| 45 | <comment> | ||
| 46 | Each command may have zero or more arguments. | ||
| 47 | They may be name/value or oridinal/value arguments. | ||
| 48 | Both name and value are required. | ||
| 49 | </comment> | ||
| 50 | </elem> | ||
| 51 | </struct> | ||
| 52 | |||
| 53 | <struct name="CommandResponse"> | ||
| 54 | <comment> | ||
| 55 | The command response structure containing information resulting from executing the | ||
| 56 | command (success or failure). Check the result code for details on status of executing the | ||
| 57 | command a value of 1 means success, value of 0 is undefined, See ResultCode for other standard | ||
| 58 | result codes. Each operation may define additional codes. | ||
| 59 | </comment> | ||
| 60 | <elem name="name" type="Tensor.string" multiplicity="1" ord="64"> | ||
| 61 | <comment> | ||
| 62 | The command name including scope specifiers. Convention is to use a '.' as a scope separator | ||
| 63 | such as[component name].[command name]. | ||
| 64 | </comment> | ||
| 65 | </elem> | ||
| 66 | |||
| 67 | <elem name="etid" type="Tensor.string" multiplicity="0..1" ord="65"> | ||
| 68 | <comment> | ||
| 69 | Optional external transaction identifier for the caller to uniquely identify and track | ||
| 70 | the command and corresponding results. | ||
| 71 | </comment> | ||
| 72 | </elem> | ||
| 73 | |||
| 74 | <elem name="result" type="Tensor.int8" multiplicity="1" ord="66"> | ||
| 75 | <comment>The processing result code. 1 is success, 0 is undefined, -1 is a failure.</comment> | ||
| 76 | </elem> | ||
| 77 | |||
| 78 | <elem name="output" type="Tensor.string" multiplicity="0..1" ord="67"> | ||
| 79 | <comment> | ||
| 80 | Optional command output stored as a string. Interpeting the output data is dependent upon the | ||
| 81 | command function executed and what data formats are as an encodded string. | ||
| 82 | </comment> | ||
| 83 | </elem> | ||
| 84 | </struct> | ||
| 85 | |||
| 86 | <interface name="CommandApi"> | ||
| 87 | <comment>Interface executing commands inside TPF Containers.</comment> | ||
| 88 | |||
| 89 | <operation name="Execute"> | ||
| 90 | <comment> | ||
| 91 | Executes the specified command elements. Can specify whether to return responses (default true) or not using wantresponses. | ||
| 92 | </comment> | ||
| 93 | <input name="input" sid="0x0100"> | ||
| 94 | <elem name="commands" multiplicity="1..*" type="Command" ord="64"/> | ||
| 95 | <elem name="wantresponses" multiplicity="1" type="Tensor.bool" ord="65" default="true"/> | ||
| 96 | </input> | ||
| 97 | <output name="output" sid="0x0101"> | ||
| 98 | <elem name="lastcommand" type="Tensor.int8" multiplicity="1" ord="64"> | ||
| 99 | <comment>The index of the last command executed. If this is less than the total number of commands a failure occurred.</comment> | ||
| 100 | </elem> | ||
| 101 | <elem name="lastresult" type="Tensor.int8" multiplicity="1" ord="65"> | ||
| 102 | <comment>The last processing result code. 1 is success, 0 is undefined, -1 is a failure.</comment> | ||
| 103 | </elem> | ||
| 104 | <elem name="responses" type="CommandResponse" multiplicity="1..*" ord="66"> | ||
| 105 | <comment>A command response for each command executed.</comment> | ||
| 106 | </elem> | ||
| 107 | </output> | ||
| 108 | </operation> | ||
| 109 | </interface> | ||
| 110 | </namespace> | ||
| 111 | </specification> |
| ... | @@ -13,8 +13,8 @@ | ... | @@ -13,8 +13,8 @@ |
| 13 | xmlns:xid="https://xid.location.studio/schema/V1.0.0/XtensibleInterfaceDefinition.xsd" | 13 | xmlns:xid="https://xid.location.studio/schema/V1.0.0/XtensibleInterfaceDefinition.xsd" |
| 14 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | 14 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 15 | xsi:schemaLocation="https://xid.location.studio/schema/V1.0.0/XtensibleInterfaceDefinition.xsd XtensibleInterfaceDefinition.xsd" | 15 | xsi:schemaLocation="https://xid.location.studio/schema/V1.0.0/XtensibleInterfaceDefinition.xsd XtensibleInterfaceDefinition.xsd" |
| 16 | identity="Commmon.xid.xml"> | 16 | identity="Common.xid.xml"> |
| 17 | <title>Tensor Commmon Definitions</title> | 17 | <title>Tensor Common Definitions</title> |
| 18 | <comment></comment> | 18 | <comment></comment> |
| 19 | <artifact></artifact> | 19 | <artifact></artifact> |
| 20 | 20 | ||
| ... | @@ -23,8 +23,8 @@ | ... | @@ -23,8 +23,8 @@ |
| 23 | <namespace name="Tensor"> | 23 | <namespace name="Tensor"> |
| 24 | <struct name="NameValue" > | 24 | <struct name="NameValue" > |
| 25 | <comment>A string base name value pair entry.</comment> | 25 | <comment>A string base name value pair entry.</comment> |
| 26 | <elem name="name" type="Tensor.string"/> | 26 | <elem name="name" type="Tensor.string" ord="64"/> |
| 27 | <elem name="value" type="Tensor.string"/> | 27 | <elem name="value" type="Tensor.string" ord="65"/> |
| 28 | </struct> | 28 | </struct> |
| 29 | 29 | ||
| 30 | <enum name="ResultCode" type="Tensor.int8" default="undefined"> | 30 | <enum name="ResultCode" type="Tensor.int8" default="undefined"> |
| ... | @@ -37,94 +37,9 @@ | ... | @@ -37,94 +37,9 @@ |
| 37 | </enum> | 37 | </enum> |
| 38 | 38 | ||
| 39 | <struct name="VoidType"> | 39 | <struct name="VoidType"> |
| 40 | <comment>Reserved type used in various translations to preserve translation. It has no purpose but as a placeholder.</comment> | 40 | <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> |
| 41 | <elem name="reserved" type="Tensor.uint16" multiplicity="1"/> | 41 | <elem name="reserved" type="Tensor.uint16" multiplicity="1" ord="64"/> |
| 42 | </struct> | 42 | </struct> |
| 43 | 43 | ||
| 44 | |||
| 45 | <!-- | ||
| 46 | ************************************ | ||
| 47 | * Command API Implementation | ||
| 48 | ************************************ | ||
| 49 | --> | ||
| 50 | <struct name="Command"> | ||
| 51 | <comment>A TPF command structure compatible with the TPF Framework Commander Component.</comment> | ||
| 52 | <elem name="name" type="Tensor.string" multiplicity="1"> | ||
| 53 | <comment>The command name including scope specifiers. Convention is to use a '.' as a scope separator | ||
| 54 | such as[component name].[command name].</comment> | ||
| 55 | </elem> | ||
| 56 | |||
| 57 | <elem name="etid" type="Tensor.string" multiplicity="0..1"> | ||
| 58 | <comment> | ||
| 59 | Optional external transaction identifier for the caller to uniquely identify and track | ||
| 60 | the command and corresponding results. | ||
| 61 | </comment> | ||
| 62 | </elem> | ||
| 63 | |||
| 64 | <elem name="argument" type="NameValue" multiplicity="0..*"> | ||
| 65 | <comment> | ||
| 66 | Each command may have zero or more arguments. | ||
| 67 | They may be name/value or oridinal/value arguments. | ||
| 68 | Both name and value are required. | ||
| 69 | </comment> | ||
| 70 | </elem> | ||
| 71 | </struct> | ||
| 72 | |||
| 73 | <struct name="CommandResponse"> | ||
| 74 | <comment> | ||
| 75 | The command response structure containing information resulting from executing the | ||
| 76 | command (success or failure). Check the result code for details on status of executing the | ||
| 77 | command a value of 1 means success, value of 0 is undefined, See ResultCode for other standard | ||
| 78 | result codes. Each operation may define additional codes. | ||
| 79 | </comment> | ||
| 80 | <elem name="name" type="Tensor.string" multiplicity="1"> | ||
| 81 | <comment> | ||
| 82 | The command name including scope specifiers. Convention is to use a '.' as a scope separator | ||
| 83 | such as[component name].[command name]. | ||
| 84 | </comment> | ||
| 85 | </elem> | ||
| 86 | <elem name="result" type="Tensor.int8" multiplicity="1"> | ||
| 87 | <comment>The processing result code. 1 is success, 0 is undefined, -1 is a failure.</comment> | ||
| 88 | </elem> | ||
| 89 | |||
| 90 | <elem name="etid" type="Tensor.string" multiplicity="0..1"> | ||
| 91 | <comment> | ||
| 92 | Optional external transaction identifier for the caller to uniquely identify and track | ||
| 93 | the command and corresponding results. | ||
| 94 | </comment> | ||
| 95 | </elem> | ||
| 96 | |||
| 97 | <elem name="output" type="Tensor.string" multiplicity="0..1"> | ||
| 98 | <comment> | ||
| 99 | Optional command output stored as a string. Interpeting the output data is dependent upon the | ||
| 100 | command function executed and what data formats are as an encodded string. | ||
| 101 | </comment> | ||
| 102 | </elem> | ||
| 103 | </struct> | ||
| 104 | |||
| 105 | <interface name="CommandApi"> | ||
| 106 | <comment>Interface executing commands inside TPF Containers.</comment> | ||
| 107 | |||
| 108 | <operation name="Execute"> | ||
| 109 | <comment> | ||
| 110 | Executes the specified command elements. Can specify whether to return responses (default true) or not using wantresponses. | ||
| 111 | </comment> | ||
| 112 | <input name="input" sid="0x0100"> | ||
| 113 | <elem name="commands" multiplicity="1..*" type="Command"/> | ||
| 114 | <elem name="wantresponses" multiplicity="1" type="Tensor.bool" default="true"/> | ||
| 115 | </input> | ||
| 116 | <output name="output" sid="0x0101"> | ||
| 117 | <elem name="lastcommand" type="Tensor.int8" multiplicity="1"> | ||
| 118 | <comment>The index of the last command executed. If this is less than the total number of commands a failure occurred.</comment> | ||
| 119 | </elem> | ||
| 120 | <elem name="lastresult" type="Tensor.int8" multiplicity="1"> | ||
| 121 | <comment>The last processing result code. 1 is success, 0 is undefined, -1 is a failure.</comment> | ||
| 122 | </elem> | ||
| 123 | <elem name="responses" type="CommandResponse" multiplicity="1..*"> | ||
| 124 | <comment>A command response for each command executed.</comment> | ||
| 125 | </elem> | ||
| 126 | </output> | ||
| 127 | </operation> | ||
| 128 | </interface> | ||
| 129 | </namespace> | 44 | </namespace> |
| 130 | </specification> | 45 | </specification> | ... | ... |
-
Please register or sign in to post a comment