|
@@ -0,0 +1,94 @@
|
|
|
+package org.iotivity.bridge.homeserver;
|
|
|
+
|
|
|
+interface ILightControlService {
|
|
|
+
|
|
|
+ /**
|
|
|
+ * retrieve all Bridged device list in Light Control Service
|
|
|
+ * @return devices list data with json array format as String
|
|
|
+ * eg.)
|
|
|
+ * [{"n":"Light Switch", // Device Name
|
|
|
+ * "rt":["oic.d.light"], // Device Resource Type
|
|
|
+ * "sn":"2b32e152-3756-4fb6-b3f2-d8db7aafe39f", // Device Serial Number(Unique Id) will be used for piid in oic/d
|
|
|
+ * "state":"on-line"}, // Device On/Off-Line State
|
|
|
+ * {"n":"Television","rt":["oic.d.tv"], "sn":"2cd8e585-ef21-4fd1-7958-6ca7e54adcce","state":"off-line"}]
|
|
|
+ */
|
|
|
+ String retrieveAllDevices();
|
|
|
+
|
|
|
+ /**
|
|
|
+ * retrieve all resources of the Bridged deivce in Light Control Service
|
|
|
+ * @param device_uuid : unique identity of the device (eg. 15ba3c25-8cdd-41f8-6f9e-fe49105dce0a)
|
|
|
+ * @return resource list data with json array format as String
|
|
|
+ * (eg.
|
|
|
+ * [{"n":"Light Switch", // Resource Name
|
|
|
+ * "uri”:”/light", // Resource URI
|
|
|
+ * "rt":["oic.r.switch.binary"], // Resource Type
|
|
|
+ * "if":"RW"}, // Resource Interace (eg. RW : Read/Write, R:Read Only, A:Actuator, S:Sensor)
|
|
|
+ * {"n":"Dimming Control","uri":"/dimming","rt":["oic.r.light.dimming"], "if":"RW"},
|
|
|
+ * {"n":"Energy Consumption", "uri":"/EnergyConsumptionResURI", "rt": ["oic.r.energy.consumption"], "if":"S"}
|
|
|
+ * {"n":"Color Temperature", "uri":""/ColourTemperatureResURI", "rt": ["oic.r.colour.colourtemperature"], "if":"A"}]
|
|
|
+ *) */
|
|
|
+ String retrieveAllResources(in String device_uuid) ;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * retrieve Getting all properties of the resource in the Bridged device
|
|
|
+ * @param device_uuid unique identity of the device (eg. 15ba3c25-8cdd-41f8-6f9e-fe49105dce0a)
|
|
|
+ * @param resource_uri uri of the resource (eg. /a/light)
|
|
|
+ * @return properties data with json object format as String
|
|
|
+ * (eg.
|
|
|
+ * { "n":"Light Switch", "value":true } or // Light Switch Properties
|
|
|
+ * { "n":"Dimming Control","dimmingSetting":100,"range":100,"step":10 } or // Dimming Control Properties
|
|
|
+ * { "n":"Energy Consumption","power":200.1,"energy":3500.4 } or // Energy Consumption Properties
|
|
|
+ * { "n":"Color Temperature", "ct":457, "range":1000, "step":1 } // Color Temperature Properties
|
|
|
+ * ) */
|
|
|
+ String doGetResourceProperties(in String device_uuid, in String resource_uri) ;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * request Posting the value of properties to the Bridged device
|
|
|
+ * @param device_uuid unique identity of ocf device (eg. 15ba3c25-8cdd-41f8-6f9e-fe49105dce0a)
|
|
|
+ * @param resource_uri uri of ocf resource (eg. /a/light)
|
|
|
+ * @param prop_data the property values of the resource to control as a json object format
|
|
|
+ * (eg. { "power" : true, "level" : 100 } or { "value" : true } or { "dimmingSetting" : 50} )
|
|
|
+ * @return
|
|
|
+ * - true : function call success,
|
|
|
+ * - false : function call fail
|
|
|
+ */
|
|
|
+ boolean doPostResourceProperties(in String device_uuid, in String resource_uri, in String prop_data) ;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * request Observing all properties of the resource to the Bridged device
|
|
|
+ * @param device_uuid unique identity of the device (eg. 15ba3c25-8cdd-41f8-6f9e-fe49105dce0a)
|
|
|
+ * @param resource_uri uri of ocf resource (eg. /a/light)
|
|
|
+ * @return
|
|
|
+ * - true : function call success,
|
|
|
+ * - false : function call fail
|
|
|
+ */
|
|
|
+ //boolean doObserveResource(in String device_uuid, in String resource_uri) ;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * request Observing all properties of the resource to the Bridged device
|
|
|
+ * @param device_uuid unique identity of the device (eg. 15ba3c25-8cdd-41f8-6f9e-fe49105dce0a)
|
|
|
+ * @param resource_uri uri of ocf resource (eg. /a/light)
|
|
|
+ * @return
|
|
|
+ * - true : function call success,
|
|
|
+ * - false : function call fail
|
|
|
+ */
|
|
|
+ //boolean doStopObserveResource(in String device_uuid, in String resource_uri) ;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * request Observing only device specific resources to the Bridged device
|
|
|
+ * @param device_uuid unique identity of the device (eg. 15ba3c25-8cdd-41f8-6f9e-fe49105dce0a)
|
|
|
+ * @return
|
|
|
+ * - true : function call success,
|
|
|
+ * - false : function call fail
|
|
|
+ */
|
|
|
+ //boolean doObserveDeviceSpecificResources(in String device_uuid) ;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * request Observing only device specific resources to the Bridged device
|
|
|
+ * @param device_uuid unique identity of the device (eg. 15ba3c25-8cdd-41f8-6f9e-fe49105dce0a)
|
|
|
+ * @return
|
|
|
+ * - true : function call success,
|
|
|
+ * - false : function call fail
|
|
|
+ */
|
|
|
+ //boolean doStopObserveDeviceSpecificResources(in String device_uuid) ;
|
|
|
+}
|