Metratec devices library 3.1.1.0
|
The reader class for the ASCII based metratec reader. More...
Public Member Functions | |
MetratecReaderGen1 (ICommunicationInterface connection) | |
The reader class for all Metratec reader. | |
MetratecReaderGen1 (ICommunicationInterface connection, ILogger logger) | |
The reader class for all Metratec reader. | |
MetratecReaderGen1 (ICommunicationInterface connection, string id) | |
The reader class for all Metratec reader. | |
MetratecReaderGen1 (ICommunicationInterface connection, string id, ILogger logger) | |
The reader class for all Metratec reader. | |
void | EnableAntennaReport (bool enable=true) |
Enable or Disable the antenna report. If the reader is used with an antenna multiplexer, you can enable this to get the antenna information in the inventory response. | |
void | EnableCrcCheck (bool enable=true) |
Enable the Cyclic Redundancy Check (CRC) of the computer to reader communication. | |
String | GetCommand (String command) |
u Send a command and return the response | |
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. | |
override void | SetOutput (int pin, bool value) |
Sets a output pin. | |
override void | SetAntenna (int antennaPort) |
Sets the current antenna to use. | |
override void | SetAntennaMultiplex (int antennasToUse) |
Sets the number of antennas to be multiplexed. | |
override void | StopInventory () |
Stops the continuous inventory scan. | |
![]() | |
MetratecReader (ICommunicationInterface connection) | |
The reader class for all Metratec reader. | |
MetratecReader (ICommunicationInterface connection, ILogger logger) | |
The reader class for all Metratec reader. | |
MetratecReader (ICommunicationInterface connection, string id) | |
The reader class for all Metratec reader. | |
MetratecReader (ICommunicationInterface connection, string id, ILogger logger) | |
The reader class for all Metratec reader. | |
void | Connect () |
Connect the reader. | |
void | Connect (int timeout) |
Connect the reader and wait for the connection established. | |
void | Disconnect () |
Disconnect the reader. | |
abstract string | ExecuteCommand (string command, int timeout=10000) |
Send a command and returns the response. | |
abstract void | SetPower (int power) |
Set the reader power. | |
abstract void | SetAntenna (int antennaPort) |
Sets the current antenna to use. | |
abstract void | SetAntennaMultiplex (int antennasToUse) |
Sets the number of antennas to be multiplexed. | |
abstract List< T > | GetInventory () |
Scan for the current inventory. | |
abstract void | StartInventory () |
Starts the continuous inventory scan. If the inventory event handler is set, any transponder found will be delivered via it. If the event handler is not set, the found transponders can be fetched via the method FetchInventory | |
abstract void | StopInventory () |
Stops the continuous inventory scan. | |
abstract bool | GetInput (int pin) |
Returns true if the input pin is high, otherwise false. | |
abstract void | SetOutput (int pin, bool value) |
Sets a output pin. | |
List< T > | FetchInventory () |
Can be called when an inventory has been started and no inventory callback is set. Returns a list with the currently found transponders. | |
Protected Member Functions | |
override void | HandleResponse (string response) |
Process the reader response...override for event check The base implementation must be called after success. | |
override void | SendCommand (string command) |
Send a command. | |
override void | PrepareReader () |
Configure the reader. The base implementation must be called after success. | |
void | EnableEndOfFrame (bool enable=true) |
Enable or Disable end of frame. | |
void | SetCommand (String command) |
Send a command and check if the response contains "OK". | |
string[] | SplitResponse (string response) |
Split a multiline response (and check the crc) | |
abstract void | HandleInventoryResponse (string response) |
Called if a new inventory response is received. | |
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}) | |
void | SetVerbosityLevel (int level) |
Set the verbosity level. | |
![]() | |
void | SetEndOfFrame (String endOfFrame) |
Set the connection end of frame string. | |
virtual void | SendCommand (string command) |
Send a command. | |
virtual string | GetResponse () |
Returns the next response. | |
List< string > | ClearResponseBuffer () |
Deletes the currently waiting responses from the buffer and returns them. | |
virtual void | SetHeartBeatInterval (int intervalInSec) |
Set the HeartBeatInterval ... override for send the heartbeat command. The base implementation must be called after success. | |
virtual void | PrepareReader () |
Configure the reader. The base implementation must be called after success. | |
abstract void | ConfigureReader () |
Configure the reader. The base implementation must be called after success. | |
abstract void | UpdateDeviceRevisions () |
Update the the firmware name and version ({firmware} {version}) | |
virtual void | HandleResponse (string response) |
Process the reader response...override for event check The base implementation adds the response to the responses queue. | |
void | FireInventoryEvent (List< T > tags, bool continuous) |
Fire a inventory event. | |
Properties | |
int | CurrentAntennaPort [get, set] |
Current antenna port. | |
![]() | |
bool | FireEmptyInventories [get, set] |
If the event handler for new inventory is set and this value is true, an empty inventory also triggers the event handler. | |
int | ResponseTimeout [get, set] |
Reader response timeout. | |
string? | FirmwareName [get, protected set] |
Reader firmware name. | |
string? | HardwareName [get, protected set] |
Reader hardware name. | |
string? | FirmwareVersion [get, protected set] |
Reader firmware version. | |
int? | FirmwareMajorVersion [get, set] |
Reader major firmware version. | |
int? | FirmwareMinorVersion [get, set] |
Firmware minor firmware version. | |
string? | HardwareVersion [get, protected set] |
Reader hardware version. | |
string? | SerialNumber [get, protected set] |
Reader serial number. | |
bool | Connected [get] |
The reader connection state. | |
Additional Inherited Members | |
![]() | |
string | id |
Reader id. | |
readonly ILogger | Logger |
Logger. | |
![]() | |
EventHandler< StatusEventArgs >? | StatusChanged |
Status change event handler. | |
EventHandler< NewInventoryEventArgs< T > >? | NewInventory |
new inventory event handler | |
The reader class for the ASCII based metratec reader.
T | : | RfidTag |
MetraTecDevices.MetratecReaderGen1< T >.MetratecReaderGen1 | ( | ICommunicationInterface | connection | ) |
The reader class for all Metratec reader.
connection | The connection interface |
MetraTecDevices.MetratecReaderGen1< T >.MetratecReaderGen1 | ( | ICommunicationInterface | connection, |
ILogger | logger | ||
) |
The reader class for all Metratec reader.
connection | The connection interface |
logger | The connection interface |
MetraTecDevices.MetratecReaderGen1< T >.MetratecReaderGen1 | ( | ICommunicationInterface | connection, |
string | id | ||
) |
The reader class for all Metratec reader.
connection | The connection interface |
///
id | The reader id |
MetraTecDevices.MetratecReaderGen1< T >.MetratecReaderGen1 | ( | 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 |
void MetraTecDevices.MetratecReaderGen1< T >.EnableAntennaReport | ( | bool | enable = true | ) |
Enable or Disable the antenna report. If the reader is used with an antenna multiplexer, you can enable this to get the antenna information in the inventory response.
enable |
void MetraTecDevices.MetratecReaderGen1< T >.EnableCrcCheck | ( | bool | enable = true | ) |
Enable the Cyclic Redundancy Check (CRC) of the computer to reader communication.
enable | true for enable |
|
protected |
Enable or Disable end of frame.
enable |
|
virtual |
Send a command and returns the response.
command | the command |
timeout | the response timeout, defaults to 2000ms |
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 |
Implements MetraTecDevices.MetratecReader< T >.
String MetraTecDevices.MetratecReaderGen1< T >.GetCommand | ( | String | command | ) |
u Send a command and return the response
command | the command to send |
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 |
|
virtual |
Returns true if the input pin is high, otherwise false.
pin | The requested input pin number |
T:System.InvalidOperationException | Thrown in case exceptions occur during PC/reader communication (port busy, reading / writing error, wrong answer from reader) or if reader type does not support the command |
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 |
Implements MetraTecDevices.MetratecReader< T >.
|
protectedpure virtual |
Called if a new inventory response is received.
response | inventory response |
Implemented in MetraTecDevices.HfReaderGen1.
|
protectedvirtual |
Process the reader response...override for event check The base implementation must be called after success.
response | a reader response |
Reimplemented from MetraTecDevices.MetratecReader< T >.
|
protected |
Parse the error response and throw a InvalidOperationException with a detailed message.
response |
|
protectedvirtual |
Configure the reader. The base implementation must be called after success.
Reimplemented from MetraTecDevices.MetratecReader< T >.
|
protectedvirtual |
Send a command.
command | the command |
T:System.ObjectDisposedException | Thrown if the reader is not connected |
Reimplemented from MetraTecDevices.MetratecReader< T >.
|
virtual |
Sets the current antenna to use.
antennaPort | the antenna to use |
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 |
Implements MetraTecDevices.MetratecReader< T >.
|
virtual |
Sets the number of antennas to be multiplexed.
antennasToUse | the antenna count to use |
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 |
Implements MetraTecDevices.MetratecReader< T >.
|
protected |
Send a command and check if the response contains "OK".
command | the command to send |
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 |
|
protectedvirtual |
Set the HeartBeatInterval ... override for send the heartbeat command. The base implementation must be called after success.
intervalInSec | Heartbeat interval in seconds |
Reimplemented from MetraTecDevices.MetratecReader< T >.
|
virtual |
Sets a output pin.
pin | The output pin number |
value | True for set the pin high |
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 |
Implements MetraTecDevices.MetratecReader< T >.
|
protected |
Set the verbosity level.
level | 0.. Only necessary data (EPC, User Data, etc.) is returned. 1..Default, most tag communication errors added. 2: All tag communication errors including RXE and CRE normally indicating a collision are send. |
|
protected |
Split a multiline response (and check the crc)
response |
|
virtual |
Stops the continuous inventory 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 |
Implements MetraTecDevices.MetratecReader< T >.
|
protectedvirtual |
Returns the firmware revision ({firmware} {version})
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 |
Implements MetraTecDevices.MetratecReader< T >.
|
getsetprotected |
Current antenna port.