Open Rails

TrainControlSystem Members

TrainControlSystem overview

Public Instance Fields

AlerterSound True if alerter sound rings, otherwise false
BrakePipePressureBar Train brake pipe pressure. Returns float.MaxValue if no data is available.
ClockTime (inherited from AbstractScriptClass) Clock value (in seconds) for the simulation. Starts at activity start time.
CurrentPostSpeedLimitMpS Max allowed speed determined by current speedpost.
CurrentSignalSpeedLimitMpS Max allowed speed determined by current signal.
Deceleration (float currentSpeedMpS, float targetSpeedMpS, float distanceM) Returns the deceleration needed to decrease the speed to the target speed at the target distance
DistanceCurve (float currentSpeedMpS, float targetSpeedMpS, float slope, float delayS, float decelerationMpS2) Returns a distance curve based safe braking distance, unit is m
DistanceM (inherited from AbstractScriptClass) Running total of distance travelled - always positive, updated by train physics.
GetBoolParameter Get bool parameter in the INI file.
GetFloatParameter Get int parameter in the INI file.
GetIntParameter Get int parameter in the INI file.
GetStringParameter Get string parameter in the INI file.
IsAlerterEnabled False if vigilance monitor was switched off in game options, thus requested to be auto reset.
IsBrakeEmergency True if train brake controller is in emergency position, otherwise false.
IsBrakeFullService True if train brake controller is in full service position, otherwise false.
IsDirectionReverse True if train direction is reverse.
IsTrainControlEnabled False if train control is switched off because the train is autopiloted.
NextPostDistanceM Distance to next speedpost.
NextPostSpeedLimitMpS Max allowed speed determined by next speedpost.
NextSignalAspect Aspect of the next signal.
NextSignalDistanceM Distance to next signal.
NextSignalSpeedLimitMpS Max allowed speed determined by next signal.
PowerAuthorization True if circuit breaker or power contactor close authorization is true.
SetCurrentSpeedLimitMpS Set current speed limit of the train, as to be shown on SPEEDLIMIT cabcontrol.
SetDynamicBrakeController Set dynamic brake controller to position in range [0-1].
SetEmergencyBrake Set emergency braking on or off.
SetFullBrake Set train brake controller to full service position.
SetHorn Set horn on (true) or off (false).
SetInterventionSpeedLimitMpS The speed at the train control system applies brake automatically. Determines needle color (orange/red) on circular speed gauge, when the locomotive already runs above the permitted speed limit. Otherwise is unused.
SetMonitoringStatus Monitoring status determines the colors speeds displayed with. (E.g. circular speed gauge).
SetNextSignalAspect Will be whown on ASPECT_DISPLAY cabcontrol.
SetNextSpeedLimitMpS Set speed limit of the next signal, as to be shown on SPEEDLIM_DISPLAY cabcontrol.
SetOverspeedWarningDisplay Set OVERSPEED cabcontrol display on or off.
SetPantographsDown Cut power by pull all pantographs down.
SetPenaltyApplicationDisplay Set PENALTY_APP cabcontrol display on or off.
SetPowerAuthorization Set the circuit breaker or power contactor close authorization.
SetThrottleController Set throttle controller to position in range [0-1].
SetVigilanceAlarm Switch vigilance alarm sound on (true) or off (false).
SetVigilanceAlarmDisplay Set ALERTER_DISPLAY cabcontrol display's alarm state on or off.
SetVigilanceEmergencyDisplay Set ALERTER_DISPLAY cabcontrol display's emergency state on or off.
SpeedCurve (float targetDistanceM, float targetSpeedMpS, float slope, float delayS, float decelerationMpS2) Returns a speed curve based speed limit, unit is m/s
SpeedMpS Train's actual absolute speed.
TrainLengthM Train's length
TrainSpeedLimitMpS Max allowed speed for the train determined by consist.
TriggerSoundAlert1 Trigger Alert1 sound event
TriggerSoundAlert2 Trigger Alert2 sound event
TriggerSoundInfo1 Trigger Info1 sound event
TriggerSoundInfo2 Trigger Info2 sound event
TriggerSoundPenalty1 Trigger Penalty1 sound event
TriggerSoundPenalty2 Trigger Penalty2 sound event
TriggerSoundSystemActivate Trigger Activate sound event
TriggerSoundSystemDeactivate Trigger Deactivate sound event
TriggerSoundWarning1 Trigger Warning1 sound event
TriggerSoundWarning2 Trigger Warning2 sound event

Public Instance Properties

Activated

Public Instance Methods

Equals (inherited from Object)Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object)Serves as a hash function for a particular type.
GetType (inherited from Object)Gets the type of the current instance.
HandleEvent Called when an event happens (like the alerter button pressed)
Initialize Called once at initialization time.
SetEmergency Called by signalling code externally to stop the train in certain circumstances.
ToString (inherited from Object)Returns a string that represents the current object.
Update Called regularly at every simulator update cycle.

Protected Instance Constructors

TrainControlSystem Constructor Initializes a new instance of the TrainControlSystem class.

Protected Instance Methods

Finalize (inherited from Object)Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
MemberwiseClone (inherited from Object)Creates a shallow copy of the current Object.

See Also

TrainControlSystem Class | ORTS.Scripting.Api Namespace