edcMessage Data Type

EdcMessage provides an abstraction over the messages sent in and out of the Everyware Cloud platform. It encapsulates all the information regarding the message: the topic it was addressed to, the timestamp when it was received by the platform, and the payload contained in the message. The payload can be represented by a raw binary array or by an EdcPayload object if it was formatted as such when the message was composed and sent. Refer to the EdcPayload documentation for more details on how EdcPayload are modelled and how they can be constructed.
The EdcMessage class is used both by the messages/search API to return message results from the platform, as well as by messages/store and messages/publish API to send messages to the platform.

Namespace
http://eurotech.com/edc/2.0
Schema
edc.xsd
Properties
name data type type namespace min/max occurs description
topic string element edc 0/1 The topic to which this message is sent to. A generic Publishing topic can be represented as accountName/assetId/semanticTopic where:
  • accountName is the name of the Everyware Cloud account owner.
  • assetId is a unique ID representing a particular asset (either the application or the sensors from which the data has been gathered).
  • semanticTopic is the section of the topic used to further specify information about the device or data, using an hierarchical name space representation.
System and control topic starts with the $EDC account and are represented as: $EDC/accountName/assetId/semanticTopic.
receivedOn dateTime element edc 0/1 The timestamp when this message was received by the platform. This timestamp has to be distinguished from the timestamp when the message was sent to the platform, which applications can capture in the EdcPayload timestamp field. In the case of the REST API messages/store and messages/publish, the value provided in this field is ignored and a server-side timestamp will be used.
payload edcPayload element edc 0/1 The payload of this message as EdcPayload object.
uuid string element edc 0/1 The uuid of the published message.

Example

<message xmlns="http://eurotech.com/edc/2.0">
  <topic>...</topic>
  <receivedOn>...</receivedOn>
  <payload>
    <sentOn>...</sentOn>
    <position>
      <longitude>...</longitude>
      <latitude>...</latitude>
      <altitude>...</altitude>
      <precision>...</precision>
      <heading>...</heading>
      <speed>...</speed>
      <timestamp>...</timestamp>
      <satellites>...</satellites>
      <status>...</status>
    </position>
    <metrics>
      <metric/>
    </metrics>
    <body>...</body>
  </payload>
  <uuid>...</uuid>
</message>