FRAMES NO FRAMES | |||||||
| |||||||
SUMMARY: IMPORT | CONSTANT | FIELD | ACTION | DETAIL: IMPORT | CONSTANT | FIELD | ACTION |
send Measurement("","c8y_DistanceMeasurement","123",1464359005.396,{"distance":{"distance":com.apama.cumulocity.MeasurementValue(3.44,"mm",new dictionary<string, any>)}},new dictionary<string, any>) to Measurement.SEND_CHANNEL;
send Measurement("","c8y_LightMeasurement","12346081",1464359004.89,{"c8y_LightMeasurement":{"e":com.apama.cumulocity.MeasurementValue(108.1,"lux",new dictionary<string, any>)}},new dictionary<string, any>) 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. |
Field summary | |
---|---|
string | id Unique identifier for this Measurement. |
string | type The type of the measurement. |
string | source The unique identifier of the managed object source for the measurement. |
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() Split 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.
Field 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 managed object source for the measurement.
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()Split 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.
monitor.subscribe(Measurement.SUBSCRIBE_CHANNEL);
Measurement m := new Measurement;
// set fields in m
integer reqId := com.apama.cumulocity.Util.generateReqId();
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
}
send m.withChannelResponse(reqId, { "X-Cumulocity-Processing-Mode": "TRANSIENT" }) to Measurement.SEND_CHANNEL;
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();
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
}
send m.withResponse(reqId, { "X-Cumulocity-Processing-Mode": "TRANSIENT" }) to Measurement.SEND_CHANNEL;
FRAMES NO FRAMES | |||||||
| |||||||
SUMMARY: IMPORT | CONSTANT | FIELD | ACTION | DETAIL: IMPORT | CONSTANT | FIELD | ACTION |