|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.implementation.AbstractNamedBean
jmri.implementation.AbstractIdTag
jmri.implementation.DefaultIdTag
jmri.implementation.DefaultRailCom
public class DefaultRailCom
Concrete implementation of the RailCom interface.
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.
| Field Summary | |
|---|---|
(package private) int |
actual_load
|
(package private) int |
actual_speed
|
(package private) int |
actual_temperature
|
(package private) int |
addressTypeInt
|
(package private) Hashtable<Integer,Integer> |
cvValues
|
(package private) int |
expectedCV
|
(package private) int |
fuelLevel
|
(package private) int |
location
|
(package private) static org.slf4j.Logger |
log
|
(package private) int |
orientation
|
(package private) int |
routing_no
|
(package private) int |
waterLevel
|
| Fields inherited from class jmri.implementation.AbstractIdTag |
|---|
_whenLastSeen, _whereLastSeen |
| Fields inherited from class jmri.implementation.AbstractNamedBean |
|---|
listenerRefs, mSystemName, mUserName, parameters, pcs, register |
| Fields inherited from interface jmri.RailCom |
|---|
CONSIST_ADDRESS, LONG_ADDRESS, NO_ADDRESS, SHORT_ADDRESS |
| Fields inherited from interface jmri.IdTag |
|---|
SEEN, UNSEEN |
| Fields inherited from interface jmri.NamedBean |
|---|
INCONSISTENT, UNKNOWN |
| Constructor Summary | |
|---|---|
DefaultRailCom(String systemName)
|
|
DefaultRailCom(String systemName,
String userName)
|
|
| 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 |
getState()
Provide generic access to internal state. |
int |
getWaterLevel()
Gets the remaining fuel level as a % Water level CV878 (RP.9.3.2) |
void |
setActualLoad(int type)
Method for a RailCom Reader to set the Actual Load back from a device |
void |
setActualSpeed(int type)
Method for a RailCom Reader to set the Actual speed reported back from a device |
void |
setActualTemperature(int type)
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 type)
Method for a RailCom Reader to set the fuel level reported back from a device |
void |
setLocation(int type)
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 type)
Method for a RailCom Reader to set the routing number reported back from a device |
void |
setState(int s)
Provide generic access to internal state. |
void |
setWaterLevel(int type)
Method for a RailCom Reader to set the water level reported back from a device |
| Methods inherited from class jmri.implementation.DefaultIdTag |
|---|
load, setWhereLastSeen, store |
| Methods inherited from class jmri.implementation.AbstractIdTag |
|---|
getTagID, getWhenLastSeen, getWhereLastSeen, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface jmri.IdTag |
|---|
getTagID, getWhenLastSeen, getWhereLastSeen, load, setWhereLastSeen, store |
| Field Detail |
|---|
int orientation
int addressTypeInt
int actual_speed
int actual_load
int actual_temperature
int waterLevel
int fuelLevel
int location
int routing_no
int expectedCV
Hashtable<Integer,Integer> cvValues
static org.slf4j.Logger log
| Constructor Detail |
|---|
public DefaultRailCom(String systemName)
public DefaultRailCom(String systemName,
String userName)
| Method Detail |
|---|
public void setState(int s)
throws JmriException
NamedBeanThis generally shouldn't be used by Java code; use the class-specific form instead. (E.g. setCommandedState in Turnout) This provided to make Jython script access easier to read.
setState in interface NamedBeansetState in class DefaultIdTagJmriException - general error when cant do the needed operationpublic int getState()
NamedBeanThis generally shouldn't be used by Java code; use the class-specific form instead. (E.g. getCommandedState in Turnout) This provided to make Jython script access easier to read.
getState in interface NamedBeangetState in class DefaultIdTagpublic void setOrientation(int type)
RailCom
setOrientation in interface RailCompublic int getOrientation()
RailCom
getOrientation in interface RailCompublic String getAddressTypeAsString()
RailCom
getAddressTypeAsString in interface RailCompublic DccLocoAddress getDccLocoAddress()
RailCom
getDccLocoAddress in interface RailCompublic void setAddressType(int type)
RailCom
setAddressType in interface RailCompublic int getAddressType()
RailCom
getAddressType in interface RailCompublic void setActualSpeed(int type)
RailCom
setActualSpeed in interface RailCompublic int getActualSpeed()
RailCom
getActualSpeed in interface RailCompublic void setActualLoad(int type)
RailCom
setActualLoad in interface RailCompublic int getActualLoad()
RailCom
getActualLoad in interface RailCompublic void setActualTemperature(int type)
RailCom
setActualTemperature in interface RailCompublic int getActualTemperature()
RailCom
getActualTemperature in interface RailCompublic void setWaterLevel(int type)
RailCom
setWaterLevel in interface RailCompublic int getWaterLevel()
RailCom
getWaterLevel in interface RailCompublic void setFuelLevel(int type)
RailCom
setFuelLevel in interface RailCompublic int getFuelLevel()
RailCom
getFuelLevel in interface RailCompublic void setLocation(int type)
RailCom
setLocation in interface RailCompublic int getLocation()
RailCom
getLocation in interface RailCompublic void setRoutingNo(int type)
RailCom
setRoutingNo in interface RailCompublic int getRoutingNo()
RailCom
getRoutingNo in interface RailCompublic void setExpectedCv(int cv)
RailCom
setExpectedCv in interface RailCompublic int getExpectedCv()
RailCom
getExpectedCv in interface RailCompublic void setCvValue(int value)
RailCom
setCvValue in interface RailCompublic int getCv(int cv)
RailCom
getCv in interface RailComcv - CV number that the value relates to.
public void setCv(int cv,
int value)
RailCom
setCv in interface RailComcv - CV number that the value relates to.value - Value of the CVpublic List<Integer> getCVList()
RailCom
getCVList in interface RailCom
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||