001package jmri.jmrix.rfid;
002
003import javax.annotation.Nonnull;
004import org.slf4j.Logger;
005import org.slf4j.LoggerFactory;
006
007/**
008 * Manage the Rfid-specific Sensor implementation.
009 * <p>
010 * System names are "FSpppp", where ppp is a representation of the RFID reader.
011 *
012 * @author Bob Jacobsen Copyright (C) 2007
013 * @author Matthew Harris Copyright (C) 2011
014 * @since 2.11.4
015 */
016abstract public class RfidSensorManager extends jmri.managers.AbstractSensorManager implements RfidListener {
017
018    public RfidSensorManager(RfidSystemConnectionMemo memo) {
019        super(memo);
020    }
021
022    /**
023     * {@inheritDoc}
024     */
025    @Override
026    @Nonnull
027    public RfidSystemConnectionMemo getMemo() {
028        return (RfidSystemConnectionMemo) memo;
029    }
030
031    // to free resources when no longer used
032    @Override
033    public void dispose() {
034        super.dispose();
035    }
036
037//    /**
038//     * {@inheritDoc}
039//     */
040//        @Nonnull
041//        public Sensor createNewSensor(@Nonnull String systemName, String userName) {
042//        RfidSensor r = new RfidSensor(systemName, userName);
043//        return r;
044//    }
045
046    @Override
047    public void message(RfidMessage m) {
048        log.warn("Unexpected message received: {}", m);
049    }
050
051    private static final Logger log = LoggerFactory.getLogger(RfidSensorManager.class);
052
053}