Apama 10.3.1 | Apama Documentation | Connecting Apama Applications to External Components | Standard Connectivity Plug-ins | The Cumulocity IoT Transport Connectivity Plug-in | Using measurements | Sending a measurement
 
Sending a measurement
Measurement m := new Measurement;
m.type := <MEASUREMENT_TYPE>;
m.source := <SOURCE>;
m.time := currentTime;
MeasurementValue mv := new MeasurementValue;
mv.value := 1.0;
mv.unit := "V";
dictionary<string, MeasurementValue> dict := {"voltage": mv};
m.measurements.add(m.type, dict);
send m to Measurement.CREATE_CHANNEL;
Where
*<SOURCE> is the source of the alarm (same as the ManagedObject identifier).
*<MEASUREMENT_TYPE> is the type of the measurement. For example, c8y_VoltageMeasurement.

Copyright © 2013-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.