Table of Contents

Class LoggerResponder

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

A simple responder that inserts every line it sees, preceded by '>', into the standard log file

public class LoggerResponder : IAsciiCommandResponder
Inheritance
LoggerResponder
Implements
Inherited Members
Extension Methods

Constructors

LoggerResponder()

Initializes a new instance of the LoggerResponder class

public LoggerResponder()

LoggerResponder(Action<string>)

Initializes a new instance of the LoggerResponder class

public LoggerResponder(Action<string> logger)

Parameters

logger Action<string>

The method to call to log to

Properties

LoggerMethod

Gets or sets the logger method that is invoked for each line received from the reader *** USE FOR DEBUG ONLY ***

public Action<string> LoggerMethod { get; set; }

Property Value

Action<string>

Remarks

The logger responder is typically first in the responder chain to see all responses from the reader. Because of this the method will get called for every line received from the reader. Any delay here will severely impact the response time to ASCII commands

Methods

ProcessReceivedLine(IAsciiResponseLine, bool)

Captures the line to the log

public bool ProcessReceivedLine(IAsciiResponseLine line, bool moreLinesAvailable)

Parameters

line IAsciiResponseLine

The line to log

moreLinesAvailable bool

True if more lines are going to be passed to this method

Returns

bool

False to allow other IAsciiCommandResponders to process the responses also