org.dxc.api.datatypes
Class SensorData

Object
  extended by org.dxc.api.datatypes.DxcData
      extended by org.dxc.api.datatypes.SensorData

public class SensorData
extends DxcData

Data structure for sensor data messages.


Constructor Summary
SensorData(long timestamp, StringValueMap sensors)
          Constructor.
SensorData(StringValueMap sensors)
          Constructor.
 
Method Summary
 boolean equals(Object o)
           
 Map<String,Value> getSensorValueMap()
          Returns the map from sensor to Value.
 int hashCode()
           
 OutputStream put(OutputStream os)
          Prints DxcData.
 
Methods inherited from class org.dxc.api.datatypes.DxcData
getCurrentTime, getSource, getTimeStamp, setSource, setTimeStamp, toString
 
Methods inherited from class Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SensorData

public SensorData(long timestamp,
                  StringValueMap sensors)
Constructor.

Parameters:
timestamp - - message timestamp.
sensors - - map containing data points for each sensor.

SensorData

public SensorData(StringValueMap sensors)
Constructor.

Parameters:
sensors - - map containing data points for each sensor.
Method Detail

getSensorValueMap

public Map<String,Value> getSensorValueMap()
Returns the map from sensor to Value. If the type of datapoint is unknown (it should be made known, for example through an XML system catalog), the Value type for each point must be determined by trial and error (using RTTI or dynamic_cast null tests).


put

public OutputStream put(OutputStream os)
Description copied from class: DxcData
Prints DxcData.

Specified by:
put in class DxcData

equals

public boolean equals(Object o)
Overrides:
equals in class DxcData

hashCode

public int hashCode()
Overrides:
hashCode in class DxcData