org.universAAL.hw.exporter.zigbee.ha.devices
Class OnOffLightCallee

Package class diagram package OnOffLightCallee
java.lang.Object
  extended by org.universAAL.middleware.bus.member.BusMember
      extended by org.universAAL.middleware.bus.member.Callee
          extended by org.universAAL.middleware.service.ServiceCallee
              extended by org.universAAL.hw.exporter.zigbee.ha.devices.ExporterActuatorCallee
                  extended by 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

Field Summary
 
Fields inherited from class org.universAAL.hw.exporter.zigbee.ha.devices.ExporterActuatorCallee
IN_DEVICE, NAMESPACE, newProfiles, OUT_GET_ON_OFF, SERVICE_GET_ON_OFF, SERVICE_TURN_OFF, SERVICE_TURN_ON
 
Fields inherited from class org.universAAL.middleware.bus.member.BusMember
busResourceURI, owner, theBus
 
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 org.universAAL.hw.exporter.zigbee.ha.devices.ExporterActuatorCallee
communicationChannelBroken, getServiceProfiles, unregister
 
Methods inherited from class org.universAAL.middleware.service.ServiceCallee
addNewServiceProfiles, busDyingOut, getMyID, handleRequest, removeMatchingProfiles
 
Methods inherited from class org.universAAL.middleware.bus.member.BusMember
close, getType, getURI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 context
serv - The OSGi service backing the interaction with the device in the abstraction layer
Method Detail

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.