IlpUsage.xid.xml 15.2 KB
<?xml version="1.0" encoding="UTF-8" ?>

<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="HpeUsage.xid.xml">
    <title>ILP Usage Messages</title>
    <comment>This file defines the usage generated and ingested by various ILP Services.</comment>

    <import ref="https://xid.location.studio/Tensor/V1.1/Definitions.xid.xml" local="Definitions.xid.xml" />
    <import ref="https://xid.location.studio/GeoSpatial/V1.0/SpatialDefs.xid.xml" local="SpatialDefs.xid.xml" />  
    <import ref="https://xid.location.studio/HPE/V1.2/HpeCore.xid.xml" local="HpeCore.xid.xml" />
    <import ref="https://xid.location.studio/Tensor/V1.1/Logging.xid.xml" local="Logging.xid.xml" />
  
    <namespace name="ILP">
      <namespace name="Usage">
        <using namespace="Tensor"/>
        <using namespace="Logging"/>
        <using namespace="GeoSpatial"/>

        <!-- ReferenceType Enumeration -->
        <enum name="ReferenceType" type="Tensor.int8"  default="undefined">
          <comment>
            Specifies the RF radio reference type associated with the contributed or stored data.
          </comment>
          <literal name="undefined" value="0"/>
          <literal name="gsm" value="1"/>
          <literal name="cdma" value="2"/>
          <literal name="wcdma" value="3"/>
          <literal name="lte" value="4"/>
          <literal name="nbiot" value="5"/>
          <literal name="wifi" value="6"/>
          <literal name="bluetooth" value="7"/>
        </enum>

        <!-- StorageAction Enumeration -->
        <enum name="StorageAction" type="Tensor.int8"  default="undefined">
          <comment>
            Specifies the storage action for the specified Reference.
          </comment>
          <literal name="undefined" value="0"/>
          <literal name="added" value="1"/>
          <literal name="updated" value="2"/>
          <literal name="quarantined" value="3"/>
          <literal name="archived" value="4"/>
        </enum>

        <!-- Reference Type -->
        <enum name="ReferenceStatus" type="Tensor.int8"  default="undefined">
          <comment>
            Specifies the staus of references
          </comment>
          <literal name="undefined" value="0"/>
          <literal name="active" value="1"/>
          <literal name="quarantined" value="3"/>
        </enum>

        <!-- ObservationMetric structure -->
        <struct name="ObservationMetric"  >
          <comment>Metric data regarding contribution of obesrvations for a specified reference type within a specified area, time, and device.</comment>

          <elem name="reftype" multiplicity="1" type="ReferenceType">
            <comment>
              RF Reference type specifier.
            </comment>
          </elem>

          <elem name="obsType" multiplicity="0..1" type="ObservationType">
            <comment>
              Optional observation type specifier.  The specific set of observations with the same ObservationType contributed.
            </comment>
          </elem>

          <elem name="countTotal" multiplicity="1" type="uint32">
            <comment>
              Total count of observations submitted associated with this ObservationMetric.
            </comment>
          </elem>

          <elem name="countWithState" multiplicity="1" type="uint32">
            <comment>
              Total count of observations submitted with observation state data.
            </comment>
          </elem>

          <elem name="countFloorInfo" multiplicity="1" type="uint32">
            <comment>
              Total count of observations submitted with floor information.
            </comment>
          </elem>          

          <elem name="countHeight" multiplicity="1" type="uint32">
            <comment>
              Total count of observations submitted with height information. These are full 3-D position in the state specification version 2-D only (horizontal only).
            </comment>
          </elem>          
          
          <elem name="status" multiplicity="1" type="ReferenceStatus">
            <comment>
              Status of the references represented by this statistic.
            </comment>
          </elem>

          <elem name="bounds" multiplicity="1" type="BoundingBox">
            <comment>
              Bounding box containing the area encompassing all the reference points captured in this statistic.
            </comment>
          </elem>

          <elem name="posAvg" multiplicity="1" type="PositionECEF">
            <comment>
              The average (mean) center of the all the reference locations within the specified Bounding Box.  Note that this is not necessarily the geometric center of the bounding box.
            </comment>
          </elem>
        </struct>        
        
        <!-- StorageStatistic structure -->
        <struct name="StatisticMetric"  >
          <comment>Storage metric data regarding references and areas.</comment>

          <elem name="reftype" multiplicity="1" type="ReferenceType">
            <comment>
              RF Reference type specifier.
            </comment>
          </elem>

          <elem name="count" multiplicity="1" type="uint32">
            <comment>
              Count of references that this statistic applies to within the specified bounding box.
            </comment>
          </elem>

          <elem name="status" multiplicity="1" type="ReferenceStatus">
            <comment>
              Status of the references represented by this statistic.
            </comment>
          </elem>

          <elem name="bounds" multiplicity="1" type="BoundingBox">
            <comment>
              Bounding box containing the area encompassing all the reference points captured in this statistic.
            </comment>
          </elem>

          <elem name="posAvg" multiplicity="1" type="PositionECEF">
            <comment>
              The average (mean) center of the all the reference locations within the specified Bounding Box.  Note that this is not necessarily the geometric center of the bounding box.
            </comment>
          </elem>

        </struct>


        <!-- UpdateMetric structure -->
        <struct name="UpdateMetric"  >
          <comment>Storage update metrics for a specified reference type and action.</comment>

          <elem name="reftype" multiplicity="1" type="ReferenceType">
            <comment>
              RF Reference type specifier.
            </comment>
          </elem>

          <elem name="count" multiplicity="1" type="uint32">
            <comment>
              Count of references that this metric applies.
            </comment>
          </elem>

          <elem name="action" multiplicity="1" type="UpdateMetric">
            <comment>
              Update action taken on the references represented by this UpdateMetric.
            </comment>
          </elem>
        </struct>


        <!--Contribution Msg-->
        <struct name="Contribution" type="Logging.UsageMsg" rttkey='"tpf://ilp/contribution"'>
          <comment>
           Usage message captures ILP data contribution information.
          </comment>

          <elem name="contributorid" type="string" multiplicity="1">
            <comment>
              Source contributor identifier,  this is typically defined as the source service provider of the data contribution. 
              Might be the name of a company, internal service, or external service name.  
            </comment>
          </elem>

          <elem name="tid" type="UUID" multiplicity="1">
            <comment>
              Transaction identifier that resulted in generating this contribution.  This ID allows linkage of multiple contributions.
            </comment>
          </elem>

          <elem name="tidSequence" type="uint32" multiplicity="0..1">
            <comment>
              Optional sequence specifier for contributions within a specific transaction (tid).  These are provided typically when one
              transaction results in multiple contributions.  This allows preservation of order information.
            </comment>
          </elem>

          <elem name="devid" type="string" multiplicity="1">
            <comment>
              Required device identifier, provides a means to associate multiple contributions with a signle device.  This need not be a
              specific type of device identifier.  However, it is desirable to provide unique values so contributions 
              can be grouped by device.
            </comment>
          </elem>
          
          <elem name="classDevice" type="string" multiplicity="0..1">
            <comment>
              Optional device classifier specification describes the type of device: e.g.  smartphone, iot, automotive, etc.
            </comment>
          </elem>

          <elem name="mfgDevice" type="string" multiplicity="0..1">
            <comment>
              Optional device manufacturer specification describes the organization that manufactured the device.
            </comment>
          </elem>
          
          <elem name="modelDevice" type="string" multiplicity="0..1">
            <comment>
              Optional device model specification describes the model of the device.
            </comment>
          </elem>

          <elem name="startDate" type="datetime" multiplicity="1">
            <comment>
              Start date the contributions were made.  This is typically when the contributions were measured,  or at very least, when they wereo submitted.
            </comment>
          </elem>

          <elem name="endDate" type="datetime" multiplicity="1">
            <comment>
              End date the contributions were made.  This is typically when the contributions were measured,  or at very least, when they were submitted.
            </comment>
          </elem>

          <elem name="bounds" multiplicity="1" type="BoundingBox">
            <comment>
              Bounding box containing the area encompassing all the reference points captured in this statistic.
            </comment>
          </elem>

          <elem name="posAvg" multiplicity="1" type="PositionECEF">
            <comment>
              The average (mean) center of the all the reference locations within the specified Bounding Box.  Note that this is not necessarily the geometric center of the bounding box.
            </comment>
          </elem>

          <elem name="metrics" multiplicity="1..*" type="ObservationMetric">
            <comment>
              Required one or more ObservationMetric data.  See ObservationMetric for more information.
            </comment>
          </elem>
        </struct>

        <!--StorageStats Report Msg-->
        <struct name="StorageStats" type="Logging.UsageMsg" rttkey='"tpf://ilp/storagestats"'>
          <comment>
            Usage message captures ILP data storages statistics information.
          </comment>

          <elem name="storageid" type="string" multiplicity="1">
            <comment>
              Storage identifier that is providing the storages statistics,  this is typically defined as the consumer service provider of the storage update.
              Might be the name of a company, internal service, or external service name.
            </comment>
          </elem>

          <elem name="tid" type="UUID" multiplicity="1">
            <comment>
              Transaction identifier for this set of storage statistics.  This ID allows linkage of multiple storage statistics.
            </comment>
          </elem>

          <elem name="tidSequence" type="uint32" multiplicity="0..1">
            <comment>
              Optional sequence specifier for storage statistics within a specific transaction (tid).  These are provided typically when one
              transaction results in multiple statistics messages.  This allows preservation of order information.
            </comment>
          </elem>

          <elem name="date" type="datetime" multiplicity="1">
            <comment>
              Date the statistics transaction occurred.
            </comment>
          </elem>

          <elem name="statistics" multiplicity="1..*" type="StatisticMetric">
            <comment>
              Required one or more StatistinceMetric data.  See StatisticMetric for more information.
            </comment>
          </elem>
        </struct>

        <!--StorageUpdate Msg-->
        <struct name="StorageUpdate" type="Logging.UsageMsg" rttkey='"tpf://ilp/storageupdate"'>
          <comment>
            Usage message captures ILP data storage update information.
          </comment>

          <elem name="storageid" type="string" multiplicity="1">
            <comment>
              Storage identifier that is providing the storages update,  this is typically defined as the consumer service provider of the storage update.
              Might be the name of a company, internal service, or external service name.
            </comment>
          </elem>

          <elem name="tid" type="UUID" multiplicity="1">
            <comment>
              Transaction identifier for this set of storage statistics.  This ID allows linkage of multiple storage statistics.
            </comment>
          </elem>

          <elem name="tidSequence" type="uint32" multiplicity="0..1">
            <comment>
              Optional sequence specifier for storage statistics within a specific transaction (tid).  These are provided typically when one
              transaction results in multiple statistics messages.  This allows preservation of order information.
            </comment>
          </elem>

          <elem name="startDate" type="datetime" multiplicity="1">
            <comment>
              Start date the updates were made.  This is typically when the updates were calculated,  or at very least, when they were submitted.
            </comment>
          </elem>

          <elem name="endDate" type="datetime" multiplicity="1">
            <comment>
              End date the updates were made.  This is typically when the updates were caluculated,  or at very least, when they were submitted.
            </comment>
          </elem>

          <elem name="bounds" multiplicity="1" type="BoundingBox">
            <comment>
              Bounding box containing the area encompassing all the reference points captured in this update.
            </comment>
          </elem>

          <elem name="posAvg" multiplicity="1" type="PositionECEF">
            <comment>
              The average (mean) center of the all the reference locations within the specified Bounding Box.  Note that this is not necessarily the geometric center of the bounding box.
            </comment>
          </elem>

          <elem name="metrics" multiplicity="1..*" type="UpdateMetric">
            <comment>
              Required one or more UpdateMetric data.  See UpdateMetric for more information.
            </comment>
          </elem>
        </struct>

      </namespace>
    </namespace>
</specification>