Package jmri.jmrix.rps
Class Transmitter
- java.lang.Object
 - 
- jmri.jmrix.rps.Transmitter
 
 
- 
- All Implemented Interfaces:
 java.util.EventListener,ThrottleListener
public class Transmitter extends java.lang.Object implements ThrottleListener
Represents an RPS transmitter, generally a locomotive.The "ID" is used to identify this transmitter in RPS. The "rosterName" is the name (ID) of the roster entry this was originally created from.
 
- 
- 
Nested Class Summary
- 
Nested classes/interfaces inherited from interface jmri.ThrottleListener
ThrottleListener.DecisionType 
 - 
 
- 
Field Summary
Fields Modifier and Type Field Description (package private) intaddress(package private) java.lang.Stringid(package private) MeasurementlastMeasurement(package private) booleanlongAddress(package private) booleanneedReqThrottle(package private) booleanpolled(package private) java.lang.StringrosterName(package private) DccThrottlethrottle 
- 
Constructor Summary
Constructors Constructor Description Transmitter(java.lang.String id, boolean polled, int address, boolean longAddress) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) booleancheckInit()intgetAddress()java.lang.StringgetId()MeasurementgetLastMeasurement()java.lang.StringgetRosterName()(package private) DccThrottlegetThrottle()booleanisLongAddress()booleanisPolled()voidnotifyDecisionRequired(LocoAddress address, ThrottleListener.DecisionType question)No steal or share decisions made locallyvoidnotifyFailedThrottleRequest(LocoAddress address, java.lang.String reason)Get notification that an attempt to request a throttle has failed.voidnotifyThrottleFound(DccThrottle t)Get notification that a throttle has been found as requested.voidsetAddress(int address)voidsetId(java.lang.String id)voidsetLastMeasurement(Measurement last)voidsetLongAddress(boolean longAddress)voidsetPolled(boolean polled)voidsetRosterName(java.lang.String rosterName) 
 - 
 
- 
- 
Field Detail
- 
id
java.lang.String id
 
- 
rosterName
java.lang.String rosterName
 
- 
longAddress
boolean longAddress
 
- 
address
int address
 
- 
polled
boolean polled
 
- 
lastMeasurement
Measurement lastMeasurement
 
- 
throttle
DccThrottle throttle
 
- 
needReqThrottle
boolean needReqThrottle
 
 - 
 
- 
Constructor Detail
- 
Transmitter
Transmitter(java.lang.String id, boolean polled, int address, boolean longAddress)
 
 - 
 
- 
Method Detail
- 
getId
public java.lang.String getId()
 
- 
setId
public void setId(java.lang.String id)
 
- 
getRosterName
public java.lang.String getRosterName()
 
- 
setRosterName
public void setRosterName(java.lang.String rosterName)
 
- 
isLongAddress
public boolean isLongAddress()
 
- 
setLongAddress
public void setLongAddress(boolean longAddress)
 
- 
getAddress
public int getAddress()
 
- 
setAddress
public void setAddress(int address)
 
- 
isPolled
public boolean isPolled()
 
- 
setPolled
public void setPolled(boolean polled)
 
- 
setLastMeasurement
public void setLastMeasurement(Measurement last)
 
- 
getLastMeasurement
public Measurement getLastMeasurement()
 
- 
getThrottle
DccThrottle getThrottle()
 
- 
checkInit
boolean checkInit()
 
- 
notifyThrottleFound
public void notifyThrottleFound(DccThrottle t)
Description copied from interface:ThrottleListenerGet notification that a throttle has been found as requested.- Specified by:
 notifyThrottleFoundin interfaceThrottleListener- Parameters:
 t- the throttle with the requested address
 
- 
notifyFailedThrottleRequest
public void notifyFailedThrottleRequest(LocoAddress address, java.lang.String reason)
Description copied from interface:ThrottleListenerGet notification that an attempt to request a throttle has failed.- Specified by:
 notifyFailedThrottleRequestin interfaceThrottleListener- Parameters:
 address- address of the failed requestreason- failure cause
 
- 
notifyDecisionRequired
public void notifyDecisionRequired(LocoAddress address, ThrottleListener.DecisionType question)
No steal or share decisions made locallyGet notification that a throttle request is in use by another device, and a "steal", "share", or "steal/share" decision may be required.
- Specified by:
 notifyDecisionRequiredin interfaceThrottleListener- Parameters:
 address- The LocoAddress that needs the decision.question- The question being asked, steal / cancel, share / cancel, steal / share / cancel
 
 - 
 
 -