public class AppLockTest extends java.lang.Object implements APISignaller
| Constructor and Description |
|---|
AppLockTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
initialise(BraveSignallerContext context,
java.lang.String simId,
java.lang.String scenarioId,
java.util.List<java.lang.String> tdSections,
java.util.List<java.lang.String> signals,
java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>> routeDescriptions,
java.util.HashMap<java.lang.String,java.lang.String> trainTypes) |
void |
notifyArrival(java.lang.String arrivingTrain,
java.util.Date time,
java.lang.String stopId)
Notify that the specified train arrives at the specified stopId
|
void |
notifyRouteInfo(java.lang.String serviceName,
java.util.HashMap<java.lang.String,java.lang.String> signalRouteMap,
java.util.HashMap<java.lang.String,java.lang.Double> tdSectionDistances,
java.util.HashMap<java.lang.String,java.lang.Double> signalDistances,
java.util.HashMap<java.lang.Integer,java.lang.Double> stopTimes,
java.util.HashMap<java.lang.Double,java.lang.String> stopNames,
java.util.ArrayList<SpeedLimit> speedLimits,
java.util.ArrayList<Gradient> gradients)
Notifies route info.
|
void |
notifyTDSectionOccupation(java.lang.String tdSection,
java.lang.String occupyingTrain)
Notify the algorithm that the specified TDSection has been occupied by the specified train
|
void |
notifyTrain(java.lang.String trainId,
double distance,
double speed)
Notify plugin of the exact location and speed of a train.
|
void |
notifyTrainServices(java.lang.String trainName,
java.lang.String serviceName)
Notify that the train has started to operate the specified service
|
void |
update(double elapsedTime,
java.util.Date simTime)
Update method called once per time step
|
public void initialise(BraveSignallerContext context, java.lang.String simId, java.lang.String scenarioId, java.util.List<java.lang.String> tdSections, java.util.List<java.lang.String> signals, java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>> routeDescriptions, java.util.HashMap<java.lang.String,java.lang.String> trainTypes)
initialise in interface APISignallertdSections - TDSections in this junctionsignals - Signals in this junctionrouteDescriptions - HashMap of RouteName and ArrayList of public void notifyTDSectionOccupation(java.lang.String tdSection,
java.lang.String occupyingTrain)
APISignallernotifyTDSectionOccupation in interface APISignallerpublic void notifyTrainServices(java.lang.String trainName,
java.lang.String serviceName)
APISignallernotifyTrainServices in interface APISignallerpublic void notifyRouteInfo(java.lang.String serviceName,
java.util.HashMap<java.lang.String,java.lang.String> signalRouteMap,
java.util.HashMap<java.lang.String,java.lang.Double> tdSectionDistances,
java.util.HashMap<java.lang.String,java.lang.Double> signalDistances,
java.util.HashMap<java.lang.Integer,java.lang.Double> stopTimes,
java.util.HashMap<java.lang.Double,java.lang.String> stopNames,
java.util.ArrayList<SpeedLimit> speedLimits,
java.util.ArrayList<Gradient> gradients)
APISignallernotifyRouteInfo in interface APISignallerserviceName - The name of the trainsignalRouteMap - A signal and the corresponding route the train requires.tdSectionDistances - A list of TDSections on the train's journey, with distances along the journey.signalDistances - A list of Signals on the train's journey, with distances along the journey.stopNames - A list of stop IDs indexed by distance.public void update(double elapsedTime,
java.util.Date simTime)
APISignallerupdate in interface APISignallerpublic void notifyArrival(java.lang.String arrivingTrain,
java.util.Date time,
java.lang.String stopId)
APISignallernotifyArrival in interface APISignallerpublic void notifyTrain(java.lang.String trainId,
double distance,
double speed)
APISignallernotifyTrain in interface APISignaller