Metratec devices library 3.1.1.0
Public Member Functions | Protected Member Functions | Events | List of all members
MetraTecDevices.HfReaderGen1 Class Reference

The reader class for the ASCII based metratec reader. More...

Inheritance diagram for MetraTecDevices.HfReaderGen1:
MetraTecDevices.MetratecReaderGen1< HfTag > MetraTecDevices.DMI15 MetraTecDevices.DeskID_ISO MetraTecDevices.Dwarf15 MetraTecDevices.QR15 MetraTecDevices.QuasarLR MetraTecDevices.QuasarMX MetraTecDevices.RR15

Public Member Functions

 HfReaderGen1 (ICommunicationInterface connection)
 The reader class for all Metratec reader.
 
 HfReaderGen1 (ICommunicationInterface connection, ILogger logger)
 The reader class for all Metratec reader.
 
 HfReaderGen1 (ICommunicationInterface connection, string id)
 The reader class for all Metratec reader.
 
 HfReaderGen1 (ICommunicationInterface connection, string id, ILogger logger)
 The reader class for all Metratec reader.
 
override void SetPower (int power)
 Set the reader power.
 
override List< HfTagGetInventory ()
 Scan for the current inventory.
 
List< HfTagGetInventory (int afi)
 Scan for the current inventory.
 
List< HfTagGetInventory (bool singleTag, bool onlyNewTags, int afi=0)
 Scan for the current inventory.
 
override 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.
 
void StartInventory (int afi)
 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.
 
override void StopInventory ()
 Stops the continuous inventory scan.
 
void StartInventory (bool singleTag, bool onlyNewTags, int afi=0)
 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.
 
- Public Member Functions inherited from MetraTecDevices.MetratecReaderGen1< HfTag >
 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.
 

Protected Member Functions

override void ConfigureReader ()
 Configure the reader. The base implementation must be called after success.
 
override void HandleResponse (string response)
 Process the reader response...override for event check The base implementation must be called after success.
 
override void HandleInventoryResponse (string response)
 Handle an inventory response.
 
void FireRequestResponse (HfTag tag)
 Fire a inventory event.
 
- Protected Member Functions inherited from MetraTecDevices.MetratecReaderGen1< HfTag >
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.
 

Events

EventHandler< NewRequestResponseArgs >? NewRequestResponse
 request response event handler
 

Additional Inherited Members

- Properties inherited from MetraTecDevices.MetratecReaderGen1< HfTag >
int CurrentAntennaPort [get, set]
 Current antenna port.
 

Detailed Description

The reader class for the ASCII based metratec reader.

Constructor & Destructor Documentation

◆ HfReaderGen1() [1/4]

MetraTecDevices.HfReaderGen1.HfReaderGen1 ( ICommunicationInterface  connection)

The reader class for all Metratec reader.

Parameters
connectionThe connection interface

◆ HfReaderGen1() [2/4]

MetraTecDevices.HfReaderGen1.HfReaderGen1 ( ICommunicationInterface  connection,
ILogger  logger 
)

The reader class for all Metratec reader.

Parameters
connectionThe connection interface
loggerThe connection interface

◆ HfReaderGen1() [3/4]

MetraTecDevices.HfReaderGen1.HfReaderGen1 ( ICommunicationInterface  connection,
string  id 
)

The reader class for all Metratec reader.

Parameters
connectionThe connection interface
idThe reader id

◆ HfReaderGen1() [4/4]

MetraTecDevices.HfReaderGen1.HfReaderGen1 ( ICommunicationInterface  connection,
string  id,
ILogger  logger 
)

The reader class for all Metratec reader.

Parameters
connectionThe connection interface
idThe reader id
loggerThe connection interface

Member Function Documentation

◆ FireRequestResponse()

void MetraTecDevices.HfReaderGen1.FireRequestResponse ( HfTag  tag)
protected

Fire a inventory event.

Parameters
tagthe founded tags

◆ GetInventory() [1/3]

override List< HfTag > MetraTecDevices.HfReaderGen1.GetInventory ( )

Scan for the current inventory.

Exceptions
T:System.InvalidOperationExceptionIf the reader return an error
T:System.TimeoutExceptionThrown if the reader does not responding in time
T:System.ObjectDisposedExceptionIf the reader is not connected or the connection is lost

◆ GetInventory() [2/3]

List< HfTag > MetraTecDevices.HfReaderGen1.GetInventory ( bool  singleTag,
bool  onlyNewTags,
int  afi = 0 
)

Scan for the current inventory.

Parameters
singleTagSet to true if only one tag is expected. Throws an error if more tags are found
onlyNewTagsFind each tag only once as long as it stays powered within the rf field
afiThe Application Family Identifier group the tag has to belong to to be read
Exceptions
T:System.TimeoutExceptionThrown if the reader does not responding in time
T:System.ObjectDisposedExceptionIf the reader is not connected or the connection is lost

◆ GetInventory() [3/3]

List< HfTag > MetraTecDevices.HfReaderGen1.GetInventory ( int  afi)

Scan for the current inventory.

Parameters
afiThe Application Family Identifier group the tag has to belong to to be read
Exceptions
T:System.TimeoutExceptionThrown if the reader does not responding in time
T:System.ObjectDisposedExceptionIf the reader is not connected or the connection is lost

◆ HandleInventoryResponse()

override void MetraTecDevices.HfReaderGen1.HandleInventoryResponse ( string  response)
protectedvirtual

Handle an inventory response.

Parameters
response

Implements MetraTecDevices.MetratecReaderGen1< HfTag >.

◆ HandleResponse()

override void MetraTecDevices.HfReaderGen1.HandleResponse ( string  response)
protected

Process the reader response...override for event check The base implementation must be called after success.

Parameters
responsea reader response

◆ SetPower()

override void MetraTecDevices.HfReaderGen1.SetPower ( int  power)

Set the reader power.

Parameters
powerthe reader power (100, 200)
Exceptions
T:System.InvalidOperationExceptionIf the reader return an error
T:System.TimeoutExceptionThrown if the reader does not responding in time
T:System.ObjectDisposedExceptionIf the reader is not connected or the connection is lost

◆ StartInventory() [1/3]

override void MetraTecDevices.HfReaderGen1.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.

Exceptions
T:System.InvalidOperationExceptionIf the reader return an error
T:System.TimeoutExceptionThrown if the reader does not responding in time
T:System.ObjectDisposedExceptionIf the reader is not connected or the connection is lost

◆ StartInventory() [2/3]

void MetraTecDevices.HfReaderGen1.StartInventory ( bool  singleTag,
bool  onlyNewTags,
int  afi = 0 
)

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.

Parameters
singleTagSet to true if only one tag is expected. Throws an error if more tags are found
onlyNewTagsFind each tag only once as long as it stays powered within the rf field
afiThe Application Family Identifier group the tag has to belong to to be read
Exceptions
T:System.InvalidOperationExceptionIf the reader return an error
T:System.TimeoutExceptionThrown if the reader does not responding in time
T:System.ObjectDisposedExceptionIf the reader is not connected or the connection is lost

◆ StartInventory() [3/3]

void MetraTecDevices.HfReaderGen1.StartInventory ( int  afi)

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.

Parameters
afiThe Application Family Identifier group the tag has to belong to to be read
Exceptions
T:System.InvalidOperationExceptionIf the reader return an error
T:System.TimeoutExceptionThrown if the reader does not responding in time
T:System.ObjectDisposedExceptionIf the reader is not connected or the connection is lost

◆ StopInventory()

override void MetraTecDevices.HfReaderGen1.StopInventory ( )

Stops the continuous inventory scan.

Exceptions
T:System.TimeoutExceptionThrown if the reader does not responding in time
T:System.ObjectDisposedException/// If the reader is not connected or the connection is lost

The documentation for this class was generated from the following file: