jmri
Interface RailCom

Show UML class diagram
All Superinterfaces:
IdTag, NamedBean
All Known Implementing Classes:
DefaultRailCom

public interface RailCom
extends IdTag

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

Field Summary
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.IdTag
SEEN, UNSEEN
 
Fields inherited from interface jmri.NamedBean
INCONSISTENT, UNKNOWN
 
Method Summary
 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 steps
 int getActualTemperature()
          Gets the actual temperate reported by the RailCom device.
 int getAddressType()
          Gets the actual type of address reported back by the RailCom device
 String getAddressTypeAsString()
          Gets the actual address type as a String.
 int getCv(int cv)
          Gets the value of a CV reported back from the RailCom device.
 List<Integer> getCVList()
          returns a list of the CVs and values last seen for this Railcom device.
 DccLocoAddress getDccLocoAddress()
          Gets the address reported back as a jmri.DccLocoAddress
 int getExpectedCv()
          returns the CV that we are expecting 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 track
 int 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 device
 void setActualTemperature(int actualTemp)
          Method for a RailCom Reader to set the actual temperate reported back from a device
 void setAddressType(int type)
          Method for a RailCom Reader to set the Address type 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)
          Sets the value of the cv that has been read from the rail comm packet
 void setExpectedCv(int cv)
          This sets 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 device
 void 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.IdTag
getTagID, getWhenLastSeen, getWhereLastSeen, load, setWhereLastSeen, store
 
Methods inherited from interface jmri.NamedBean
addPropertyChangeListener, addPropertyChangeListener, dispose, getBeanType, getComment, getDisplayName, getFullyFormattedDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListeners, getPropertyKeys, getState, getSystemName, getUserName, removeProperty, removePropertyChangeListener, setComment, setProperty, setState, setUserName, updateListenerRef, vetoableChange
 

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


getOrientation

int getOrientation()
Gets the Orientation of the Rail Com device on the track


getDccLocoAddress

DccLocoAddress getDccLocoAddress()
Gets the address reported back as a jmri.DccLocoAddress


setAddressType

void setAddressType(int type)
Method for a RailCom Reader to set the Address type reported back from a device


getAddressType

int getAddressType()
Gets the actual type of address reported back by the RailCom device

Returns:
-1 if not set.

getAddressTypeAsString

String getAddressTypeAsString()
Gets the actual address type as a String.


setActualSpeed

void setActualSpeed(int actualSpeed)
Method for a RailCom Reader to set the Actual speed reported back from a device


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


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


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


setWaterLevel

void setWaterLevel(int waterLevel)
Method for a RailCom Reader to set the water level reported back from a device


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


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


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)
This sets the cv number of the next expected value to be returned in a RailCom Packet.


getExpectedCv

int getExpectedCv()
returns the CV that we are expecting to be returned in a railcom packet


setCvValue

void setCvValue(int value)
Sets the value of the cv that has been read from the rail comm packet


getCVList

List<Integer> getCVList()
returns a list of the CVs and values last seen for this Railcom device.



Copyright © 1997-2014 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads