예제 #1
0
  protected AbstractMonitor(
      final Object conn, final String name, final KNXMediumSettings settings) {
    this.conn = conn;
    this.name = name;
    logger = LogManager.getManager().getLogService("calimero.link." + getName());

    if (settings instanceof PLSettings)
      logger.info("power-line medium, assuming BCU has extended busmonitor enabled");

    setKNXMedium(settings);
    notifier = new MonitorNotifier(this, logger, settings instanceof PLSettings);
    notifier.start();
  }
예제 #2
0
 public final void close() {
   synchronized (this) {
     if (closed) return;
     closed = true;
   }
   try {
     leaveBusmonitor();
   } catch (final InterruptedException e) {
     Thread.currentThread().interrupt();
   }
   onClose();
   try {
     //			if (conn != null)
     //				conn.close();
   } catch (final Exception ignore) {
   }
   notifier.quit();
 }
예제 #3
0
 public final void setDecodeRawFrames(final boolean decode) {
   notifier.decode = decode;
   logger.info((decode ? "enable" : "disable") + " decoding of raw frames");
 }
예제 #4
0
 public void removeMonitorListener(final LinkListener l) {
   notifier.removeListener(l);
 }
예제 #5
0
 public void addMonitorListener(final LinkListener l) {
   notifier.addListener(l);
 }