Table of Contents

Interface IReader

Namespace
TechnologySolutions.Rfid
Assembly
TechnologySolutions.Rfid.Operations.dll

High level abstraction of a reader that uses IReaderOperations to perform tasks

public interface IReader
Extension Methods

Properties

Configuration

Gets the configuration of the reader

IReaderConfiguration Configuration { get; }

Property Value

IReaderConfiguration

IsConnected

Gets a value indicating whether the reader is currently connected

bool IsConnected { get; }

Property Value

bool

Operations

Gets the operations being performed by this reader

IEnumerable<IReaderOperation> Operations { get; }

Property Value

IEnumerable<IReaderOperation>

SerialNumber

Gets the serial number of the reader

string SerialNumber { get; }

Property Value

string

Methods

AddOperation(IReaderOperation)

Adds an operation to the list of Operations

void AddOperation(IReaderOperation operation)

Parameters

operation IReaderOperation

The operation to add

Remarks

Adding or removing a trigger operation may cause commands to be sent to the reader to update the reader configuration

Exceptions

InvalidOperationException

If you attempt to add more than one of a particular reader trigger operation type

OperationOfType<TOperation>()

Returns the first reader operation of the required type from the reader's Operations (adding a new operation if not already existing)

TOperation OperationOfType<TOperation>() where TOperation : IReaderOperation

Returns

TOperation

The requested Reader Operation instance of null (Nothing in Visual Basic) if not supported

Type Parameters

TOperation

The type of operation required

Remarks

This method will first search the reader's Operations for an operation matching the type requested. If not found the reader, and the requested operation is supported, the reader will create an instance of the operation and AddOperation(IReaderOperation) to Operations and then return the added operation. If the reader does not support the operation null (Nothing in Visual Basic) is returned.

RemoveOperation(string)

Removes the operation with the specified Identifier from the list of Operations.

IReaderOperation RemoveOperation(string operationIdentifier)

Parameters

operationIdentifier string

The identifier of the operation to remove

Returns

IReaderOperation

The removed operation or null (Nothing in Visual Basic) if a matching operation was not found