Subscribe to News

Elements of a Location server message

From TechnologicalWiki

Jump to: navigation, search

List of all possible elements of a message:

1.- osami: XML root for all messages

  • type (mandatory attribute): Indicates the content of the xml
    • loc: Reporting localization data
    • req: Requesting information
    • att: Link a user to a device
    • det: Unlink a user to a device
    • rul: Defining rules
    • ans: Server answer
    • eve: Server event

2.- agent: Is the device that reports localization. The information is valid for itself and/or other devices. Agent's information is composed by:

  • id: A unique code that identifies individually each agent. eg: Ethernet MAC address
  • name: A given name to ease the identification of the agent. eg: myDesktopPC
  • type (attribute): Indicates type of localization or positioning system
    • BT (Bluetooth) Indicates 10 meters precision
    • WIFI Indicates 50 meters precision
    • GPS

3.- device: Is the mobile device that is detected. In some cases it could be the same as the agent. Device's information is composed by:

  • id: A unique code that identifies individually each agent. eg: Bluetooth MAC address
  • name: A given name to ease the identification of the agent. eg: myAndroidMobile
  • range (attribute): Indicates that the device enters or leaves agent's detection range. It could be true or false

4.- localization: Is the information about location or positioning. Locations are composed by:

  • name: Optional name of the position. eg: Brandenburgweg, 13629 Berlin, Germany, 1stFloorPrinter, or myJobOffice
  • coor: Geographical coordinates can be provided to place the location on a map. To reduce accuracy, or just define a simple area, add radius in meters to coordinates. eg: Latitude, longitude coordinates and radius 52.551632,13.279717 or 52.551632,13.279717, 100
  • date: The time when the device enters or leaves agent's detection range

5.- user: Is the person about the localization information is about. One person can be linked to several devices. User's information is composed by:

  • name: A string that identifies certain person. eg: John Smith
  • address: A valid XMPP address. eg: joseluis@osami.tid.es

6.- rule: Is a condition that should be communicated when it is true. A rule is composed by:

  • id: A unique code that identifies individually each rule.
  • agent: True when a device enters or leaves agent's range. Requires agent id
  • localization: True when a device enters or leaves a place. Requires either name or coor
  • device: One or more devices could be specified. The rule applies only to those devices. Requires device id
  • user: One or more Users could be specified. The rule applies only to devices linked to them. Requires user name.

Note: When neither devices or users are specified, all devices matching the rule are reported.

  • address: A valid XMPP address to report events. Requires xmpp address
  • remove (attribute) = true. Requires rule id

7.- message: Is a plain text message. Often used for servers answer.

  • type: True or False indicating if the operation is processed or not
  • number: A number indicating the type of process if there is any. Click here to see Server answer codes.
    • 100: Means xml format error
    • 200: Means information stored into database
    • etc...
  • text: A text with a human explanation to ease debugging
    • User information updated
    • This is not an XMPP address
    • etc...

Several message elements may appear more than one time on the same message, To ease the parsing of XML messages, this collections of elements can be grouped into another level of the hierarchy. The label of this group should the plural of the content. As an example, a device collection can be grouped into a devices directory, or a rule collection into a rules one.


Return to OSAmI-ES Developments

Main Collaborators