private boolean sendMessage(){
  if (msgQueue.isEmpty() == true) {
    return false;
  }
  if (freeToSend == true) {
    SerialMessage msg=msgQueue.peek();
    if (msg != null) {
      freeToSend=false;
      logger.debug("NODE {}: Node advancer - queued packet. Queue length is {}",node.getNodeId(),msgQueue.size());
      if (msg.getMessageClass() == SerialMessageClass.SendData) {
        controller.sendData(msg);
      }
 else {
        controller.enqueue(msg);
      }
    }
  }
  return true;
}

private boolean sendMessage ( ) { if ( msgQueue . isEmpty ( ) == true ) { return false ; } if ( freeToSend == true ) { SerialMessage msg = msgQueue . peek ( ) ; if ( msg != null ) { freeToSend = false ; logger . debug ( "NODE {}: Node advancer - queued packet. Queue length is {}" , node . getNodeId ( ) , msgQueue . size ( ) ) ; if ( msg . getMessageClass ( ) == SerialMessageClass . SendData ) { controller . sendData ( msg ) ; } else { controller . enqueue ( msg ) ; } } } return true ; }
sends a message if there is one queued
