Package jmri.jmrit.withrottle
Class RouteController
java.lang.Object
jmri.jmrit.withrottle.AbstractController
jmri.jmrit.withrottle.RouteController
- All Implemented Interfaces:
PropertyChangeListener,EventListener
-
Field Summary
Fields inherited from class jmri.jmrit.withrottle.AbstractController
canBuildList, isValid, listeners, sysNameList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidRemove this from each managed route's aligned sensor.void(package private) voidhandleMessage(String message, DeviceServer deviceServer) parse and process a route command messagevoidThis is on the aligned sensor, not the route itself.voidregister()Register this as a listener of each managed route's aligned sensor.voidsendList()Send list of routes Format: PRL]\[SysName}|{UsrName}|{CurrentState]\[SysName}|{UsrName}|{CurrentStatevoidSend Info on routes to devices, not specific to any one route.(package private) booleanisValid is used to indicate if the Controller is created.Methods inherited from class jmri.jmrit.withrottle.AbstractController
addControllerListener, buildList, checkCanBuildList, removeControllerListener
-
Constructor Details
-
RouteController
public RouteController()
-
-
Method Details
-
verifyCreation
boolean verifyCreation()Description copied from class:AbstractControllerisValid is used to indicate if the Controller is created. If false, we can null the controller and reduce overhead.- Specified by:
verifyCreationin classAbstractController- Returns:
- isValid
-
filterList
- Overrides:
filterListin classAbstractController
-
handleMessage
parse and process a route command messageFormat: PRA[command][routename] where command is always '2' for Toggle routename is a complete system name Can return HM error messages to client
- Specified by:
handleMessagein classAbstractController- Parameters:
message- Command string to be parseddeviceServer- client to send responses (error messages) back to
-
sendTitles
Send Info on routes to devices, not specific to any one route.Format: PRT]\[routeText}|{routeKey]\[stateText}|{stateKey]\[stateText}|{stateKey...
-
sendList
Send list of routes Format: PRL]\[SysName}|{UsrName}|{CurrentState]\[SysName}|{UsrName}|{CurrentStateStates: 1 - UNKNOWN, 2 - ACTIVE, 4 - INACTIVE (based on turnoutsAligned sensor, if used)
-
propertyChange
This is on the aligned sensor, not the route itself.- Specified by:
propertyChangein interfacePropertyChangeListener
-
register
Register this as a listener of each managed route's aligned sensor.- Specified by:
registerin classAbstractController
-
deregister
Remove this from each managed route's aligned sensor.- Specified by:
deregisterin classAbstractController
-