API-referencia
Minden, amit egy szkript használhat, objektumról objektumra. Minden objektumnál ott van, mi az, mire használod, és egy példa, aztán a tulajdonságai (zárójel nélkül: blocks.B3.occupied), metódusai (zárójellel: turnouts.W5.diverging()) és eseményei (kezelő closure-ként: stations.South.onArrival { Train train -> … }). Hogy működik, az itt van: Objektumok, gyűjtemények és események.
A „Visszaad” a típus: amit egy tulajdonság vagy metódus visszaad, vagy amit egy esemény a kezelőnek átad. Egy objektum nevére kattintva ahhoz az objektumhoz jutsz; írj a keresőmezőbe, hogy objektumra, névre vagy leírásra szűrj.
Ez a 2. verziója annak, amit a szkriptek látnak. Csak hozzáadás történik; ami létezik, nem kap új nevet.
Script.trainsTulajdonságok Every train on the layout by its name.Script.blocksTulajdonságok Every block by its name.Script.placesTulajdonságok Every station, yard, staging yard, siding and depot.Script.stationsTulajdonságok The stations.Script.yardsTulajdonságok The shunting yards.Script.stagingTulajdonságok The staging yards.Script.turnoutsTulajdonságok Every turnout with a name.Script.dutiesTulajdonságok Every duty.Script.signalsTulajdonságok Every signal placed on the layout.Script.devicesTulajdonságok Every tablet, phone or other computer registered with TRAX Control.Script.atMetódusok Every day at this time of this computer's clock.Script.layoutTulajdonságok The layout itself: start, shutdown, messages, power.Script.clockTulajdonságok The model clock: its time, and every model day at a time.Script.inputMetódusok A feedback address: a detector's or a push button's.Script.outputMetódusok An accessory address: a light, a signal, an uncoupler.Script.flagMetódusok A flag, which rules can ask too.Script.routeMetódusok The first way from one block to another.Script.everyMetódusok Again and again, every so many seconds.Script.betweenMetódusok Whether this computer's clock is between two times.Script.sayMetódusok A message on every screen.Script.announceMetódusok An announcement: shown and spoken on every screen.Script.logMetódusok A line in this script's log.Script.powerMetódusok The track power on or off.Script.stopAllMetódusok The emergency stop: every train, at once.Things.findMetódusok The thing with this name, or null.Things.eachMetódusok Every one of them.Things.valuesMetódusok All of them.Things.findAllMetódusok Those that match.Things.containsKeyMetódusok Whether one has this name.Layout.onStartEsemények Once every script has run its own lines.Layout.onRouteSetEsemények When a route is set: its turnouts sent.Layout.onRouteReadyEsemények When every turnout of a route is reported in place.Layout.onRouteDisturbedEsemények When a turnout of a route is reported the other way.Layout.onRouteReleasedEsemények When a route is released.Layout.onStationConnectedEsemények When the command station is connected again.Layout.onStationLostEsemények When the command station is lost.Layout.onPowerOnEsemények When the track power goes on.Layout.onPowerOffEsemények When the track power goes off.Layout.onEmergencyStopEsemények When every train is stopped at once.Layout.onDeviceCameEsemények When a device opens TRAX Control while it had none open.Layout.onDeviceWentEsemények When a device has had TRAX Control closed for a little while.Layout.onDeviceAsksEsemények When a new device registers and asks to be admitted.Layout.onShutdownEsemények When the scripts stop: a few seconds at most.Layout.sayMetódusok A message on every screen.Layout.announceMetódusok An announcement: shown and spoken on every screen.Layout.powerMetódusok The track power on or off.Layout.stopAllMetódusok The emergency stop.Layout.betweenMetódusok Whether the clock is between two times.Train.nameTulajdonságok Its name.Train.onArrivalEsemények When it comes into a station or yard.Train.onDepartureEsemények When it has left a station or yard altogether.Train.onEnteredEsemények When its front comes into a block.Train.onLeftEsemények When it has left a block altogether.Train.onWaitingEsemények When its agent waits for its way to its next stop: at once and every half minute.Train.onTrackChosenEsemények When its agent chose its track in a station or yard.Train.onDelayedEsemények When it runs late on its timetable's service: at the threshold, and again at every as many more.Train.onNotThereEsemények When it is not where its circulation expects it: not at the first stop of its run when due, or not ready to join another train.Train.arriveAtMetódusok The track its agent is to take at the stop it goes to now; tried at once when it waits.Train.isInMetódusok Whether it stands in a block or a place now.Train.startAgentMetódusok Starts its agent, on its own duty or the one given.Train.stopAgentMetódusok Stops its agent where it is.Block.nameTulajdonságok Its name.Block.occupiedTulajdonságok Whether it is occupied now.Block.placeTulajdonságok The station or yard it belongs to, or null.Block.onOccupiedEsemények When it becomes occupied.Block.onFreeEsemények When it becomes free.Block.onEnteredEsemények When a train's front comes into it.Block.onLeftEsemények When a train has left it altogether.Place.nameTulajdonságok Its name.Place.kindTulajdonságok station, yard, staging, siding, industrialSiding or depot.Place.blocksTulajdonságok Its tracks.Place.freeTracksTulajdonságok Its tracks that are free now.Place.onWaitingEsemények When a train's agent waits for its way here: at once and every half minute.Place.onTrackChosenEsemények When a train's agent chose its track here.Place.onArrivalEsemények When a train comes into it.Place.onDepartureEsemények When a train has left it altogether.Turnout.nameTulajdonságok Its name.Turnout.straightMetódusok Sets it straight, as a click does.Turnout.divergingMetódusok Sets it diverging, as a click does.Turnout.isStraightMetódusok Whether it is reported straight now.Turnout.onReportedEsemények When it is reported set: "straight" or "diverging".Signal.nameTulajdonságok Its name.Signal.showsMetódusok Whether it shows this aspect now: red, green or caution.Signal.onAspectEsemények When it changes: "red", "green" or "caution".Signal.onGreenEsemények When it shows green.Signal.onRedEsemények When it shows red.Duty.nameTulajdonságok Its name.DutyStep.trainTulajdonságok The train whose agent goes through the stop.DutyStep.stepTulajdonságok Which stop of the duty, counted from 1.DutyStep.momentTulajdonságok start, arrived, finished or waiting.DutyStep.placeTulajdonságok The stop's station or yard; null when the stop is one block.DutyStep.blockTulajdonságok The stop's block, when it is one.DutyStep.secondsTulajdonságok While waiting: how long, in seconds.DutyStep.reasonTulajdonságok While waiting: why, in TRAX Control's words.Device.nameTulajdonságok The name it registered under.Device.isHereMetódusok Whether it has TRAX Control open now.Device.onCameEsemények When it opens TRAX Control while it had none open.Device.onWentEsemények When it has had TRAX Control closed for a little while.ModelClock.timeTulajdonságok The time of day on the layout now.ModelClock.runningTulajdonságok Whether it runs.ModelClock.rateTulajdonságok How many times as fast as real time.ModelClock.atMetódusok Every model day at this time.ModelClock.betweenMetódusok Whether the model time is between two times.Input.onOnEsemények When it goes on.Input.onOffEsemények When it goes off.Input.onTulajdonságok Whether it is on now.Output.greenMetódusok Switches it green (on).Output.redMetódusok Switches it red (off).Flag.onMetódusok Sets it.Flag.offMetódusok Clears it.Flag.isOnMetódusok Whether it is set.Route.setMetódusok Sets it through the interlocking.Waiting.trainTulajdonságok The train.Waiting.placeTulajdonságok The station or yard it waits to go to; null for a stop of one block.Waiting.blockTulajdonságok The block it waits to go to, for a stop of one block.Waiting.secondsTulajdonságok How long it has waited.Waiting.reasonTulajdonságok Why, in TRAX Control's words.Delay.trainTulajdonságok The train.Delay.serviceTulajdonságok Its service's number this run.Delay.minutesTulajdonságok How many minutes late.Delay.placeTulajdonságok Where the service goes, when that is a station or yard.NotThere.trainTulajdonságok The train that is not there.NotThere.serviceTulajdonságok The service's number this run.NotThere.placeTulajdonságok Where it was expected, when that is a station or yard.NotThere.blockTulajdonságok Where it was expected, when that is one block.TrackChoice.trainTulajdonságok The train.TrackChoice.blockTulajdonságok The track.TrackChoice.placeTulajdonságok The station or yard.RouteEvent.nameTulajdonságok Its name.RouteEvent.fromTulajdonságok The block it starts in.RouteEvent.toTulajdonságok The block it runs to.RouteEvent.stateTulajdonságok setting, set, disturbed or released.
Nincs találat.
Az objektumok
- Script The script itselfEverything a script can write without an object in front: the layout's collections (trains, blocks, stations …), the layout as a whole (layout), the model clock (clock), and a few helpers: messages, addresses, flags, routes and time.
- Things A collectionAll things of one sort on your layout, by name: all trains, all blocks, all stations.
- Layout The layoutThe layout as a whole: what happens to all of it (the scripts starting and stopping, routes, the command station, track power, devices coming and going) and what you do for the whole layout (a message, an announcement, track power, the emergency stop).
- Train A trainA train made up on your layout, as in the Trains panel.
- Block A blockA stretch of track with a detector, as in the diagram: a track in a station, a stretch of open line.
- Place A station or yardA station, shunting yard, staging yard, siding or depot: a named group of tracks (blocks).
- Turnout A turnoutA named turnout in the diagram.
- Signal A signalA signal placed on your layout.
- Duty A dutyA duty from the Duties panel: a series of stops a train's agent runs.
- DutyStep A duty's stopWhat a method is given when a duty's stop calls it.
- Device A deviceA tablet, phone or other computer registered with TRAX Control, as on the Devices page.
- ModelClock The model clockYour layout's clock, which can run faster than real time and can stand still; the timetable runs on it.
- Input A feedback addressA feedback address on your command station or feedback module: of a detector, or of a push button or switch on the layout.
- Output An accessory addressAn accessory address on your command station: a light, a bell, an uncoupler, a signal not in the diagram.
- Flag A flagA named on/off switch that exists only inside TRAX Control.
- Route A routeA route from one block to another as TRAX Control finds it: the first way that keeps its direction and needs no turnout by hand.
- Waiting A waiting agentWhat onWaiting gives when a train's agent waits for its route to the next stop: which train, where to, how long already and why.
- Delay A delayWhat onDelayed gives when a timetable train runs late: which train, which service, how many minutes and where to.
- NotThere Stock that is not thereWhat onNotThere gives when a train is not where its circulation expects it: which train, which service and where it should have been.
- TrackChoice A chosen trackWhat a station's onTrackChosen gives when a train's agent chooses a track there: the train, the track and the station.
- RouteEvent A route changingWhat the layout's route events give (onRouteSet, onRouteReady, onRouteDisturbed, onRouteReleased): the route's name, from which block to which, and how it stands now.