FRAMES NO FRAMES | |||||||
| |||||||
SUMMARY: IMPORT | CONSTANT | MEMBER | ACTION | DETAIL: IMPORT | CONSTANT | MEMBER | ACTION |
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","","","",{})}},{})
send Measurement("","c8y_DistanceMeasurement","123",1464359005.396,{"distance":{"distance":MeasurementValue(3.44,"mm",{})}},{}) to Measurement.SEND_CHANNEL;
Constant summary | |
---|---|
string | CHANNEL := "cumulocity.measurements"
The channel to which Measurement events are sent from the transport.
|
string | CREATE_CHANNEL := "CumulocityIoTGenericChain"
The channel to send a measurement event to create a new measurement object in Cumulocity.
|
string | SEND_CHANNEL := "CumulocityIoTGenericChain"
The channel to send a measurement event to create a new measurement object in Cumulocity. |
string | SUBSCRIBE_CHANNEL := "cumulocity.measurements"
The channel to which Measurement events are sent from the transport. |
Member summary | |
---|---|
string | id
Unique identifier for this Measurement. |
string | type
The type of the measurement. |
string | source
The unique identifier of the source of the measurement. This should correspond to a ManagedObject. |
float | time
The time the measurement was taken, represented as the number of seconds since the epoch (1st January 1970). |
dictionary<string, dictionary<string, com.apama.cumulocity.MeasurementValue>> | measurements
Measurement values mapped by fragment and series. |
dictionary<string, any> | params
This dictionary is available to hold any other data associated with the measurement. |
Action summary | |
---|---|
com.apama.cumulocity.Measurement | static createFromFragments(sequence<com.apama.cumulocity.MeasurementFragment> fragments)
Create Measurement event from sequence of MeasurementFragments. |
sequence<com.apama.cumulocity.MeasurementFragment> |
getFragments()
Fragment a measurement into a sequence of MeasurementFragments. |
com.apama.cumulocity.ResponseWrapper |
withChannelResponse(integer reqId, dictionary<string, string> headers)
Create a Measurement in Cumulocity and receive a response event confirming the change on Measurement.SUBSCRIBE_CHANNEL. |
com.apama.cumulocity.ResponseWrapper |
withResponse(integer reqId, dictionary<string, string> headers)
Create a Measurement in Cumulocity and receive a response event on default channel, confirming the change.
|
Constant detail |
---|
string CHANNEL := "cumulocity.measurements"
string CREATE_CHANNEL := "CumulocityIoTGenericChain"
string SEND_CHANNEL := "CumulocityIoTGenericChain"The channel to send a measurement event to create a new measurement object in Cumulocity.
string SUBSCRIBE_CHANNEL := "cumulocity.measurements"The channel to which Measurement events are sent from the transport.
Member detail |
---|
string idUnique identifier for this Measurement.
dictionary<string, dictionary<string, com.apama.cumulocity.MeasurementValue>> measurementsMeasurement values mapped by fragment and series.
dictionary<string, any> paramsThis dictionary is available to hold any other data associated with the measurement.
string sourceThe unique identifier of the source of the measurement. This should correspond to a ManagedObject.
float timeThe time the measurement was taken, represented as the number of seconds since the epoch (1st January 1970).
string typeThe type of the measurement.
Action detail |
---|
com.apama.cumulocity.Measurement static createFromFragments(sequence<com.apama.cumulocity.MeasurementFragment> fragments)Create Measurement event from sequence of MeasurementFragments.
sequence<com.apama.cumulocity.MeasurementFragment> getFragments()Fragment a measurement into a sequence of MeasurementFragments.
com.apama.cumulocity.ResponseWrapper withChannelResponse(integer reqId, dictionary<string, string> headers)Create a Measurement in Cumulocity and receive a response event confirming the change on Measurement.SUBSCRIBE_CHANNEL.
Measurement m := new Measurement;
monitor.subscribe(Measurement.SUBSCRIBE_CHANNEL);
// set fields in m
integer reqId := com.apama.cumulocity.Util.generateReqId();
send m.withChannelResponse(reqId, { "X-Cumulocity-Processing-Mode": "TRANSIENT" }) to Measurement.SEND_CHANNEL;
on ObjectCommitted(reqId=reqId) as commit and not ObjectCommitFailed(reqId=reqId) {
// do something
}
on ObjectCommitFailed(reqId=reqId) as failure and not ObjectCommitted(reqId=reqId) {
// do something
}
com.apama.cumulocity.ResponseWrapper withResponse(integer reqId, dictionary<string, string> headers)
Measurement m := new Measurement;
// set fields in m
integer reqId := com.apama.cumulocity.Util.generateReqId();
send m.withResponse(reqId, { "X-Cumulocity-Processing-Mode": "TRANSIENT" }) to Measurement.SEND_CHANNEL;
on ObjectCommitted(reqId=reqId) as commit and not ObjectCommitFailed(reqId=reqId) {
// do something
}
on ObjectCommitFailed(reqId=reqId) as failure and not ObjectCommitted(reqId=reqId) {
// do something
}
FRAMES NO FRAMES | |||||||
| |||||||
SUMMARY: IMPORT | CONSTANT | MEMBER | ACTION | DETAIL: IMPORT | CONSTANT | MEMBER | ACTION |