I think that the XEP-323 timestamp is a bit strange.

I would have a set of measurements or sensor data with
an extra attribute / meta data which is the timestamp.
But in XEP-323 is looks like the timestamp is the top node:

<fields xmlns='urn:xmpp:iot:sensordata' seqnr='4'>
   <node nodeId='Device01'>
         <timestamp value='2013-03-07T19:00:00'>
            <numeric name='Temperature' ../>
            <numeric name='Runtime' .../>
         </timestamp>
    </node>
</fields>

So in this case is looks like the timestamp has a set of attributes
that are temperatures, runtime, etc. which feels a bit strange.
I think it would make more sense if it would be like this:

<sensordata>
   <timestamp value='xxx'>
   <numeric ...>
   <numeric ...>
   <numeric ...>
</sensordata>

or (timestamp in the sensordata node)

<sensordata timestamp='xxx'>
   <numeric ...>
   <numeric ...>
   <numeric ...>
</sensordata>




Best regards,
-- Joakim Eriksson, SICS

Reply via email to