##Getting devices list HTTP request:
GET http://localhost/devices/${device_uid}
Implementation in OSGi
final ServiceReference[] deviceSRefs = context.getServiceReferences( Device.class.getName(), '(' + Device.SERVICE_UID '=' + device_uid + ')'); if (null == deviceSRefs) { return; // no such services } for (int i = 0; i < deviceSRefs.length; i++) { printDevice(deviceSRefs[i]); }
##Getting a device functions
HTTP request:
GET http://localhost/devices/${device_uid}/functions
final ServiceReference[] functionsRefs = context.getServiceReferences( Function.class.getName(), '(' + Function.SERVICE_DEVICE_UID '=' + device_uid + ')'); if (null == functionsRefs) { return; // no such services } for (int i = 0; i < functionsRefs.length; i++) { printFunction(functionsRefs[i]); }
There was an error while loading. Please reload this page.