FRAMES NO FRAMES | |||||||
| |||||||
SUMMARY: IMPORT | CONSTANT | MEMBER | ACTION | DETAIL: IMPORT | CONSTANT | MEMBER | ACTION |
Event("21","c8y_EntranceEvent","12346082",1464364483.396,"Entrance event triggered.",{"distance":any(float,317)})
Event("22","com_cumulocity_events_TamperEvent","12345",1464364483.396,"Tamper sensor triggered",{"history":{}})
Create an Event, send Event("","c8y_EntranceEvent","12346082",1464364483.396,"Entrance event triggered.",{"distance":any(float,317)}) to Event.SEND_CHANNEL;
You can update the text field. send Event("22","c8y_EntranceEvent","12346082",1492676483.396,"Tamper sensor triggered",{}) to Event.SEND_CHANNEL;
Constant summary | |
---|---|
string | CHANNEL := "CumulocityIoTGenericChain"
The channel for sending updates/ new Events to.
|
string | NOTIFICATION_CREATED := "CREATED"
Value of PARAM_NOTIFICATION that indicates this a new object. |
string | NOTIFICATION_UPDATED := "UPDATED"
Value of PARAM_NOTIFICATION that indicates this an update to an existing object. |
string | PARAM_NOTIFICATION := ".apama_notificationType"
Entry in params that identifies if this is a new object or an update to an existing object. Entry will have a value matching either NOTIFICATION_CREATED or NOTIFICATION_UPDATED. |
string | SEND_CHANNEL := "CumulocityIoTGenericChain"
The channel for sending Events. |
string | SUBSCRIBE_CHANNEL := "cumulocity.measurements"
The channel for receiving Events. |
Member summary | |
---|---|
string | id
Unique identifier for this Event. |
string | type
The type of the Cumulocity event. |
string | source
Identifier of the source of the event. |
float | time
Timestamp of the event. |
string | text
Text or message of the Event. |
dictionary<string, any> | params
Any other properties available on the Event . |
Action summary | |
---|---|
com.apama.cumulocity.ResponseWrapper |
withChannelResponse(integer reqId, dictionary<string, string> headers)
Create or update an Event in Cumulocity and receive a response event confirming the change on Event.SUBSCRIBE_CHANNEL. |
com.apama.cumulocity.ResponseWrapper |
withResponse(integer reqId, dictionary<string, string> headers)
Create or update an Event in Cumulocity and receive a response event on default channel, confirming the change.
|
Constant detail |
---|
string CHANNEL := "CumulocityIoTGenericChain"
string NOTIFICATION_CREATED := "CREATED"Value of PARAM_NOTIFICATION that indicates this a new object.
string NOTIFICATION_UPDATED := "UPDATED"Value of PARAM_NOTIFICATION that indicates this an update to an existing object.
string PARAM_NOTIFICATION := ".apama_notificationType"Entry in params that identifies if this is a new object or an update to an existing object. Entry will have a value matching either NOTIFICATION_CREATED or NOTIFICATION_UPDATED.
string SEND_CHANNEL := "CumulocityIoTGenericChain"The channel for sending Events.
string SUBSCRIBE_CHANNEL := "cumulocity.measurements"The channel for receiving Events.
Member detail |
---|
string idUnique identifier for this Event.
dictionary<string, any> paramsAny other properties available on the Event .
string sourceIdentifier of the source of the event.
string textText or message of the Event.
float timeTimestamp of the event.
string typeThe type of the Cumulocity event.
Action detail |
---|
com.apama.cumulocity.ResponseWrapper withChannelResponse(integer reqId, dictionary<string, string> headers)Create or update an Event in Cumulocity and receive a response event confirming the change on Event.SUBSCRIBE_CHANNEL.
Event e := new Event;
monitor.subscribe(Event.SUBSCRIBE_CHANNEL);
// set fields in e
integer reqId := com.apama.cumulocity.Util.generateReqId();
send e.withChannelResponse(reqId, { "X-Cumulocity-Processing-Mode": "TRANSIENT" }) to Event.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)
Event e := new Event;
// set fields in e
integer reqId := com.apama.cumulocity.Util.generateReqId();
send e.withResponse(reqId, { "X-Cumulocity-Processing-Mode": "TRANSIENT" }) to Event.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 |