Table of Contents

Class AsciiResponder

Namespace
TechnologySolutions.Rfid.AsciiProtocol
Assembly
TechnologySolutions.Rfid.AsciiProtocol.Core.dll

Extends the AsciiResponse to actually respond to commands

public class AsciiResponder : AsciiResponse, IAsciiCommandSynchronousResponder, IAsciiCommandResponder, IAsciiResponseResponder, IAsciiResponse, IAsciiResponder
Inheritance
AsciiResponder
Implements
Derived
Inherited Members
Extension Methods

Constructors

AsciiResponder()

Initializes a new instance of the AsciiResponder class

public AsciiResponder()

Properties

AcceptedHeaders

Gets the collection of headers accepted by this response. Lists the headers of the IAsciiResponse lines that will be captured into the Lines

public ICollection<string> AcceptedHeaders { get; }

Property Value

ICollection<string>

MatchCommandLine

Gets or sets the partial command line that should be matched by the value of the CS line to indicate a command has started. For example to match any response to a type of command ".iv" or to match only library inventory commands ".iv LCMD"

public string MatchCommandLine { get; set; }

Property Value

string

Methods

OnCommandComplete()

Raises the CommandComplete event

protected virtual void OnCommandComplete()

OnCommandStarted()

Raises the CommandStarted event

protected virtual void OnCommandStarted()

OnProcessReceivedLine(IAsciiResponseLine, bool)

Raises the ReceivedLine event

protected virtual bool OnProcessReceivedLine(IAsciiResponseLine line, bool moreToFollow)

Parameters

line IAsciiResponseLine

The line received

moreToFollow bool

True if more lines are already buffered

Returns

bool

True if a listener handled the response

ProcessReceivedLine(IAsciiResponseLine, bool)

Each correctly terminated line from the device is passed to this method for processing

public bool ProcessReceivedLine(IAsciiResponseLine line, bool moreLinesAvailable)

Parameters

line IAsciiResponseLine

The line to be processed

moreLinesAvailable bool

When true indicates there are additional lines to be processed (and will also be passed to this method)

Returns

bool

True if this line should not be passed to any other responder

Events

CommandComplete

Raised when a command completed

public event EventHandler CommandComplete

Event Type

EventHandler

CommandStarted

Raised when a command started

public event EventHandler CommandStarted

Event Type

EventHandler

ReceivedLine

Raised when a line is received

public event EventHandler<AsciiLineEventArgs> ReceivedLine

Event Type

EventHandler<AsciiLineEventArgs>