private void handleNodeQueue(SerialMessage incomingMessage){
  if (currentStage == ZWaveNodeInitStage.DONE) {
    return;
  }
  logger.debug("NODE {}: Node advancer - checking initialisation queue. Queue size {}.",node.getNodeId(),msgQueue.size());
  if (msgQueue.contains(incomingMessage)) {
    msgQueue.remove(incomingMessage);
    logger.debug("NODE {}: Node advancer - message removed from queue. Queue size {}.",node.getNodeId(),msgQueue.size());
    freeToSend=true;
    advanceNodeStage(incomingMessage.getMessageClass());
  }
 else   if (msgQueue.isEmpty() && currentStage == ZWaveNodeInitStage.SECURITY_REPORT) {
    logger.debug("NODE {}: Node advancer - In Security stage, going to advanceNodeStage to get next request.",node.getNodeId());
    advanceNodeStage(incomingMessage.getMessageClass());
  }
}

private void handleNodeQueue ( SerialMessage incomingMessage ) { if ( currentStage == ZWaveNodeInitStage . DONE ) { return ; } logger . debug ( "NODE {}: Node advancer - checking initialisation queue. Queue size {}." , node . getNodeId ( ) , msgQueue . size ( ) ) ; if ( msgQueue . contains ( incomingMessage ) ) { msgQueue . remove ( incomingMessage ) ; logger . debug ( "NODE {}: Node advancer - message removed from queue. Queue size {}." , node . getNodeId ( ) , msgQueue . size ( ) ) ; freeToSend = true ; advanceNodeStage ( incomingMessage . getMessageClass ( ) ) ; } else if ( msgQueue . isEmpty ( ) && currentStage == ZWaveNodeInitStage . SECURITY_REPORT ) { logger . debug ( "NODE {}: Node advancer - In Security stage, going to advanceNodeStage to get next request." , node . getNodeId ( ) ) ; advanceNodeStage ( incomingMessage . getMessageClass ( ) ) ; } }
handles the removal of frames from the send queue . this gets called after we have an ack for our packet , but before we get the response . the actual sending of frames , and the advancing is carried out in the advancenodestage method .
