public void sendLocoNetMessage(LocoNetMessage m){
  transmittedMsgCount++;
  m.setParity();
  int len=m.getNumDataElements();
  byte msg[]=new byte[len];
  for (int i=0; i < len; i++) {
    msg[i]=(byte)m.getElement(i);
  }
  if (log.isDebugEnabled()) {
    log.debug("queue LocoNet packet: {}",m.toString());
  }
  try {
synchronized (xmtHandler) {
      xmtList.addLast(msg);
      xmtHandler.notify();
    }
  }
 catch (  Exception e) {
    log.warn("passing to xmit: unexpected exception: " + e);
  }
}

public void sendLocoNetMessage ( LocoNetMessage m ) { transmittedMsgCount ++ ; m . setParity ( ) ; int len = m . getNumDataElements ( ) ; byte msg [ ] = new byte [ len ] ; for ( int i = 0 ; i < len ; i ++ ) { msg [ i ] = ( byte ) m . getElement ( i ) ; } if ( log . isDebugEnabled ( ) ) { log . debug ( "queue LocoNet packet: {}" , m . toString ( ) ) ; } try { synchronized ( xmtHandler ) { xmtList . addLast ( msg ) ; xmtHandler . notify ( ) ; } } catch ( Exception e ) { log . warn ( "passing to xmit: unexpected exception: " + e ) ; } }
forward a preformatted loconetmessage to the actual interface . checksum is computed and overwritten here , then the message is converted to a byte array and queue for transmission
