Metratec devices library 3.1.1.0
|
The reader class for the ASCII based metratec reader. More...
Public Member Functions | |
UhfReaderGen2 (ICommunicationInterface connection) | |
The reader class for all Metratec reader. | |
UhfReaderGen2 (ICommunicationInterface connection, ILogger logger) | |
The reader class for all Metratec reader. | |
UhfReaderGen2 (ICommunicationInterface connection, string id) | |
The reader class for all Metratec reader. | |
UhfReaderGen2 (ICommunicationInterface connection, string id, ILogger logger) | |
The reader class for all Metratec reader. | |
InventorySettings | GetInventorySettings () |
Return the current inventory settings. | |
void | SetInventorySettings (InventorySettings settings) |
Sets the inventory settings. | |
TagCountSetting | GetTagCountSetting () |
Returns the tag count setting. | |
void | SetTagCountSettings (TagCountSetting settings) |
Sets the expected tag count. | |
override void | SetPower (int power) |
Set the reader power. | |
int | GetPower () |
Get the current reader power. | |
void | SetRegion (REGION_GEN2 region) |
Set the region. | |
REGION_GEN2 | GetRegion () |
Get the current region. | |
override List< UhfTag > | GetInventory () |
Scan for the current inventory. | |
List< UhfTag > | GetInventoryReport () |
Get the current inventory report. | |
override void | StartInventory () |
Starts the continuous inventory scan. Make sure that the inventory is set. | |
void | StartInventoryReport () |
Start the continuous inventory report scan. | |
void | StopInventoryReport () |
Stops the continuous inventory report scan. | |
void | SetMask (MEMBANK_GEN2 membank, int startAddress, string mask) |
Set the reader mask. | |
void | SetEpcMask (string mask) |
Set the epc mask. | |
void | SetEpcMask (int startAddress, string mask) |
Set the epc mask. | |
void | ResetMask () |
Reset/Disable the current reader mask. | |
void | SetBitmask (MEMBANK_GEN2 membank, int startAddress, string mask) |
Set the reader bit mask. | |
void | ResetBitmask () |
Reset/Disable the current reader bitmask. | |
List< UhfTag > | ReadTagData (MEMBANK_GEN2 memory, int startAddress, int length, String epcMask="") |
Read tag data. | |
List< UhfTag > | ReadTagTid (int startAddress, int length, String epcMask="") |
Read the tag TIDs. | |
List< UhfTag > | ReadTagUsrData (int startAddress, int length, String epcMask="") |
Read the tag user data. | |
List< UhfTag > | WriteTagData (MEMBANK_GEN2 memory, int startAddress, string data, string epcMask="") |
Write data to a tag. | |
![]() | |
MetratecReaderGen2 (ICommunicationInterface connection) | |
The reader class for all Metratec reader. | |
MetratecReaderGen2 (ICommunicationInterface connection, ILogger logger) | |
The reader class for all Metratec reader. | |
MetratecReaderGen2 (ICommunicationInterface connection, string id) | |
The reader class for all Metratec reader. | |
MetratecReaderGen2 (ICommunicationInterface connection, string id, ILogger logger) | |
The reader class for all Metratec reader. | |
override string | ExecuteCommand (string command, int timeout=10000) |
Send a command and returns the response. | |
override bool | GetInput (int pin) |
Returns true if the input pin is high, otherwise false. | |
void | EnableInputEvents (bool enable=true) |
Enable or disable input events. | |
override void | SetOutput (int pin, bool value) |
Sets a output pin. | |
bool | GetOutput (int pin) |
Returns true if the output pin is high, otherwise false. | |
override void | SetAntenna (int antennaPort) |
Sets the current antenna to use. | |
int | GetAntenna () |
Gets the current used single antenna. | |
override void | SetAntennaMultiplex (int antennasToUse) |
Sets the number of antennas to be multiplexed. | |
void | SetAntennaMultiplex (List< int > antennaSequence) |
Sets the antenna multiplex sequence. Set the order in which the antennas are activated. | |
virtual List< int > | GetAntennaMultiplex () |
Gets the number of antennas to be multiplexed. | |
override void | StopInventory () |
Stops the continuous inventory scan. | |
Protected Member Functions | |
override void | PrepareReader () |
Configure the reader. The base implementation must be called after success. | |
override void | ConfigureReader () |
Configure the reader. The base implementation must be called after success. | |
override void | HandleInventoryEvent (string response) |
Parse the inventory event (+CINV, +CMINV, +CINVR) | |
![]() | |
void | SetCommand (String command) |
Send a command and check if the response contains "OK". | |
String | GetCommand (String command) |
Send a command and check if the response contains "OK". | |
string[] | SplitResponse (string response) |
Split a multiline response (and check the crc) | |
string[] | SplitLine (string responseLine) |
Split a line response (and check the crc) | |
void | FireInputChangeEvent (int inputPin, bool isHigh) |
Fire a inventory event. | |
override void | HandleResponse (string response) |
Process the reader response...override for event check The base implementation must be called after success. | |
abstract void | HandleInventoryEvent (string response) |
Parse the inventory event (+CINV, +CMINV, +CINVR) | |
override void | PrepareReader () |
Configure the reader. The base implementation must be called after success. | |
override void | ConfigureReader () |
Configure the reader. The base implementation must be called after success. | |
InvalidOperationException | ParseErrorResponse (String response) |
Parse the error response and throw a InvalidOperationException with a detailed message. | |
override void | SetHeartBeatInterval (int intervalInSec) |
Set the HeartBeatInterval ... override for send the heartbeat command. The base implementation must be called after success. | |
override void | UpdateDeviceRevisions () |
Returns the firmware revision ({firmware} {version}) | |
Additional Inherited Members | |
![]() | |
int | CurrentAntennaPort [get, set] |
Current antenna port. | |
bool | SingleAntennaInUse [get, set] |
True, if a single antenna is in use. | |
![]() | |
EventHandler< InputChangedEventArgs >? | InputChanged |
Input change event handler. | |
The reader class for the ASCII based metratec reader.
MetraTecDevices.UhfReaderGen2.UhfReaderGen2 | ( | ICommunicationInterface | connection | ) |
The reader class for all Metratec reader.
connection | The connection interface |
MetraTecDevices.UhfReaderGen2.UhfReaderGen2 | ( | ICommunicationInterface | connection, |
ILogger | logger | ||
) |
The reader class for all Metratec reader.
connection | The connection interface |
logger | The connection interface |
MetraTecDevices.UhfReaderGen2.UhfReaderGen2 | ( | ICommunicationInterface | connection, |
string | id | ||
) |
The reader class for all Metratec reader.
connection | The connection interface |
///
id | The reader id |
MetraTecDevices.UhfReaderGen2.UhfReaderGen2 | ( | ICommunicationInterface | connection, |
string | id, | ||
ILogger | logger | ||
) |
The reader class for all Metratec reader.
connection | The connection interface |
id | The reader id |
logger | The connection interface |
override List< UhfTag > MetraTecDevices.UhfReaderGen2.GetInventory | ( | ) |
Scan for the current inventory.
T:System.InvalidOperationException | If the reader return an error |
T:System.TimeoutException | Thrown if the reader does not responding in time |
T:System.ObjectDisposedException | If the reader is not connected or the connection is lost |
List< UhfTag > MetraTecDevices.UhfReaderGen2.GetInventoryReport | ( | ) |
Get the current inventory report.
T:System.InvalidOperationException | If the reader return an error |
T:System.TimeoutException | Thrown if the reader does not responding in time |
T:System.ObjectDisposedException | If the reader is not connected or the connection is lost |
InventorySettings MetraTecDevices.UhfReaderGen2.GetInventorySettings | ( | ) |
Return the current inventory settings.
int MetraTecDevices.UhfReaderGen2.GetPower | ( | ) |
Get the current reader power.
T:System.InvalidOperationException | If the reader return an error |
T:System.TimeoutException | Thrown if the reader does not responding in time |
T:System.ObjectDisposedException | If the reader is not connected or the connection is lost |
REGION_GEN2 MetraTecDevices.UhfReaderGen2.GetRegion | ( | ) |
Get the current region.
T:System.InvalidOperationException | If the reader return an error |
T:System.TimeoutException | Thrown if the reader does not responding in time |
T:System.ObjectDisposedException | If the reader is not connected or the connection is lost |
TagCountSetting MetraTecDevices.UhfReaderGen2.GetTagCountSetting | ( | ) |
Returns the tag count setting.
|
protectedvirtual |
Parse the inventory event (+CINV, +CMINV, +CINVR)
response |
Implements MetraTecDevices.MetratecReaderGen2< UhfTag >.
List< UhfTag > MetraTecDevices.UhfReaderGen2.ReadTagData | ( | MEMBANK_GEN2 | memory, |
int | startAddress, | ||
int | length, | ||
String | epcMask = "" |
||
) |
Read tag data.
memory | the memory bank to read [TID, USR, EPC] |
startAddress | the start address |
length | the bytes to read |
epcMask | the epc mask to use, optional |
List< UhfTag > MetraTecDevices.UhfReaderGen2.ReadTagTid | ( | int | startAddress, |
int | length, | ||
String | epcMask = "" |
||
) |
Read the tag TIDs.
startAddress | startAddress |
length | bytes to read from the tid |
epcMask | the epc mask to use, optional |
List< UhfTag > MetraTecDevices.UhfReaderGen2.ReadTagUsrData | ( | int | startAddress, |
int | length, | ||
String | epcMask = "" |
||
) |
Read the tag user data.
startAddress | startAddress |
length | bytes to read from the user data |
epcMask | the epc mask to use, optional |
void MetraTecDevices.UhfReaderGen2.SetBitmask | ( | MEMBANK_GEN2 | membank, |
int | startAddress, | ||
string | mask | ||
) |
Set the reader bit mask.
membank | the memory bank to check |
startAddress | the start address |
mask | the binary mask, e.g. '0110' |
void MetraTecDevices.UhfReaderGen2.SetEpcMask | ( | int | startAddress, |
string | mask | ||
) |
Set the epc mask.
startAddress | the start address |
mask | the mask |
void MetraTecDevices.UhfReaderGen2.SetEpcMask | ( | string | mask | ) |
Set the epc mask.
mask | the mask |
void MetraTecDevices.UhfReaderGen2.SetInventorySettings | ( | InventorySettings | settings | ) |
Sets the inventory settings.
settings | the inventory settings |
void MetraTecDevices.UhfReaderGen2.SetMask | ( | MEMBANK_GEN2 | membank, |
int | startAddress, | ||
string | mask | ||
) |
Set the reader mask.
membank | the memory bank to check |
startAddress | the start address |
mask | the mask |
override void MetraTecDevices.UhfReaderGen2.SetPower | ( | int | power | ) |
Set the reader power.
power | the reader power |
T:System.InvalidOperationException | If the reader return an error |
T:System.TimeoutException | Thrown if the reader does not responding in time |
T:System.ObjectDisposedException | If the reader is not connected or the connection is lost |
void MetraTecDevices.UhfReaderGen2.SetRegion | ( | REGION_GEN2 | region | ) |
Set the region.
region | the region to set |
T:System.InvalidOperationException | If the reader return an error |
T:System.TimeoutException | Thrown if the reader does not responding in time |
T:System.ObjectDisposedException | If the reader is not connected or the connection is lost |
void MetraTecDevices.UhfReaderGen2.SetTagCountSettings | ( | TagCountSetting | settings | ) |
Sets the expected tag count.
settings | the tag count settings |
override void MetraTecDevices.UhfReaderGen2.StartInventory | ( | ) |
Starts the continuous inventory scan. Make sure that the inventory is set.
T:System.InvalidOperationException | If the reader return an error |
T:System.TimeoutException | Thrown if the reader does not responding in time |
T:System.ObjectDisposedException | If the reader is not connected or the connection is lost |
void MetraTecDevices.UhfReaderGen2.StartInventoryReport | ( | ) |
Start the continuous inventory report scan.
T:System.TimeoutException | Thrown if the reader does not responding in time |
T:System.ObjectDisposedException | /// If the reader is not connected or the connection is lost |
void MetraTecDevices.UhfReaderGen2.StopInventoryReport | ( | ) |
Stops the continuous inventory report scan.
T:System.TimeoutException | Thrown if the reader does not responding in time |
T:System.ObjectDisposedException | /// If the reader is not connected or the connection is lost |
List< UhfTag > MetraTecDevices.UhfReaderGen2.WriteTagData | ( | MEMBANK_GEN2 | memory, |
int | startAddress, | ||
string | data, | ||
string | epcMask = "" |
||
) |
Write data to a tag.
memory | tag memory to use |
startAddress | start address |
data | data, hex string |
epcMask | ecp mask, optional |