Apama 10.1 | Apama Documentation | Connecting Apama Applications to External Components | Standard Connectivity Plug-ins | The Cumulocity IoT Transport Connectivity Plug-in | Using Cumulocity IoT connectivity from EPL | Device events
 
Device events
During application initialization (onApplicationInitialized), if requestAllDevices is enabled (true by default), the adapter sends all device/asset related information using the com.apama.cumulocity.ManagedObject event on the com.apama.cumulocity.ManagedObject.CHANNEL (same as cumulocity.devices) channel.
After all devices/assets have been sent, the adapter sends a com.apama.cumulocity.RequestAllDevicesComplete(-1) event.
Example of a device event:
ManagedObject("43026768","com_ublox_C027_REV-A","Mbed Test Device",
["c8y_Relay","c8y_Configuration","c8y_Message"],[],[],[],
{"alt":610.2,"lat":17.426479,"lng":78.33123},{,"c8y_Availability":any(dictionary,
{any(string,"status"):any(string,"UNAVAILABLE")}), ,
"c8y_Hardware":any(dictionary,{any(string,"model"):any(string,"Ublox C027"),
any(string,"revision"):any(string,"1"),any(string,
"serialNumber"):any(string,"352648069564516")}),
"c8y_IsDevice":any(dictionary,{}),"c8y_Mobile":any(dictionary,
{any(string,"cellId"):any(string,
"14D80CD"),any(string,"iccid"):any(string,"89914905900016774658"),
any(string,"imei"):any(string,"352648069564516")}),
"c8y_MotionTracking":any(dictionary,{any(string,"active"):any(boolean,true),
any(string,"interval"):any(integer,0)}),"c8y_RequiredAvailability":any(dictionary,
{any(string,"responseInterval"):any(integer,20)}),
"com_cumulocity_model_Agent":any(dictionary,{}),
"owner":any(string,"device_352648069564516")})
If subscribeToDevices is enabled (true by default), any devices added to Cumulocity IoT after application initialization will be sent to the default channel.

Copyright © 2013-2018 | 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.