001package jmri;
002
003/**
004 * Interface for displaying (and controlling where appropriate) Current,
005 * Voltage, and other status data from the layout.
006 *
007 * @author Daniel Bergqvist Copyright (C) 2020
008 */
009public interface Meter extends AnalogIO {
010    
011    enum Unit {
012        
013        /**
014         * The meter measures in percent: 0.0 - 100.0
015         */
016        Percent,
017        
018        /**
019         * The meter measures in kilo units (kilo volts, kilo amperes, ...)
020         */
021        Kilo,
022        
023        /**
024         * The meter measures in full units (volts, amperes, ...)
025         */
026        NoPrefix,
027        
028        /**
029         * The meter measures in milli units (milli volts, milli amperes, ...)
030         */
031        Milli,
032        
033        /**
034         * The meter measures in micro units (micro volts, micro amperes, ...)
035         */
036        Micro;
037    }
038    
039    Unit getUnit();
040
041    /**
042     * Enable this meter
043     */
044    void enable();
045
046    /**
047     * Disable this meter
048     */
049    void disable();
050    
051    /**
052     * Remove references to and from this object, so that it can eventually be
053     * garbage-collected.
054     * <p>
055     * The meter must be disabled before it's disposed.
056     */
057    @Override
058    void dispose();
059
060}