Search in sources :

Example 1 with TimeoutRfidSensor

use of jmri.jmrix.rfid.TimeoutRfidSensor in project JMRI by JMRI.

the class ConcentratorSensorManager method createNewSensor.

@Override
protected Sensor createNewSensor(String systemName, String userName) {
    log.debug("Create new Sensor");
    TimeoutRfidSensor s;
    s = new TimeoutRfidSensor(systemName, userName);
    s.addPropertyChangeListener(this);
    return s;
}
Also used : TimeoutRfidSensor(jmri.jmrix.rfid.TimeoutRfidSensor)

Example 2 with TimeoutRfidSensor

use of jmri.jmrix.rfid.TimeoutRfidSensor in project JMRI by JMRI.

the class StandaloneSensorManager method processReply.

private void processReply(StandaloneReply r) {
    if (!tc.getAdapterMemo().getProtocol().isValid(r)) {
        log.warn("Invalid message - skipping " + r);
        return;
    }
    IdTag idTag = InstanceManager.getDefault(IdTagManager.class).provideIdTag(tc.getAdapterMemo().getProtocol().getTag(r));
    TimeoutRfidSensor sensor = (TimeoutRfidSensor) provideSensor(prefix + typeLetter() + "1");
    sensor.notify(idTag);
}
Also used : IdTagManager(jmri.IdTagManager) TimeoutRfidSensor(jmri.jmrix.rfid.TimeoutRfidSensor) IdTag(jmri.IdTag)

Example 3 with TimeoutRfidSensor

use of jmri.jmrix.rfid.TimeoutRfidSensor in project JMRI by JMRI.

the class ConcentratorSensorManager method processReply.

private void processReply(ConcentratorReply r) {
    if (!tc.getAdapterMemo().getProtocol().isValid(r)) {
        log.warn("Invalid message - skipping " + r);
        return;
    }
    if (!r.isInRange()) {
        log.warn("Invalid concentrator reader range - skipping " + r);
        return;
    }
    IdTag idTag = InstanceManager.getDefault(IdTagManager.class).provideIdTag(tc.getAdapterMemo().getProtocol().getTag(r));
    TimeoutRfidSensor sensor = (TimeoutRfidSensor) provideSensor(prefix + typeLetter() + r.getReaderPort());
    sensor.notify(idTag);
}
Also used : IdTagManager(jmri.IdTagManager) TimeoutRfidSensor(jmri.jmrix.rfid.TimeoutRfidSensor) IdTag(jmri.IdTag)

Example 4 with TimeoutRfidSensor

use of jmri.jmrix.rfid.TimeoutRfidSensor in project JMRI by JMRI.

the class StandaloneSensorManager method createNewSensor.

@Override
protected Sensor createNewSensor(String systemName, String userName) {
    log.debug("Create new Sensor");
    TimeoutRfidSensor s;
    s = new TimeoutRfidSensor(systemName, userName);
    s.addPropertyChangeListener(this);
    return s;
}
Also used : TimeoutRfidSensor(jmri.jmrix.rfid.TimeoutRfidSensor)

Aggregations

TimeoutRfidSensor (jmri.jmrix.rfid.TimeoutRfidSensor)4 IdTag (jmri.IdTag)2 IdTagManager (jmri.IdTagManager)2