CommonDefs.xid.xml 10.7 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 XtensibleInterfaceDefinition.xsd"
               identity="CommonDefs.xid.xml">
  <title>SLAM Common Definitions</title>
  <comment>This file defines commonly used structures and enumerations used throughout the SLAM system.</comment>

  <!-- Include all known definitions -->
  <import ref="https://xid.location.studio/Tensor/V1.0.0/Definitions.xid.xml" local="Definitions.xid.xml" />
  <import ref="https://xid.location.studio/HPE/V1.1.1/HpeCore.xid.xml" local="HpeCore.xid.xml" />

  <namespace name="SLAM">

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

    <!-- 
    *************************************
    * Enumerations 
    *************************************
    -->    
    
    <enum name="CoordRefFrameType" type="Tensor.int8" default="unknown">
      <comment>Enumerations defines the supported coordinate reference frames</comment>
      <literal name="unknown" value="0"></literal>
      <literal name="WGS84" value="1"></literal>
      <literal name="ENU" value="2"></literal>
      <literal name="NED" value="3"></literal>
    </enum>


    <!-- 
    *************************************
    * HashKey Definition. 
    *************************************
    -->

    <type name="HashKey" size="12">
      <comment>12 byte hashkey for reference point identifiers.</comment>
      <!-- <lang name="c" type="UUID" include="SLAM/CXMF/haskey.h"/> -->
      <lang name="cpp" type="::SLAM::HashKey" include="SLAM/HashKey.h"/>
      <!--
      <lang name="java" type="SlamHasKey" include="com.comtechtel.tensor.SLAM.Hashkey"/>
      <lang name="node" type=" SlamHasKey "/>
      -->
    </type>
   

    <!-- 
    *************************************
    * BoundingBox Definition. 
    *************************************
    -->
    <struct name="BoundingBox" pack="true">

      <comment>defines the bounding box parameters</comment>
      <elem name="latmin" type="Tensor.float64" multiplicity="1" >
        <comment>minimum value of the latitude</comment>
      </elem>
      <elem name="latmax" type="Tensor.float64" multiplicity="1" >
        <comment>maximum value of the latitude</comment>
      </elem>
      <elem name="lonmin" type="Tensor.float64" multiplicity="1" >
        <comment>minimum value of the longitude</comment>
      </elem>
      <elem name="lonmax" type="Tensor.float64" multiplicity="1" >
        <comment>maximum value of the longitude</comment>
      </elem>

      <elem name="altmin" type="Tensor.float64" multiplicity="1" >
        <comment>minimum value of the altitude</comment>
      </elem>
      <elem name="altmax" type="Tensor.float64" multiplicity="1" >
        <comment>maximum value of the altitude</comment>
      </elem>

    </struct>

    <!-- 
    *************************************
    * ContactInfo Definition. 
    *************************************
    -->
    <struct name="ContactInfo">
      <elem name="givenname" multiplicity ="1" type="string" >
        <comment>Contact given (first) name. Default is empty.</comment>
      </elem>
      <elem name="surname" multiplicity ="1" type="string" >
        <comment>Contact surname (last name). Default is empty.</comment>
      </elem>

      <elem name="email" multiplicity ="1" type="string" >
        <comment>Contact email addres. Default is empty.</comment>
      </elem>
      <elem name="phone" multiplicity ="1" type="string" >
        <comment>Contact phone number. Default is empty.</comment>
      </elem>
    </struct>

    <!-- 
    *************************************
    * AddressInfo Definition. 
    *************************************
    -->
    <struct name="AddressInfo">
      <elem name="address1" multiplicity ="1" type="string">
        <comment>First line street address. Default is empty.</comment>
      </elem>
      <elem name="address2" multiplicity ="1" type="string">
        <comment>Second line street address. Default is empty.</comment>
      </elem>
      <elem name="City" multiplicity ="1" type="string">
        <comment>Name of City. Default is empty.</comment>
      </elem>
      <elem name="StateRegion" multiplicity ="1" type="string">
        <comment>State or region. Two character state definitions ok for U.S. addresses. Default is empty.</comment>
      </elem>
      <elem name="PostalCode" multiplicity ="1" type="string">
        <comment>Postal code or zip code. Default is empty.</comment>
      </elem>
      <elem name="Country" multiplicity ="1" type="string">
        <comment>Name of the country. Default is empty.</comment>
      </elem>

    </struct>


    <!-- 
    *************************************
    * SurveyInfo Definition. 
    *************************************
    -->
    <struct name="SurveyInfo">
      <comment>General information about the survey.</comment>
      <elem name="name" multiplicity ="1" type="string" >
        <comment>Optional name to describe the identify of the survey</comment>
      </elem>
      <elem name="flrmax" multiplicity ="1" type="int8" default ="0">
        <comment>Optional maximum floor identifier, default is zero meaning the ground floor</comment>
      </elem>
      <elem name="flrmin" multiplicity ="1" type="int8" default ="0">
        <comment>Optional minimum floor identifier, default is zero meaning the ground floor</comment>
      </elem>
      <elem name="appid" multiplicity ="1" type="string" >
        <comment>Application identifier used to collect the survey data. Default is empty "".</comment>
      </elem>
      <elem name="appver" multiplicity ="1" type="string" >
        <comment>Application version used to collect the survey data. Default is empty "".</comment>
      </elem>
      <elem name="createdate" type="datetime" multiplicity="1">
        <comment>Date and time the survey was created or conducted.</comment>
      </elem>
      <elem name="contact" multiplicity ="0..1" type="ContactInfo" >
        <comment>Optional contact information.</comment>
      </elem>
      <elem name="address" multiplicity ="0..1" type="AddressInfo" >
        <comment>Optional address information.</comment>
      </elem>
      <elem name="datestart" type="datetime" multiplicity="0..1">
        <comment>Date and time of when this survey is valid.  Do not define if unknown.</comment>
      </elem>
      <elem name="dateend" type="datetime" multiplicity="0..1">
        <comment>Last date and time of when this survey is valid.  Do not define if unknown.</comment>
      </elem>
    </struct>

    <!-- 
    *************************************
    * PointOfInterest Definition. 
    *************************************
    -->
    <struct name="PointOfInterest">
      <elem name="name" multiplicity ="1" type="string">
        <comment>Name of the point of interest.</comment>
      </elem>
      <elem name="floor" multiplicity ="1" type="int16" default ="0">
        <comment>Optional floor identifier, default is zero meaning the ground floor</comment>
      </elem>
      <elem name="description" multiplicity ="1" type="string">
        <comment>Other information describing the point of interest.</comment>
      </elem>
      <elem name="location" multiplicity="1" type="Shape" polymorphic="true" >
        <comment>
          Location of the POI.  Polymorphic type, see specializationsfrom Shape for details.
        </comment>
      </elem>
      <elem name="confidence" type="float32" multiplicity="1">
        <comment>Confidence of position shape.  Valid range is 0.0 to 1.0</comment>
      </elem>
      <elem name="address" multiplicity ="0..1" type="AddressInfo" >
        <comment>Optional address information.</comment>
      </elem>
      <elem name="contact" multiplicity ="0..1" type="ContactInfo" >
        <comment>Optional contact information.</comment>
      </elem>
    </struct>

    <!-- 
    *************************************
    * SurveyRecord Definition. 
    *************************************
    -->
    <struct name="SurveyRecord" >
      <comment>A Survey Record.</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>
          Optional Set of observation data encoded in the format specified by encObs.\n
          At  least one of observations or state is required,
          otherwise there is insufficient data to process.
        </comment>
      </elem>
    </struct>

    <!-- 
    *************************************
    * SurveyData Definition. 
    *************************************
    -->
    <struct name ="SurveyData">
      
      <elem name ="surveyid" type="Tensor.UUID" multiplicity="1" >
        <comment>Identifies the unique id of the survey</comment>
      </elem>

      <elem name ="part" type="int32" multiplicity="1" default="0">
        <comment>Zero based part index of survey indicating data is in parts.</comment>
      </elem>

      <elem name ="type" type="uri" multiplcity="1">
        <comment>Type uri, provides information on the type of survey. This can indicate a variety of things and is used for search.</comment>
      </elem>      
      
      <elem name ="source" type="uri" multiplcity="1">
        <comment>Source uri, provides information on how survey data was sourced, potentially ownership.</comment>
      </elem>

      <elem name ="veracity" type="float32" multiplcity="1">
        <comment>Veracity of the survey data contained.  This is a measure between 0 and 1 about the quality and trustworthiness of the data collected.  Veracity of 1 is the highest trust.</comment>
      </elem>


      <elem name="info" multiplicity="1" type="SurveyInfo">
        <comment>
          Optional survey information.
        </comment>
      </elem>
      
      <elem name="records" multiplicity="0..*" type="SurveyRecord">
        <comment>
          Survey record(s) collected by the survey.
        </comment>
      </elem>
      
      <elem name="pois" multiplicity="0..*" type="PointOfInterest">
        <comment>
          Points of interest collected by the survey.
        </comment>
      </elem>
    
    </struct>

  </namespace>
</specification>