Package jmri

Interface RailCom

  • All Superinterfaces:
    AddressedIdTag, java.lang.Comparable<NamedBean>, IdTag, NamedBean, PropertyChangeProvider
    All Known Implementing Classes:
    DefaultRailCom

    public interface RailCom
    extends AddressedIdTag
    RailCom represents a RailCom enabled decoder that might be fitted to a specific piece of rolling stock to uniquely identify it.
    RailCom is a registered trademark of Lenz GmbH.

    This implementation of RailCom is an extension of @see IdTag and holds the additional information that can be supplied by the decoder as defined in RP-9.3.2

    This file is part of JMRI.

    JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.

    JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

    Since:
    2.99.4
    • Method Detail

      • setOrientation

        void setOrientation​(int type)
        Method for a RailCom Reader to set the orientation reported back from a device
        Parameters:
        type - the orientation to set
      • getOrientation

        int getOrientation()
        Gets the Orientation of the Rail Com device on the track
        Returns:
        current orientation
      • setActualSpeed

        void setActualSpeed​(int actualSpeed)
        Method for a RailCom Reader to set the Actual speed reported back from a device
        Parameters:
        actualSpeed - the speed
      • getActualSpeed

        int getActualSpeed()
        Gets the actual speed reported by the RailCom device as a representation 128 speed steps
        Returns:
        -1 if not set.
      • setActualLoad

        void setActualLoad​(int actualLoad)
        Method for a RailCom Reader to set the Actual Load back from a device.
        Parameters:
        actualLoad - the load
      • getActualLoad

        int getActualLoad()
        Gets the actual load reported by decoder the RailCom device.
        Returns:
        -1 if not set.
      • setActualTemperature

        void setActualTemperature​(int actualTemp)
        Method for a RailCom Reader to set the actual temperate reported back from a device.
        Parameters:
        actualTemp - the temperature
      • getActualTemperature

        int getActualTemperature()
        Gets the actual temperate reported by the RailCom device. Location is configured in CV876 (RP.9.3.2)
        Returns:
        -1 if not set.
      • setFuelLevel

        void setFuelLevel​(int fuelLevel)
        Method for a RailCom Reader to set the fuel level reported back from a device.
        Parameters:
        fuelLevel - the fuel level
      • setWaterLevel

        void setWaterLevel​(int waterLevel)
        Method for a RailCom Reader to set the water level reported back from a device.
        Parameters:
        waterLevel - the water level
      • getFuelLevel

        int getFuelLevel()
        Gets the remaining fuel level as a % Fuel level CV879 (RP.9.3.2)
        Returns:
        -1 if not set.
      • getWaterLevel

        int getWaterLevel()
        Gets the remaining fuel level as a % Water level CV878 (RP.9.3.2)
        Returns:
        -1 if not set.
      • setLocation

        void setLocation​(int location)
        Method for a RailCom Reader to set the location reported back from a device.
        Parameters:
        location - the location
      • getLocation

        int getLocation()
        Gets the Last Location that the RailCom device was identified in Location is configured in CV876 (RP.9.3.2)
        Returns:
        -1 if not set.
      • setRoutingNo

        void setRoutingNo​(int routingno)
        Method for a RailCom Reader to set the routing number reported back from a device.
        Parameters:
        routingno - the routing number
      • getRoutingNo

        int getRoutingNo()
        Gets the routing number that the RailCom device wishes to travel. Route Number is configured in CV874 (RP.9.3.2)
        Returns:
        -1 if not set.
      • getCV

        int getCV​(int cv)
        Gets the value of a CV reported back from the RailCom device.
        Parameters:
        cv - CV number that the value relates to.
        Returns:
        the value of the CV, or 0 if none has yet been collected
      • setCV

        void setCV​(int cv,
                   int value)
        Sets the value of a CV reported back from the decoder.
        Parameters:
        cv - CV number that the value relates to.
        value - Value of the CV
      • setExpectedCv

        void setExpectedCv​(int cv)
        Set the CV number of the next expected value to be returned in a RailCom Packet.
        Parameters:
        cv - the expected CV
      • getExpectedCv

        int getExpectedCv()
        Get the expected CV to be returned in a RailCom Packet.
        Returns:
        the expected CV
      • setCvValue

        void setCvValue​(int value)
        Set the value of the CV that has been read from the RailCom packet.
        Parameters:
        value - the CV value
      • getCVList

        java.util.List<java.lang.Integer> getCVList()
        Get a list of the CVs last seen for this RailCom device.
        Returns:
        a list of CVs