ProbeApi.xid.xml 7.36 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="ProbeApi.xid.xml">
  <title>SLAM Probe API Specifications</title>
  <comment>
    This file defines the SLAM Probe API.  The probe API is used to load one or more probe data records from a single device.
  </comment>

  <!-- Include used definitions -->
  <import ref="https://xid.location.studio/HPE/V1.2/HpeGnss.xid.xml" local="HpeGnss.xid.xml" />
  <import ref="https://xid.location.studio/HPE/V1.2/HpeCellular.xid.xml" local="HpeCellular.xid.xml" />
  <import ref="https://xid.location.studio/HPE/V1.2/HpeWiFi.xid.xml" local="HpeWiFi.xid.xml" />
  <import ref="https://xid.location.studio/Tensor/V1.1/ApiBase.xid.xml" local="ApiBase.xid.xml" />
  <import ref="https://xid.location.studio/GeoSpatial/V1.0/SpatialDefs.xid.xml" local="SpatialDefs.xid.xml" />
  <import ref="https://xid.location.studio/GeoSpatial/V1.0/Address.xid.xml" local="Address.xid.xml" />
  <import ref="https://xid.location.studio/GeoSpatial/V1.0/Contact.xid.xml" local="Contact.xid.xml" />
  <import ref="https://xid.location.studio/GeoSpatial/V1.0/PointOfInterest.xid.xml" local="PointOfInterest.xid.xml" />

  <namespace name="SLAM">
    <using namespace="HPE"/>
    <using namespace="Tensor"/>

    <enum name="DeviceClass" type="Tensor.int8"  default="undefined">
      <comment>
        Device class enumeration specifies the class or primary use of the device.
        This allows probe data recorded to be analyzed by classes of devices.
      </comment>
      <literal name ="undefined" value="0"/>
      <literal name ="mobileSmartphone" value="1"/>
      <literal name ="mobilePad" value="2"/>
      <literal name ="mobileTablet" value="3"/>
      <literal name ="mobileOther" value="4"/>
      <literal name ="iotTag" value="5"/>
      <literal name ="iotComm" value="6"/>
      <literal name ="iotStatic" value="7"/>
      <literal name ="iotOther" value="8"/>
      <literal name ="autoTrack" value="9"/>
      <literal name ="autoNav" value="10"/>
      <literal name ="autoOther" value="11"/>
    </enum>

    <struct name="ProbeRecord">
      <comment>
        A record capturing RF and otherinformation at a specified location. Probe records are captured
        as part of probe data collected by probe devices.
      </comment>
      <elem name="state" multiplicity="1" type="StateInfo">
        <comment>
          Required device position and other state information. At least one of
          observations or state is required, otherwise there is insufficient data to process.
        </comment>
      </elem>
      <elem name="floor" multiplicity="1" type ="int8" default="0">
        <comment>The floor number of this scan</comment>
      </elem>
      <elem name="observations" multiplicity="1" type="ObservationSet" >
        <comment>
          Set of observation data containing the probe measurements.
        </comment>
      </elem>
      <elem name="name" multiplicity ="0..1" type="string">
        <comment>Optional Name of this probe location.</comment>
      </elem>
      <elem name="description" multiplicity ="0..1" type="string">
        <comment>Optional human readable description.</comment>
      </elem>
      <elem name="address" multiplicity ="0..1" type="GeoSpatial.AddressInfo" >
        <comment>Optional address information.</comment>
      </elem>
      <elem name="contact" multiplicity ="0..1" type="GeoSpatial.ContactInfo" >
        <comment>
          Optional contact information.  These are for probes locations typically associated with
          a business or public entity that has associated contact information.
        </comment>
      </elem>
      <elem name="data" multiplicity ="0..1" type="Tensor.json">
        <comment>Optional other information describing this probe location in json format.</comment>
      </elem>
    </struct>

    <struct name ="ProbeSourceInfo">
      <comment>
        Structure contains information about the probe data source.
      </comment>
      <elem name="classDevice"  multiplicity="1" type="DeviceClass" >
        <comment>Required field specifies the class of device used to collect the probe data.</comment>
      </elem>
      <elem name="modelDevice" multiplicity ="1" type="Tensor.string">
        <comment>String defining a device</comment>
      </elem>
      <elem name="mfgDevice" multiplicity ="1" type="Tensor.string">
        <comment>Optional device manufacturer information.</comment>
      </elem>
      <elem name="osNameVer" multiplicity ="1" type="Tensor.uri">
        <comment>Operating system name use the format [os: e.g. windows, android, iphone, custom]/[version: information]/[language]/[etc].</comment>
      </elem>
      <elem name="appNameVer" multiplicity ="1" type="Tensor.string">
        <comment>Specifies the application/library name with version information with the following format.[app name]/[ver].</comment>
      </elem>
      <elem name="idUser" multiplicity ="0..1" type="Tensor.string">
        <comment>Optional user identifier.</comment>
      </elem>
      <elem name="keySource" multiplicity="0..1" type="Tensor.string">
        <comment>Optional source key identifier,  provides public key value to assist in authentication of probe information.</comment>
      </elem>
    </struct>


    <!-- 
    *******************************************************
    Probe Submission API
    *******************************************************
    -->
    <interface name="Probe">
      <comment>Interface for submitting RF probe data.</comment>

      <operation name="Submit">
        <comment>
          Interaction submits probe data and outputs responds with operation result.
        </comment>
        <input name="input" type="Tensor.InputBase"  sid="0x1032">
          <elem name="captureDate" type="datetime" multiplicity="1">
            <comment>General date and time probe data was captured.</comment>
          </elem>
          <elem name="encoding" multiplicity="0..1" type="EncodingFormat" default="0" >
            <comment>
              Probe data and source information encoding format. Probe records may be passed to the service in
              an encoding format different than that outer wire format. This can protect sensitive data.
              By default wire protocol native format is assumed.
            </comment>
          </elem>
          <elem name="sourceInfo" type="ProbeSourceInfo" multiplicity="0..1" encoding ="encoding">
            <comment>
              Optional source information.  If not provided, probe data will ultimately have a low veracity score.  If at all possible
              probe data should have source information.  The system correlates source data with other known sources to calculate veracity.
            </comment>
          </elem>
          <elem name="probes" multiplicity ="0..*" type="ProbeRecord" encoding ="encoding">
            <comment>Zero or more probe records encoded in the specified format.</comment>
          </elem>
        </input>
      </operation>
    </interface>

  </namespace>
</specification>