org.universAAL.hw.exporter.zigbee.ha.devices
Class OnOffLightCallee
java.lang.Object
org.universAAL.middleware.bus.member.BusMember
org.universAAL.middleware.bus.member.Callee
org.universAAL.middleware.service.ServiceCallee
org.universAAL.hw.exporter.zigbee.ha.devices.ExporterActuatorCallee
org.universAAL.hw.exporter.zigbee.ha.devices.OnOffLightCallee
- All Implemented Interfaces:
- it.cnr.isti.zigbee.ha.cluster.glue.general.event.OnOffListener
public class OnOffLightCallee
- extends ExporterActuatorCallee
- implements it.cnr.isti.zigbee.ha.cluster.glue.general.event.OnOffListener
Exporter class that acts as wrapper towards uAAL. Connects interaction of the
device with the uAAL middleware through the service and context buses.
- Author:
- alfiva
Constructor Summary |
OnOffLightCallee(ModuleContext context,
it.cnr.isti.zigbee.ha.device.api.lighting.OnOffLight serv)
Constructor to be used in the exporter, which sets up all the exporting
process. |
Method Summary |
void |
changedOnOff(it.cnr.isti.zigbee.ha.cluster.glue.general.event.OnOffEvent event)
|
Boolean |
executeGet()
When a GET STATUS service request is received, this method is called
automatically. |
boolean |
executeOff()
When a SET OFF service request is received, this method is called
automatically. |
boolean |
executeOn()
When a SET ON service request is received, this method is called
automatically. |
ServiceResponse |
handleCall(ServiceCall call)
The actual service method of the ServiceCallee . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OnOffLightCallee
public OnOffLightCallee(ModuleContext context,
it.cnr.isti.zigbee.ha.device.api.lighting.OnOffLight serv)
- Constructor to be used in the exporter, which sets up all the exporting
process.
- Parameters:
context
- The OSGi contextserv
- The OSGi service backing the interaction with the device in
the abstraction layer
handleCall
public ServiceResponse handleCall(ServiceCall call)
- Description copied from class:
ServiceCallee
- The actual service method of the
ServiceCallee
. It is called
by the bus whenever there is a call that need to be serviced by this
ServiceCallee
.
- Overrides:
handleCall
in class ExporterActuatorCallee
- Parameters:
call
- the call that needs to be serviced.
- Returns:
- the result of the call execution.
executeOn
public boolean executeOn()
- Description copied from class:
ExporterActuatorCallee
- When a SET ON service request is received, this method is called
automatically.
- Specified by:
executeOn
in class ExporterActuatorCallee
- Returns:
true
if the actuator could be set to ON
executeOff
public boolean executeOff()
- Description copied from class:
ExporterActuatorCallee
- When a SET OFF service request is received, this method is called
automatically.
- Specified by:
executeOff
in class ExporterActuatorCallee
- Returns:
true
if the actuator could be set to OFF
executeGet
public Boolean executeGet()
- Description copied from class:
ExporterActuatorCallee
- When a GET STATUS service request is received, this method is called
automatically.
- Specified by:
executeGet
in class ExporterActuatorCallee
- Returns:
- The Boolean value representing the status property of the
actuator.
changedOnOff
public void changedOnOff(it.cnr.isti.zigbee.ha.cluster.glue.general.event.OnOffEvent event)
- Specified by:
changedOnOff
in interface it.cnr.isti.zigbee.ha.cluster.glue.general.event.OnOffListener
Copyright © 2014 universAAL Consortium. All Rights Reserved.