Search in sources :

Example 6 with CommandClass

use of org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveCommandClass.CommandClass in project openhab1-addons by openhab.

the class ZWaveNode method addCommandClass.

/**
     * Adds a command class to the list of supported command classes by this node.
     * Does nothing if command class is already added.
     *
     * @param commandClass the command class instance to add.
     */
public void addCommandClass(ZWaveCommandClass commandClass) {
    CommandClass key = commandClass.getCommandClass();
    if (!supportedCommandClasses.containsKey(key)) {
        logger.debug("NODE {}: Adding command class {} to the list of supported command classes.", nodeId, commandClass.getCommandClass().getLabel());
        supportedCommandClasses.put(key, commandClass);
        if (commandClass instanceof ZWaveEventListener) {
            this.controller.addEventListener((ZWaveEventListener) commandClass);
        }
    }
}
Also used : ZWaveMultiInstanceCommandClass(org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveMultiInstanceCommandClass) ZWaveAssociationCommandClass(org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveAssociationCommandClass) ZWaveWakeUpCommandClass(org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveWakeUpCommandClass) CommandClass(org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveCommandClass.CommandClass) ZWaveSecurityCommandClass(org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveSecurityCommandClass) ZWaveVersionCommandClass(org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveVersionCommandClass) ZWaveNodeNamingCommandClass(org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveNodeNamingCommandClass) ZWaveCommandClass(org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveCommandClass)

Aggregations

CommandClass (org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveCommandClass.CommandClass)6 ZWaveCommandClass (org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveCommandClass)5 ZWaveSecurityCommandClass (org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveSecurityCommandClass)3 ZWaveWakeUpCommandClass (org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveWakeUpCommandClass)3 ArrayList (java.util.ArrayList)2 ZWaveNode (org.openhab.binding.zwave.internal.protocol.ZWaveNode)2 ZWaveAssociationCommandClass (org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveAssociationCommandClass)2 ZWaveMultiInstanceCommandClass (org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveMultiInstanceCommandClass)2 ZWaveNodeNamingCommandClass (org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveNodeNamingCommandClass)2 ZWaveVersionCommandClass (org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveVersionCommandClass)2 StateComparator (org.openhab.binding.zwave.internal.converter.state.StateComparator)1 ZWaveDeviceClass (org.openhab.binding.zwave.internal.protocol.ZWaveDeviceClass)1 Basic (org.openhab.binding.zwave.internal.protocol.ZWaveDeviceClass.Basic)1 Generic (org.openhab.binding.zwave.internal.protocol.ZWaveDeviceClass.Generic)1 Specific (org.openhab.binding.zwave.internal.protocol.ZWaveDeviceClass.Specific)1 ZWaveInclusionEvent (org.openhab.binding.zwave.internal.protocol.event.ZWaveInclusionEvent)1 ZWaveNodeInfoEvent (org.openhab.binding.zwave.internal.protocol.event.ZWaveNodeInfoEvent)1 State (org.openhab.core.types.State)1