Table of Contents

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

locoSpeedCodec ILocoSpeedCodec
logger ILogger<LocoInfoResponseHandler>

Properties

Name

Human-readable command according to the specification.

public string Name { get; }

Property Value

string

Methods

CanHandle(byte[])

Returns true if this response handler can handle the response. False otherwise.

public bool CanHandle(byte[] response)

Parameters

response byte[]

Returns

bool

Handle(byte[])

public void Handle(byte[] response)

Parameters

response byte[]

Events

OnLocoInfoReceived

public event EventHandler<LocoInfoReceivedEventArgs>? OnLocoInfoReceived

Event Type

EventHandler<LocoInfoReceivedEventArgs>