Interface ILocoControl
- Namespace
- CommandStation
- Assembly
- CommandStation.Abstractions.dll
Driving a locomotive: speed, direction, functions, and locomotive status notifications.
public interface ILocoControl
Methods
DriveAsync(ushort, DccSpeedMode, DrivingDirection, ushort)
Task DriveAsync(ushort locoAddress, DccSpeedMode speedMode, DrivingDirection direction, ushort speed)
Parameters
locoAddressushortspeedModeDccSpeedModedirectionDrivingDirectionspeedushort
Returns
EmergencyStopAsync(ushort)
Task EmergencyStopAsync(ushort locoAddress)
Parameters
locoAddressushort
Returns
PurgeAsync(ushort)
Task PurgeAsync(ushort locoAddress)
Parameters
locoAddressushort
Returns
RequestLocoInfoAsync(ushort)
Task RequestLocoInfoAsync(ushort locoAddress)
Parameters
locoAddressushort
Returns
SetFunctionAsync(ushort, ushort, FunctionToggleType)
Task SetFunctionAsync(ushort locoAddress, ushort functionIndex, FunctionToggleType toggleType)
Parameters
locoAddressushortfunctionIndexushorttoggleTypeFunctionToggleType
Returns
Events
LocoInfoReceived
event EventHandler<LocoInfoData>? LocoInfoReceived