Package jmri
Interface RailCom
- All Superinterfaces:
AddressedIdTag,Comparable<NamedBean>,IdTag,NamedBean,PropertyChangeProvider
- All Known Implementing Classes:
DefaultRailCom
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.
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
FieldsModifier and TypeFieldDescriptionstatic final intConstant representing that the address type reported back is part of a Consist.static final intConstant representing that the address type reported back is Long.static final intConstant representing that we do not know the address type of the decoder.static final intstatic final intstatic final intConstant representing that the address type reported back is Short.Fields inherited from interface jmri.NamedBean
DISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_COMMENT, PROPERTY_ENABLED, PROPERTY_KNOWN_STATE, PROPERTY_STATE, PROPERTY_USERNAME, QUOTED_NAME_FORMAT, UNKNOWN -
Method Summary
Modifier and TypeMethodDescriptionintGets the actual load reported by decoder the RailCom device.intGets the actual speed reported by the RailCom device as a representation 128 speed stepsintGets the actual temperate reported by the RailCom device.intgetCV(int cv) Gets the value of a CV reported back from the RailCom device.Get a list of the CVs last seen for this RailCom device.intGet the expected CV to be returned in a RailCom Packet.intGets the remaining fuel level as a % Fuel level CV879 (RP.9.3.2)intGets the Last Location that the RailCom device was identified in Location is configured in CV876 (RP.9.3.2)intGets the Orientation of the Rail Com device on the trackintGets the routing number that the RailCom device wishes to travel.intGets the remaining fuel level as a % Water level CV878 (RP.9.3.2)voidsetActualLoad(int actualLoad) Method for a RailCom Reader to set the Actual Load back from a device.voidsetActualSpeed(int actualSpeed) Method for a RailCom Reader to set the Actual speed reported back from a devicevoidsetActualTemperature(int actualTemp) Method for a RailCom Reader to set the actual temperate reported back from a device.voidsetCV(int cv, int value) Sets the value of a CV reported back from the decoder.voidsetCvValue(int value) Set the value of the CV that has been read from the RailCom packet.voidsetExpectedCv(int cv) Set the CV number of the next expected value to be returned in a RailCom Packet.voidsetFuelLevel(int fuelLevel) Method for a RailCom Reader to set the fuel level reported back from a device.voidsetLocation(int location) Method for a RailCom Reader to set the location reported back from a device.voidsetOrientation(int type) Method for a RailCom Reader to set the orientation reported back from a devicevoidsetRoutingNo(int routingno) Method for a RailCom Reader to set the routing number reported back from a device.voidsetWaterLevel(int waterLevel) Method for a RailCom Reader to set the water level reported back from a device.Methods inherited from interface jmri.AddressedIdTag
getLocoAddressMethods inherited from interface jmri.IdTag
getTagID, getWhenLastSeen, getWhereLastSeen, load, setWhereLastSeen, storeMethods 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, vetoableChangeMethods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Field Details
-
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:
-
SHORT_ADDRESS
Constant representing that the address type reported back is Short.- See Also:
-
LONG_ADDRESS
Constant representing that the address type reported back is Long.- See Also:
-
CONSIST_ADDRESS
Constant representing that the address type reported back is part of a Consist.- See Also:
-
ORIENTA
- See Also:
-
ORIENTB
- See Also:
-
-
Method Details
-
setOrientation
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
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
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
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
Method for a RailCom Reader to set the fuel level reported back from a device.- Parameters:
fuelLevel- the fuel level
-
setWaterLevel
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
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
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
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
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
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
Set the value of the CV that has been read from the RailCom packet.- Parameters:
value- the CV value
-
getCVList
Get a list of the CVs last seen for this RailCom device.- Returns:
- a list of CVs
-