Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends
FedmIscTagHandler_EPC_Class1_Gen2 Class Reference

Transponder class providing basic commands for all EPC Class 1 Generation 2 compliant Transponders. More...

#include <FedmIscTagHandler_EPC_Class1_Gen2.h>

Inheritance diagram for FedmIscTagHandler_EPC_Class1_Gen2:
Inheritance graph
[legend]

List of all members.

Public Member Functions

int BlockPermalock (unsigned int uiBank, unsigned int uiBlockPointer, unsigned int uiBlockRange, std::string sPassword, unsigned char *pucMask)
 [0xB3][0x25] Block Permalock command
const char * GetEpcOfUid ()
 Returns the EPC from the UID.
unsigned int GetExtendedProtocolControlW1 ()
 Method to query the Extended Protocol-Control (XPC_W1)
unsigned int GetMaskDesignerID ()
 Method to query the Mask Designer Identifier.
const char * GetMaskDesignerName ()
 Method to query the Manufacturer Name.
unsigned int GetProtocolControl ()
 Method to query the Protocol-Control (PC)
unsigned int GetTagModelNumber ()
 Method to query the Tag Model Number.
const char * GetTidOfUid ()
 Returns the TID from the UID.
bool IsExtendedPC_W1 ()
 Method to query if the Protocol-Control (PC) is extended.
bool IsUidWithTid ()
 Method to query if the UID is a combination of EPC and TID.
int Kill (std::string sPassword, bool bRecom_AssertedLSB=false, bool bRecom_Asserted2SB=false, bool bRecom_Asserted3SB=false)
 Kill command.
int Lock (std::string sPassword, unsigned char ucLockKill, unsigned char ucLockAccess, unsigned char ucLockEPC, unsigned char ucLockTID, unsigned char ucLockUser)
 Lock command (simplified version)
int Lock (std::string sPassword, unsigned char ucKillMask, unsigned char ucKillAction, unsigned char ucAccessMask, unsigned char ucAccessAction, unsigned char ucEPCMask, unsigned char ucEPCAction, unsigned char ucTIDMask, unsigned char ucTIDAction, unsigned char ucUserMask, unsigned char ucUserAction)
 Lock command (parameters according EPC Class 1 Gen 2 specification)
int ReadCompleteBank (unsigned int uiBank, std::string sPassword, unsigned char *pucData, unsigned int uiDataBufferSize, unsigned int &uiNoOfDataBlocksRead)
 Read the complete content of a bank.
int ReadMultipleBlocks (unsigned int uiBank, unsigned int uiFirstDataBlock, unsigned int uiNoOfDataBlocks, std::string sPassword, unsigned char *pucData)
 [0xB0][0x23] Read Multiple Blocks command
int ReadPermalockStatus (unsigned int uiBank, unsigned int uiBlockPointer, unsigned int uiBlockRange, std::string sPassword, unsigned char *pucMask)
 [0xB3][0x25] Block Permalock command
int WriteEPC (std::string sNewEPC, std::string sPassword="")
 Write of an EPC into the EPC Memory.
int WriteMultipleBlocks (unsigned int uiBank, unsigned int uiFirstDataBlock, unsigned int uiNoOfDataBlocks, std::string sPassword, unsigned char *pucData)
 [0xB0][0x24] Write Multiple Blocks command

Static Public Attributes

static const unsigned int BANK_EPC = 1
static const unsigned int BANK_RESERVED = 0
static const unsigned int BANK_TID = 2
static const unsigned int BANK_USER = 3
static const unsigned char LOCK = 0x22
static const unsigned char LOCK_PERMANENTLY = 0x33
static const unsigned char UNCHANGED = 0x00
static const unsigned char UNLOCK = 0x20
static const unsigned char UNLOCK_PERMANENTLY = 0x31

Protected Member Functions

 FedmIscTagHandler_EPC_Class1_Gen2 (FEDM_ISCReader *pReader, FEDM_ISOTabItem *pTabItem)
 FedmIscTagHandler_EPC_Class1_Gen2 (FEDM_ISCReader *pReader, unsigned int uiTagHandlerType, FEDM_ISOTabItem *pTabItem)
virtual ~FedmIscTagHandler_EPC_Class1_Gen2 ()

Protected Attributes

std::string m_sEpc
std::string m_sTid

Friends

class FEDM_ISCReader
class FEDM_ISCReaderModule
class FEDM_ISOTabItem

Detailed Description

Transponder class providing basic commands for all EPC Class 1 Generation 2 compliant Transponders.

Description
High-level class for easy-to-use Transponder specific communication. See OBID::FEDM::Core::ITagGroup for additional information.

Note:
Programmers should be familiar with the EPC Class 1 Gen 2 standard (www.epcglobal.org)

Definition at line 84 of file FedmIscTagHandler_EPC_Class1_Gen2.h.


Constructor & Destructor Documentation

Definition at line 109 of file FedmIscTagHandler_EPC_Class1_Gen2.cpp.

FedmIscTagHandler_EPC_Class1_Gen2::FedmIscTagHandler_EPC_Class1_Gen2 ( FEDM_ISCReader pReader,
unsigned int  uiTagHandlerType,
FEDM_ISOTabItem pTabItem 
) [protected]

Definition at line 118 of file FedmIscTagHandler_EPC_Class1_Gen2.cpp.

Definition at line 127 of file FedmIscTagHandler_EPC_Class1_Gen2.cpp.


Member Function Documentation

int FedmIscTagHandler_EPC_Class1_Gen2::BlockPermalock ( unsigned int  uiBank,
unsigned int  uiBlockPointer,
unsigned int  uiBlockRange,
std::string  sPassword,
unsigned char *  pucMask 
)

[0xB3][0x25] Block Permalock command

Parameters:
[in]uiBankBank number. Use [BANK_RESERVED](BANK_RESERVED), [BANK_EPC](BANK_EPC), [BANK_TID](BANK_TID) or [BANK_USER](BANK_USER)
[in]uiBlockPointerfirst block (consider: vendor specific block size)
[in]uiBlockRangenumber of blocks (limited to 4)
[in]sPasswordOptional hex-coded password with even number of chars. Set to "" (empty string) disables password.
[in]pucMaskPointer to array with mask data to transmit to
Returns:
  • 0 if OK
  • < 0 [error code](OBID::FEDM::Core::Error)
  • > 0 status byte of the responded protocol, if the Reader signals a problem. See Reader's System Manual for the full list with all status bytes.

Description
This is an optional command and must not be supported by the Transponder.
See EPC Class 1 Gen 2 standard for detailed information.

Note:
Hex-coded string means, that a hex value of 0xAB39F1D9 must be set as "AB39F1D9".

Definition at line 1156 of file FedmIscTagHandler_EPC_Class1_Gen2.cpp.

Returns the EPC from the UID.

Returns:
String with EPC

Description
The EPC is extracted from the UID and returned.

Definition at line 193 of file FedmIscTagHandler_EPC_Class1_Gen2.cpp.

Method to query the Extended Protocol-Control (XPC_W1)

Returns:
Extended Protocol Control XPC_W1

Description

Definition at line 176 of file FedmIscTagHandler_EPC_Class1_Gen2.cpp.

Method to query the Mask Designer Identifier.

Returns:
Mask Designer Identifier

Description
The Mask Designer Identifier is part of the TID and can only be returned, if the TID is part of the UID or if the first 2 blocks of the TID memory is read separately.
The EPC Class 1 Gen 2 standard reserves the bits 08h .. 13h of the TID memory as a 12-bit Mask Designer Identifier (obtainable from the registration authority).

Definition at line 266 of file FedmIscTagHandler_EPC_Class1_Gen2.cpp.

Method to query the Manufacturer Name.

Returns:
String with Manufacturer Name

Description
The Manufacturer Name is specified by the Mask Designer Identifier, which is part of the TID.
The Manufacturer name can only be returned, if the TID is part of the UID or if the first 2 blocks of the TID memory is read separately.
The EPC Class 1 Gen 2 standard reserves the bits 08h .. 13h of the TID memory as a 12-bit Mask Designer Identifier (obtainable from the registration authority).

Definition at line 283 of file FedmIscTagHandler_EPC_Class1_Gen2.cpp.

Method to query the Protocol-Control (PC)

Returns:
Protocol Control

Description

Definition at line 160 of file FedmIscTagHandler_EPC_Class1_Gen2.cpp.

Method to query the Tag Model Number.

Returns:
Tag Model Number

Description
The Tag Model Number is part of the TID and can only be returned, if the TID is part of the UID or if the first 2 blocks of the TID memory is read separately.
The EPC Class 1 Gen 2 standard reserves the bits 14h .. 1Fh of the TID memory as a vendor-defined 12-bit Tag Model Number.

Definition at line 249 of file FedmIscTagHandler_EPC_Class1_Gen2.cpp.

Returns the TID from the UID.

Returns:
String with TID

Description
The TID is extracted from the UID and returned.

Definition at line 222 of file FedmIscTagHandler_EPC_Class1_Gen2.cpp.

Method to query if the Protocol-Control (PC) is extended.

Returns:
true, if PC is extended, otherwise false

Description
Method to query if the Protocol-Control (PC) is extended with 1 additional block of 2 bytes.

Definition at line 144 of file FedmIscTagHandler_EPC_Class1_Gen2.cpp.

Method to query if the UID is a combination of EPC and TID.

Returns:
true, if UID is EPC + TID

Description

Definition at line 136 of file FedmIscTagHandler_EPC_Class1_Gen2.cpp.

int FedmIscTagHandler_EPC_Class1_Gen2::Kill ( std::string  sPassword,
bool  bRecom_AssertedLSB = false,
bool  bRecom_Asserted2SB = false,
bool  bRecom_Asserted3SB = false 
)

Kill command.

Parameters:
[in]sPasswordOptional hex-coded password with even number of chars. Set to "" (empty string) disables password.
[in]bRecom_AssertedLSBRecommissioning Bit Asserted LSB (preset: disabled)
[in]bRecom_Asserted2SBRecommissioning Bit Asserted 2LSB (preset: disabled)
[in]bRecom_Asserted3SBRecommissioning Bit Asserted 3LSB (preset: disabled)
Returns:
  • 0 if OK
  • < 0 [error code](OBID::FEDM::Core::Error)
  • > 0 status byte of the responded protocol, if the Reader signals a problem. See Reader's System Manual for the full list with all status bytes.

Description
The kill command can destroy the Transponder. See EPC Class 1 Gen 2 standard for detailed information, especially how to handle the Kill command with Recommissioning Bits.

Note:
Hex-coded string means, that a hex value of 0xAB39F1D9 must be set as "AB39F1D9".

Definition at line 907 of file FedmIscTagHandler_EPC_Class1_Gen2.cpp.

int FedmIscTagHandler_EPC_Class1_Gen2::Lock ( std::string  sPassword,
unsigned char  ucLockKill,
unsigned char  ucLockAccess,
unsigned char  ucLockEPC,
unsigned char  ucLockTID,
unsigned char  ucLockUser 
)

Lock command (simplified version)

Parameters:
[in]sPasswordOptional hex-coded password with even number of chars. Set to "" (empty string) disables password.
[in]ucLockKilllock settings for kill
[in]ucLockAccesslock settings for access pasword
[in]ucLockEPClock settings for EPC memory
[in]ucLockTIDlock settings for TID memory
[in]ucLockUserlock settings for User memory
Returns:
  • 0 if OK
  • < 0 [error code](OBID::FEDM::Core::Error)
  • > 0 status byte of the responded protocol, if the Reader signals a problem. See Reader's System Manual for the full list with all status bytes.

Description
[0xB3][0x22] Lock command to secure the access to a transponder.
The Lock command can lock permanently one bank or multiple banks of the Transponder. See EPC Class 1 Gen 2 standard for detailed information.

Use one of the constants for each lock setting:

Note:
Hex-coded string means, that a hex value of 0xAB39F1D9 must be set as "AB39F1D9".

Definition at line 1001 of file FedmIscTagHandler_EPC_Class1_Gen2.cpp.

int FedmIscTagHandler_EPC_Class1_Gen2::Lock ( std::string  sPassword,
unsigned char  ucKillMask,
unsigned char  ucKillAction,
unsigned char  ucAccessMask,
unsigned char  ucAccessAction,
unsigned char  ucEPCMask,
unsigned char  ucEPCAction,
unsigned char  ucTIDMask,
unsigned char  ucTIDAction,
unsigned char  ucUserMask,
unsigned char  ucUserAction 
)

Lock command (parameters according EPC Class 1 Gen 2 specification)

Parameters:
[in]sPasswordOptional hex-coded password with even number of chars. Set to "" (empty string) disables password.
[in]ucKillMask2 Bit mask settings for kill
[in]ucKillAction2 Bit action settings for kill
[in]ucAccessMask2 Bit mask settings for access pasword
[in]ucAccessAction2 Bit action settings for access pasword
[in]ucEPCMask2 Bit mask settings for EPC memory
[in]ucEPCAction2 Bit action settings for EPC memory
[in]ucTIDMask2 Bit mask settings for TID memory
[in]ucTIDAction2 Bit action settings for TID memory
[in]ucUserMask2 Bit mask settings for User memory
[in]ucUserAction2 Bit action settings for User memory
Returns:
  • 0 if OK
  • < 0 [error code](OBID::FEDM::Core::Error)
  • > 0 status byte of the responded protocol, if the Reader signals a problem. See Reader's System Manual for the full list with all status bytes.

Description
[0xB3][0x22] Lock command to secure the access to a transponder.
The Lock command can lock permanently one bank or multiple banks of the Transponder. See EPC Class 1 Gen 2 standard for detailed information.

Note:
Hex-coded string means, that a hex value of 0xAB39F1D9 must be set as "AB39F1D9".

Definition at line 1051 of file FedmIscTagHandler_EPC_Class1_Gen2.cpp.

int FedmIscTagHandler_EPC_Class1_Gen2::ReadCompleteBank ( unsigned int  uiBank,
std::string  sPassword,
unsigned char *  pucData,
unsigned int  uiDataBufferSize,
unsigned int &  uiNoOfDataBlocksRead 
)

Read the complete content of a bank.

Parameters:
[in]uiBankBank number. Use [BANK_RESERVED](BANK_RESERVED), [BANK_EPC](BANK_EPC), [BANK_TID](BANK_TID) or [BANK_USER](BANK_USER)
[in]sPasswordOptional hex-coded password with even number of chars. Set to "" (empty string) disables password.
[out]pucDataPointer to array for received data blocks
[in]uiDataBufferSizeSize of the array for received data blocks
[out]uiNoOfDataBlocksReadReturn of the number of data blocks read
Returns:
  • 0 if OK
  • < 0 [error code](OBID::FEDM::Core::Error)
  • > 0 status byte of the responded protocol, if the Reader signals a problem. See Reader's System Manual for the full list with all status bytes.

Description
[0xB0][0x23] Read Multiple Blocks command with READ_COMPLETE_BANK option

Note:
Hex-coded string means, that a hex value of 0xAB39F1D9 must be set as "AB39F1D9".

Definition at line 314 of file FedmIscTagHandler_EPC_Class1_Gen2.cpp.

int FedmIscTagHandler_EPC_Class1_Gen2::ReadMultipleBlocks ( unsigned int  uiBank,
unsigned int  uiFirstDataBlock,
unsigned int  uiNoOfDataBlocks,
std::string  sPassword,
unsigned char *  pucData 
)

[0xB0][0x23] Read Multiple Blocks command

Parameters:
[in]uiBankBank number. Use [BANK_RESERVED](BANK_RESERVED), [BANK_EPC](BANK_EPC), [BANK_TID](BANK_TID) or [BANK_USER](BANK_USER)
[in]uiFirstDataBlockFirst data block address
[in]uiNoOfDataBlocksNumber of requested data blocks
[in]sPasswordOptional hex-coded password with even number of chars. Set to "" (empty string) disables password.
[out]pucDataPointer to array for received data blocks
Returns:
  • 0 if OK
  • < 0 [error code](OBID::FEDM::Core::Error)
  • > 0 status byte of the responded protocol, if the Reader signals a problem. See Reader's System Manual for the full list with all status bytes.

Description
[0xB0][0x23] Read Multiple Blocks command

Note:
Hex-coded string means, that a hex value of 0xAB39F1D9 must be set as "AB39F1D9".

Definition at line 496 of file FedmIscTagHandler_EPC_Class1_Gen2.cpp.

int FedmIscTagHandler_EPC_Class1_Gen2::ReadPermalockStatus ( unsigned int  uiBank,
unsigned int  uiBlockPointer,
unsigned int  uiBlockRange,
std::string  sPassword,
unsigned char *  pucMask 
)

[0xB3][0x25] Block Permalock command

Parameters:
[in]uiBankBank number. Use [BANK_RESERVED](BANK_RESERVED), [BANK_EPC](BANK_EPC), [BANK_TID](BANK_TID) or [BANK_USER](BANK_USER)
[in]uiBlockPointerfirst block (consider: vendor specific block size)
[in]uiBlockRangenumber of blocks (limited to 4)
[in]sPasswordOptional hex-coded password with even number of chars. Set to "" (empty string) disables password.
[out]pucMaskPointer to array for received mask data
Returns:
  • 0 if OK
  • < 0 [error code](OBID::FEDM::Core::Error)
  • > 0 status byte of the responded protocol, if the Reader signals a problem. See Reader's System Manual for the full list with all status bytes.

Description
This is an optional command and must not be supported by the Transponder.
See EPC Class 1 Gen 2 standard for detailed information.

Note:
Hex-coded string means, that a hex value of 0xAB39F1D9 must be set as "AB39F1D9".

Definition at line 1265 of file FedmIscTagHandler_EPC_Class1_Gen2.cpp.

int FedmIscTagHandler_EPC_Class1_Gen2::WriteEPC ( std::string  sNewEPC,
std::string  sPassword = "" 
)

Write of an EPC into the EPC Memory.

Parameters:
[in]sNewEPCHex-coded string with the new EPC with even number of chars
[in]sPasswordOptional hex-coded password with even number of chars. Set to "" (empty string) disables password (preset: disabled).
Returns:
  • 0 if OK
  • < 0 [error code](OBID::FEDM::Core::Error)
  • > 0 status byte of the responded protocol, if the Reader signals a problem. See Reader's System Manual for the full list with all status bytes.

Description
Special [0xB0][0x24] Write Multiple Blocks command to write a new EPC number to the EPC bank of a transponder
The EPC-lenght must be multiple of 2 bytes. Thus, the EPC string must contain multiple of 4 characters.

Note:
Hex-coded string means, that a hex value of 0xAB39F1D9 must be set as "AB39F1D9".

Definition at line 790 of file FedmIscTagHandler_EPC_Class1_Gen2.cpp.

int FedmIscTagHandler_EPC_Class1_Gen2::WriteMultipleBlocks ( unsigned int  uiBank,
unsigned int  uiFirstDataBlock,
unsigned int  uiNoOfDataBlocks,
std::string  sPassword,
unsigned char *  pucData 
)

[0xB0][0x24] Write Multiple Blocks command

Parameters:
[in]uiBankBank number. Use [BANK_RESERVED](BANK_RESERVED), [BANK_EPC](BANK_EPC), [BANK_TID](BANK_TID) or [BANK_USER](BANK_USER)
[in]uiFirstDataBlockFirst data block address
[in]uiNoOfDataBlocksNumber of data blocks to transmit to
[in]sPasswordOptional hex-coded password with even number of chars. Set to "" (empty string) disables password.
[in]pucDataPointer to array with data blocks to transmit to
Returns:
  • 0 if OK
  • < 0 [error code](OBID::FEDM::Core::Error)
  • > 0 status byte of the responded protocol, if the Reader signals a problem. See Reader's System Manual for the full list with all status bytes.

Description
Basic [0xB0][0x24] Write Multiple Blocks command

Note:
Hex-coded string means, that a hex value of 0xAB39F1D9 must be set as "AB39F1D9".

Definition at line 640 of file FedmIscTagHandler_EPC_Class1_Gen2.cpp.


Friends And Related Function Documentation

friend class FEDM_ISCReader [friend]
friend class FEDM_ISCReaderModule [friend]
friend class FEDM_ISOTabItem [friend]

Member Data Documentation

const unsigned int FedmIscTagHandler_EPC_Class1_Gen2::BANK_EPC = 1 [static]

Definition at line 437 of file FedmIscTagHandler_EPC_Class1_Gen2.h.

const unsigned int FedmIscTagHandler_EPC_Class1_Gen2::BANK_RESERVED = 0 [static]

Definition at line 436 of file FedmIscTagHandler_EPC_Class1_Gen2.h.

const unsigned int FedmIscTagHandler_EPC_Class1_Gen2::BANK_TID = 2 [static]

Definition at line 438 of file FedmIscTagHandler_EPC_Class1_Gen2.h.

const unsigned int FedmIscTagHandler_EPC_Class1_Gen2::BANK_USER = 3 [static]

Definition at line 439 of file FedmIscTagHandler_EPC_Class1_Gen2.h.

const unsigned char FedmIscTagHandler_EPC_Class1_Gen2::LOCK = 0x22 [static]

Definition at line 445 of file FedmIscTagHandler_EPC_Class1_Gen2.h.

const unsigned char FedmIscTagHandler_EPC_Class1_Gen2::LOCK_PERMANENTLY = 0x33 [static]

Definition at line 446 of file FedmIscTagHandler_EPC_Class1_Gen2.h.

Definition at line 457 of file FedmIscTagHandler_EPC_Class1_Gen2.h.

Definition at line 458 of file FedmIscTagHandler_EPC_Class1_Gen2.h.

const unsigned char FedmIscTagHandler_EPC_Class1_Gen2::UNCHANGED = 0x00 [static]

Definition at line 442 of file FedmIscTagHandler_EPC_Class1_Gen2.h.

const unsigned char FedmIscTagHandler_EPC_Class1_Gen2::UNLOCK = 0x20 [static]

Definition at line 443 of file FedmIscTagHandler_EPC_Class1_Gen2.h.

const unsigned char FedmIscTagHandler_EPC_Class1_Gen2::UNLOCK_PERMANENTLY = 0x31 [static]

Definition at line 444 of file FedmIscTagHandler_EPC_Class1_Gen2.h.


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


maggie_rfid_drivers
Author(s): Raul Perula-Martinez
autogenerated on Mon Sep 14 2015 03:05:32