public void checkVersion ( ZWaveCommandClass commandClass ) { ZWaveVersionCommandClass versionCommandClass = ( ZWaveVersionCommandClass ) this . getNode ( ) . getCommandClass ( CommandClass . VERSION ) ; if ( versionCommandClass == null ) { logger . error ( String . format ( "Version command class not supported on node %d," + "reverting to version 1 for command class %s (0x%02x)" , this . getNode ( ) . getNodeId ( ) , commandClass . getCommandClass ( ) . getLabel ( ) , commandClass . getCommandClass ( ) . getKey ( ) ) ) ; return ; } this . getController ( ) . sendData ( versionCommandClass . getCommandClassVersionMessage ( commandClass . getCommandClass ( ) ) ) ; }
Check the version of a command class by sending a VERSION_COMMAND_CLASS_GET message to the node .