Table of Contents

Class BarcodeCommand

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

The .bc Barcode Command of the Technology Solutions UK Ltd ASCII 2 Protocol

(.bc) A command to scan a barcode

[AsciiCommand(".bc")]
public class BarcodeCommand : AlertDateTimeCommandBase, IAsciiCommand, ICommandParameters, IResponseParameters
Inheritance
BarcodeCommand
Implements
Inherited Members
Extension Methods

Constructors

BarcodeCommand()

Initializes a new instance of the BarcodeCommand class

public BarcodeCommand()

Properties

Barcode

Gets the barcode scanned if the command was successful

[AsciiResponse("BR")]
[AsciiResponse("BC")]
public string Barcode { get; }

Property Value

string

Remarks

If barcode escape is enabled this receives the BC header otherwise it receives the BR header. NOTE BR may not be received completely if the barcode contains carriage returns or line feeds

IsBarcodeEscaped

Gets or sets a value indicating whether the barcode response is escaped to escape '' (0x5c) for Cr Lf and itself. Set to null to not change the current value

[AsciiParameter("e")]
public TriState? IsBarcodeEscaped { get; set; }

Property Value

TriState?

ScanTime

Gets or sets the maximum time to wait for a barcode to be scanned 1 to 9 seconds

[AsciiParameter("t")]
public int? ScanTime { get; set; }

Property Value

int?

Timestamp

Gets the timestamp when the barcode was scanned if date and time stamp is enabled

[AsciiResponse("DT")]
public DateTime Timestamp { get; }

Property Value

DateTime

Methods

BarcodeEscape(string)

Utility function to remove the escape characters from an escaped barcode response

public static string BarcodeEscape(string value)

Parameters

value string

The barcode response to remove the escape sequences from

Returns

string

The barcode response without the escapes

OnBarcodeReceived(string, DateTime)

Raises the BarcodeReceived event

protected virtual void OnBarcodeReceived(string barcode, DateTime timestamp)

Parameters

barcode string

The barcode received

timestamp DateTime

The timestamp received

Events

BarcodeReceived

Raised when a barcode is received

public event EventHandler<BarcodeEventArgs> BarcodeReceived

Event Type

EventHandler<BarcodeEventArgs>