com.apama.cumulocity
Event Measurement


Measurement data.

Sent by the transport when a device sends a new Measurement. Requires SubscribeMeasurements or configuration property subscribeToAllMeasurements. Sent to the cumulocity.measurements channel.

Examples:
 Measurement("1001","c8y_LightMeasurement","12346081",1464359004.89,{"c8y_LightMeasurement":{"e":com.apama.cumulocity.MeasurementValue(108.1,"lux",{})}},{}) 
Measurement("1002","c8y_DistanceMeasurement","12346082",1464359005.396,{"c8y_DistanceMeasurement":{"distance":com.apama.cumulocity.MeasurementValue(344,"mm","","","",{})}},{})


Additionally, we can also create a new Measurement for a device. To create a Measurement, send a Measurement event object to Measurement.CREATE_CHANNEL.

Examples:
 send Measurement("","c8y_DistanceMeasurement","123",1464359005.396,{"distance":{"distance":MeasurementValue(3.44,"mm",{})}},{}) to Measurement.CREATE_CHANNEL; 

Constant summary
 stringCHANNEL := "cumulocity.measurements"

The channel to which Measurement events are sent from the transport.
 stringCREATE_CHANNEL := "CumulocityIoT"

The channel to send a measurement event to create a new measurement object in Cumulocity.
 
Member summary
 stringid

Unique identifier for this Measurement.
 stringtype

The type of the measurement.
 stringsource

The unique identifier of the source of the measurement. This should correspond to a ManagedObject.
 floattime

The time the measurement was taken, represented as the number of seconds since the epoch (1st January 1970).
 dictionary<stringdictionary<stringcom.apama.cumulocity.MeasurementValue>>measurements

Measurement values mapped by fragment and series.
 dictionary<stringany>params

This dictionary is available to hold any other data associated with the measurement.
 
Constant detail

CHANNEL

string CHANNEL := "cumulocity.measurements"
The channel to which Measurement events are sent from the transport.

CREATE_CHANNEL

string CREATE_CHANNEL := "CumulocityIoT"
The channel to send a measurement event to create a new measurement object in Cumulocity.
Member detail

id

string id
Unique identifier for this Measurement.

Supply as empty if creating a new Measurement

measurements

dictionary<stringdictionary<stringcom.apama.cumulocity.MeasurementValue>> measurements
Measurement values mapped by fragment and series.

Dictionary mapping from fragment name to a dictionary mapping from series name to MeasurementValue objects.

params

dictionary<stringanyparams
This dictionary is available to hold any other data associated with the measurement.

source

string source
The unique identifier of the source of the measurement. This should correspond to a ManagedObject.

time

float time
The time the measurement was taken, represented as the number of seconds since the epoch (1st January 1970).

type

string type
The type of the measurement.