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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jmri.NamedBean
NamedBean.BadNameException, NamedBean.BadSystemNameException, NamedBean.BadUserNameException, NamedBean.DisplayOptions, NamedBean.DuplicateSystemNameException
-
-
Field Summary
Fields Modifier and Type Field Description static int
CONSIST_ADDRESS
Constant representing that the address type reported back is part of a Consist.static int
LONG_ADDRESS
Constant representing that the address type reported back is Long.static int
NO_ADDRESS
Constant representing that we do not know the address type of the decoder.static int
ORIENTA
static int
ORIENTB
static int
SHORT_ADDRESS
Constant representing that the address type reported back is Short.-
Fields inherited from interface jmri.NamedBean
DISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_STATE, QUOTED_NAME_FORMAT, UNKNOWN
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getActualLoad()
Gets the actual load reported by decoder the RailCom device.int
getActualSpeed()
Gets the actual speed reported by the RailCom device as a representation 128 speed stepsint
getActualTemperature()
Gets the actual temperate reported by the RailCom device.int
getCV(int cv)
Gets the value of a CV reported back from the RailCom device.java.util.List<java.lang.Integer>
getCVList()
Get a list of the CVs last seen for this RailCom device.int
getExpectedCv()
Get the expected CV to be returned in a RailCom Packet.int
getFuelLevel()
Gets the remaining fuel level as a % Fuel level CV879 (RP.9.3.2)int
getLocation()
Gets the Last Location that the RailCom device was identified in Location is configured in CV876 (RP.9.3.2)int
getOrientation()
Gets the Orientation of the Rail Com device on the trackint
getRoutingNo()
Gets the routing number that the RailCom device wishes to travel.int
getWaterLevel()
Gets the remaining fuel level as a % Water level CV878 (RP.9.3.2)void
setActualLoad(int actualLoad)
Method for a RailCom Reader to set the Actual Load back from a device.void
setActualSpeed(int actualSpeed)
Method for a RailCom Reader to set the Actual speed reported back from a devicevoid
setActualTemperature(int actualTemp)
Method for a RailCom Reader to set the actual temperate reported back from a device.void
setCV(int cv, int value)
Sets the value of a CV reported back from the decoder.void
setCvValue(int value)
Set the value of the CV that has been read from the RailCom packet.void
setExpectedCv(int cv)
Set the CV number of the next expected value to be returned in a RailCom Packet.void
setFuelLevel(int fuelLevel)
Method for a RailCom Reader to set the fuel level reported back from a device.void
setLocation(int location)
Method for a RailCom Reader to set the location reported back from a device.void
setOrientation(int type)
Method for a RailCom Reader to set the orientation reported back from a devicevoid
setRoutingNo(int routingno)
Method for a RailCom Reader to set the routing number reported back from a device.void
setWaterLevel(int waterLevel)
Method for a RailCom Reader to set the water level reported back from a device.-
Methods inherited from interface jmri.AddressedIdTag
getLocoAddress
-
Methods inherited from interface jmri.IdTag
getTagID, getWhenLastSeen, getWhereLastSeen, load, setWhereLastSeen, store
-
Methods inherited from interface jmri.NamedBean
addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, compareTo, describeState, dispose, getBeanType, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListenersByReference, getPropertyKeys, getRecommendedToolTip, getState, getSystemName, getUsageReport, getUserName, removeProperty, setComment, setProperty, setState, setUserName, toString, updateListenerRef, vetoableChange
-
Methods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
-
-
-
Field Detail
-
NO_ADDRESS
static final int NO_ADDRESS
Constant representing that we do not know the address type of the decoder. This is the initial state of a newly created object before.- See Also:
- Constant Field Values
-
SHORT_ADDRESS
static final int SHORT_ADDRESS
Constant representing that the address type reported back is Short.- See Also:
- Constant Field Values
-
LONG_ADDRESS
static final int LONG_ADDRESS
Constant representing that the address type reported back is Long.- See Also:
- Constant Field Values
-
CONSIST_ADDRESS
static final int CONSIST_ADDRESS
Constant representing that the address type reported back is part of a Consist.- See Also:
- Constant Field Values
-
ORIENTA
static final int ORIENTA
- See Also:
- Constant Field Values
-
ORIENTB
static final int ORIENTB
- See Also:
- Constant Field Values
-
-
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
-
-