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.