Apama 10.2 | Apama Documentation | Connecting Apama Applications to External Components | Standard Connectivity Plug-ins | The Cumulocity IoT Transport Connectivity Plug-in | Using managed objects
 
Using managed objects
 
Updating a managed object
Querying for managed objects
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:
com.apama.cumulocity.ManagedObject("44578836","","Device_1",
["c8y_Restart","c8y_Meassage","c8y_Relay"],
["c8y_TemperatureMeasurement","c8y_LightMeasurement"],
[],[],[],[],{},
{"c8y_IsDevice":any(dictionary<any,any>,{}),
"owner":any(string,"Cumulocity_User")})
If subscribeToDevices is enabled (true by default), any devices added to Cumulocity IoT after application initialization will be sent to the com.apama.cumulocity.ManagedObject.CHANNEL channel.
See the com.apama.cumulocity.RequestAllDevices event for refreshing the list of devices. Note that the com.apama.cumulocity.RequestAllDevices event is sent to the channel defined by the CHANNEL constant on the RequestAllDevices event. The device events are sent to the channel specified in the RequestAllDevices event and followed by a com.apama.cumulocity.RequestAllDevicesComplete event with the requestId sent in the RequestAllDevices event.

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.
Innovation Release