예제 #1
0
 public String toString() {
   return "monitor "
       + getName()
       + " "
       + medium.getMediumString()
       + " medium"
       + (notifier.decode ? ", raw frame decoding" : "")
       + (closed ? " (closed)" : "");
 }
 private void addMediumInfo(final CEMILData msg) {
   String s = "";
   if (medium instanceof PLSettings) {
     final CEMILDataEx f = (CEMILDataEx) msg;
     if (f.getAdditionalInfo(CEMILDataEx.ADDINFO_PLMEDIUM) == null)
       f.addAdditionalInfo(CEMILDataEx.ADDINFO_PLMEDIUM, ((PLSettings) medium).getDomainAddress());
   } else if (medium.getMedium() == KNXMediumSettings.MEDIUM_RF) {
     final CEMILDataEx f = (CEMILDataEx) msg;
     if (f.getAdditionalInfo(CEMILDataEx.ADDINFO_RFMEDIUM) == null) {
       final RFSettings rf = (RFSettings) medium;
       final byte[] sn = f.isDomainBroadcast() ? rf.getDomainAddress() : rf.getSerialNumber();
       final byte[] ai = new RFMediumInfo(true, rf.isUnidirectional(), sn, 255).getInfo();
       f.addAdditionalInfo(CEMILDataEx.ADDINFO_RFMEDIUM, ai);
       s = f.isDomainBroadcast() ? "(using domain address)" : "(using device SN)";
     }
   } else return;
   logger.trace("add cEMI additional info for {} {}", medium.getMediumString(), s);
 }