185951ff by Michael B. Mathews

Added temporary specs to work with the design topology

1 parent d54dc78a
<?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="Logging.xid">
<title>Tensor Logging Messages</title>
<comment>
This file contains the base type definitions for logging messages and data. All ENT micro-service compliant systems shall support these datatypes
for capturing various types of logging information including actionable messages, trace, and usage data. Logging messages are polymorphic and extensible
as needed to support various types of information.
</comment>
<import ref="http://xid.location.studio/XID/TensorDefinitions.xid" local="TensorDefinitions.xid" />
<namespace name="Logging">
<using namespace="Tensor"/>
<!--
*******************************************************
Enumeration Definitions
*******************************************************
-->
<enum name="MessageType" type="Tensor.uint8" default="undefined">
<comment>
Message types define the base type identifiers for logging messages. These are used to
identify the type of logging data. The Message type is not a closed set and can be extended as needed.
The types defined here are common to every system. Type values below 64 are reserved for the core logging extensions
Any non-core message types should define type identifiers greater than 64.
</comment>
<literal name="undefined" value="0">
<comment>Message type is not defined. This is a reserved value and should not be used in most situations.</comment>
</literal>
<literal name="ActionMsg" value="1">
<comment>Defines a message that requires some responsive action. See Tensor.Logging.ActionMsg structure for more information.</comment>
</literal>
<literal name="TraceMsg" value="2">
<comment>Defines a message capturing software trace data typically used for debugging. See Tensor.Logging.TraceMsg structure for more information.</comment>
</literal>
<literal name="UsageMsg" value="3">
<comment>Defines a message for capturing usage data. See Tensor.Logging.UsageMsg for more information.</comment>
</literal>
<literal name="MetricMsg" value="4">
<comment>Defines a message for capturing metric data. See Tensor.Logging.MetricMsg for more information.</comment>
</literal>
</enum>
<enum name="Severity" type="int8" default="indeterminate">
<comment>
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
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,
however, start with values > 64. Values less than 64 are reserved.
</comment>
<literal name="indeterminate" value="0">
<comment>Severity of the issue is indeterminate.</comment>
</literal>
<literal name="warning" value="1">
<comment>
Severity indicates message is a warning regarding the specified issue. Warnings describe a potental issue that
may require additional monitoring over time. However, it is not deemed as having a significant
impaction on system operation.
</comment>
</literal>
<literal name="minor" value="2">
<comment>
Message is describing a minor issue, which requires some action. A
minor issue is something that does not have a wide scale impact on system operation.
For example a minor issue might be something that would affect a single transaction.
</comment>
</literal>
<literal name="major" value="3">
<comment>
Message is describing a major issue, which requires action. A
major issue is something that affects the system in a signficant way
such as having impact on multiple transactions.
</comment>
</literal>
<literal name="critical" value="4">
<comment>
Message is describing a critical issue, which requires immediate action. Critical issues
are typically catastrophic system issues affecting all transactions in a very significant way.
</comment>
</literal>
<literal name="cleared" value="5">
<comment>Message is describing an issue has been resolved or no longer requires actions.</comment>
</literal>
</enum>
<enum name="Category" type="int8" default="processingError">
<comment>
The category decribes the general category for an ActionMsg. This is an extensible list that can be added to as
new categories are needed. In general, try to use the core defined categories or add new ones as needed. Custom categories should start with
values > 64. Values less than 64 are reserved.
</comment>
<literal name ="undefined" value ="0">
<comment>Action category is undefined or not known.</comment>
</literal>
<literal name="communications" value="1">
<comment>A communications and/or networking related issue.</comment>
</literal>
<literal name="qualityOfService" value="2">
<comment>A quality of service related issue.</comment>
</literal>
<literal name="processingError" value="3">
<comment>A processing or runtime related issue.</comment>
</literal>
<literal name="equipment" value="4">
<comment>An equipment related issue.</comment>
</literal>
<literal name="environmental" value="5">
<comment>A environment related issue.</comment>
</literal>
</enum>
<enum name="TraceLevel" type="Tensor.int8" default="undefined">
<comment>Trace level defines the level of tracing information reported. This allows for filtering of information based on rank.</comment>
<literal name="undefined" value="0">
<comment>Trace level is not defined.</comment>
</literal>
<literal name="overview" value="1">
<comment>Information contained in the trace message is high-level or summary.</comment>
</literal>
<literal name="trace" value="2">
<comment>Information contained in the trace message is related to program flow and sequencing.</comment>
</literal>
<literal name="detail" value="3">
<comment>Information contained in the trace message is detailed information.</comment>
</literal>
<literal name="debug" value="4">
<comment>Information contained in the trace message contains debugging information.</comment>
</literal>
</enum>
<struct name="DebugInfo">
<comment>
Structure captures the file and line number information for Trace Messages. This provides information about where the trace message was sent.
</comment>
<elem name="file" type="Tensor.string" multiplicity="1">
<comment>File name where this message was logged.</comment>
</elem>
<elem name="line" type="Tensor.uint32" multiplicity="1">
<comment>Line number in file where this message is logged.</comment>
</elem>
<elem name="thid" type="Tensor.uint64" multiplicity="1" default="0">
<comment>Optional Thread ID, if not specified, default value is 0.</comment>
</elem>
</struct>
<!--
*******************************************************
Metric Structure Definitions
*******************************************************
-->
<enum name="MetricType" type="Tensor.uint8" default="undefined">
<literal name="undefined" value="0">
<comment>Metric type is not defined. This is a reserved value and should not be used in most situations.</comment>
</literal>
<literal name="PegCount" value="1">
<comment>Defines a simple monotonically incremented counter.</comment>
</literal>
<literal name="AppMetrics" value="2">
<comment>Defines a complex metric measuring duration and concurrency.</comment>
</literal>
</enum>
<struct name="Metric">
<elem name="metricType" type="MetricType" multiplicity="1" rttd="true">
<comment>This specifies the type of the reported metric.</comment>
</elem>
<elem name="name" type="string" multiplicity="1">
<comment>Name of the reported metric.</comment>
</elem>
</struct>
<struct name="PegCount" type="Metric" rttkey="Logging.MetricType.PegCount">
<elem name="value" type="uint32" multiplicity="1">
<comment>Value of peg count since last reporting.</comment>
</elem>
</struct>
<struct name="AppMetrics" type="Metric" rttkey="Logging.MetricType.AppMetrics">
<elem name="totalCount" type="uint32" multiplicity="1">
<comment>Total count of invocations since last reporting.</comment>
</elem>
<elem name="currentCount" type="uint32" multiplicity="1">
<comment>concurrent invocations at time of reporting.</comment>
</elem>
<elem name="peakCount" type="uint32" multiplicity="1">
<comment>Peak concurrent invocations since last reporting.</comment>
</elem>
<elem name="totalTime" type="uint64" multiplicity="1">
<comment>Total time spent on invocations in nanoseconds since last reporting.</comment>
</elem>
<elem name="peakTime" type="uint64" multiplicity="1">
<comment>Peak time for an invocation in nanoseconds since last reporting.</comment>
</elem>
<elem name="successCount" type="uint32" multiplicity="1">
<comment>Count of successful invocations since last reporting.</comment>
</elem>
<elem name="failureCount" type="uint32" multiplicity="1">
<comment>Count of failed invocations since last reporting.</comment>
</elem>
</struct>
<!--
*******************************************************
Message Structure Definitions
*******************************************************
-->
<struct name="MessageBase">
<comment>
Base type for all messages. This contains only the polymorphic type data. The structure Message derives from this
structure and provides common fields typically useful in logging related applications. Derive from this structure
if messages are related to logging but do not require the standard fields. It is recommended that most specializations
should start with Message as the base type.
</comment>
<elem name="type" type="MessageType" multiplicity="1" rttd="true">
<comment> This specifies the type of message.</comment>
</elem>
<elem name="date" type="datetime" multiplicity="1">
<comment>The date/time the message occured.</comment>
</elem>
<elem name="source" type="Tensor.uri" multiplicity="1">
<comment>URI Identifying name of the component or process logging the message.</comment>
</elem>
<elem name="info" type="string" multiplicity="0..1">
<comment>Optional free form string data.</comment>
</elem>
<elem name="data" type="Tensor.json" multiplicity="0..1">
<comment>Optional structured data.</comment>
</elem>
<elem name="debug" type="DebugInfo" multiplicity="0..1">
<comment>Optional debug information for message.</comment>
</elem>
</struct>
<!-- Message type -->
<struct name="TransactionMsg" type="MessageBase">
<comment>
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
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.
</comment>
<elem name="tid" type="Tensor.UUID" multiplicity="1">
<comment>Unique ID identifying the internal transaction related to the message.</comment>
</elem>
<elem name="etid" type="string" multiplicity="0..1">
<comment>Optional externally defined transaction ID.</comment>
</elem>
<elem name="acctid" type="string" multiplicity="0..1">
<comment>Optional externally defined account/group identifier.</comment>
</elem>
<elem name="devid" type="string" multiplicity="0..1">
<comment>Optional externally defined device identifier.</comment>
</elem>
<elem name="appid" type="string" multiplicity="0..1">
<comment>Optional externally defined application (or application key) identifier.</comment>
</elem>
</struct>
<!-- ActionMsg type -->
<struct name="ActionMsg" type="TransactionMsg" rttkey="Logging.MessageType.ActionMsg">
<comment>
A message that requires another system/user to respond with some action.
</comment>
<elem name="id" type="Tensor.uint32" multiplicity="1">
<comment>Error code identifying the fault type</comment>
</elem>
<elem name="severity" type="Severity" multiplicity="1"/>
<elem name="category" type="Category" multiplicity="1"/>
<elem name="iid" type="Tensor.uri" multiplicity="0..1">
<comment>Optional incident identifier. Should uniquely define the action issue for future reference.</comment>
</elem>
</struct>
<!-- TraceMsg type -->
<struct name="TraceMsg" type="TransactionMsg" rttkey="Logging.MessageType.TraceMsg">
<comment>
Trace message for general logging and reporting of information
</comment>
<elem name="level" type="TraceLevel" multiplicity="1">
<comment>Indicates the level of the trace: overview is the highest level and debug is the lowest</comment>
</elem>
</struct>
<!-- UsageMsg type -->
<struct name="UsageMsg" type="TransactionMsg" rttkey="Logging.MessageType.UsageMsg">
<comment>
Message capturing usage information for reporting statistical, transactional, edge, location, or other useful information generated in the normal
operation of the system.
</comment>
<elem name="uri" type="Tensor.uri" multiplicity="1" rttd="true">
<comment> Usage id specific to a type of usage information. Can be general or application specific.</comment>
</elem>
</struct>
<!-- MetricMsg type -->
<struct name="MetricMsg" type="MessageBase" rttkey="Logging.MessageType.MetricMsg">
<elem name="start" type="datetime" multiplicity="1">
<comment>The date/time of the start of the report interval. date is end the end of the report interval.</comment>
</elem>
<elem name="duration" type="uint16" multiplicity="1">
<tag name="unit" value="sec"/>
<comment>The interval in seconds for the metric report.</comment>
</elem>
<elem name="metrics" type="Metric" multiplicity="1..*">
<comment>List of metrics being reported.</comment>
</elem>
</struct>
<!--
*******************************************************
Standard Usage Definitions
*******************************************************
-->
<!--TaskReport Msg-->
<struct name="TaskReport" type="Logging.UsageMsg" rttkey='"tpf://taskrpt"'>
<comment>
Message reports processing task result data. Tasks are any execution unit the
that is deemed to have a specific beginning and end. This is a fairly generic
definition making the usage report suitable for a variety of applications.
</comment>
<elem name="taskid" type="string" multiplicity="1">
<comment>
The unique tasks identifier. A source may have multiple tasks, this field assigns
an identifier that uniquely characterizes what the task was that was accomplished.
</comment>
</elem>
<elem name="start" type="datetime" multiplicity="1">
<comment>
The start time at which the processor is used.
</comment>
</elem>
<elem name="duration" type="uint32" multiplicity="1">
<tag name="unit" value="usec"/>
<comment>
The duration of the processing in microseconds. This is not meant to be a high
resolution duration monitoring, implement a metric counter for precise timing data.
</comment>
</elem>
<elem name="status" type="ResultCode" multiplicity="1">
<comment>The task result code.</comment>
</elem>
</struct>
</namespace>
</specification>
<?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>
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!