Class LocoInfoResponseHandler
- Namespace
- Z21.Core.ResponseHandler.Driving
- Assembly
- Z21.Client.dll
This message is sent from the Z21 to the clients in response to the command <xref href="Z21.Core.Command.Driving.GetLocoInfoCommand" data-throw-if-not-resolved="false"></xref>.
<p></p>
It is also unsolicitedly sent to an associated client if the locomotive status has been changed by one of the (other) clients or handset controls and the associated client has activated the corresponding broadcast DriveAndSwitchingMessages or LocoInfoChangedMessages via SetBroadcastFlagsCommand.
public class LocoInfoResponseHandler : ILocoInfoResponseHandler, IZ21ResponseHandler
- Inheritance
-
LocoInfoResponseHandler
- Implements
- Inherited Members
Constructors
LocoInfoResponseHandler(ILocoSpeedCodec, ILogger<LocoInfoResponseHandler>?)
public LocoInfoResponseHandler(ILocoSpeedCodec locoSpeedCodec, ILogger<LocoInfoResponseHandler>? logger = null)
Parameters
locoSpeedCodecILocoSpeedCodecloggerILogger<LocoInfoResponseHandler>
Properties
Name
Human-readable command according to the specification.
public string Name { get; }
Property Value
Methods
CanHandle(byte[])
Returns true if this response handler can handle the response. False otherwise.
public bool CanHandle(byte[] response)
Parameters
responsebyte[]
Returns
Handle(byte[])
public void Handle(byte[] response)
Parameters
responsebyte[]
Events
OnLocoInfoReceived
public event EventHandler<LocoInfoReceivedEventArgs>? OnLocoInfoReceived