Transponder class providing basic commands for all EPC Class 1 Generation 2 compliant Transponders. More...
#include <FedmIscTagHandler_EPC_Class1_Gen2.h>
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 |
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.
Definition at line 84 of file FedmIscTagHandler_EPC_Class1_Gen2.h.
FedmIscTagHandler_EPC_Class1_Gen2::FedmIscTagHandler_EPC_Class1_Gen2 | ( | FEDM_ISCReader * | pReader, |
FEDM_ISOTabItem * | pTabItem | ||
) | [protected] |
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.
FedmIscTagHandler_EPC_Class1_Gen2::~FedmIscTagHandler_EPC_Class1_Gen2 | ( | ) | [protected, virtual] |
Definition at line 127 of file FedmIscTagHandler_EPC_Class1_Gen2.cpp.
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
[in] | uiBank | Bank number. Use [BANK_RESERVED](BANK_RESERVED), [BANK_EPC](BANK_EPC), [BANK_TID](BANK_TID) or [BANK_USER](BANK_USER) |
[in] | uiBlockPointer | first block (consider: vendor specific block size) |
[in] | uiBlockRange | number of blocks (limited to 4) |
[in] | sPassword | Optional hex-coded password with even number of chars. Set to "" (empty string) disables password. |
[in] | pucMask | Pointer to array with mask data to transmit to |
Description
This is an optional command and must not be supported by the Transponder.
See EPC Class 1 Gen 2 standard for detailed information.
Definition at line 1156 of file FedmIscTagHandler_EPC_Class1_Gen2.cpp.
const char * FedmIscTagHandler_EPC_Class1_Gen2::GetEpcOfUid | ( | ) |
Returns the EPC from the UID.
Description
The EPC is extracted from the UID and returned.
Definition at line 193 of file FedmIscTagHandler_EPC_Class1_Gen2.cpp.
unsigned int FedmIscTagHandler_EPC_Class1_Gen2::GetExtendedProtocolControlW1 | ( | ) |
Method to query the Extended Protocol-Control (XPC_W1)
Description
Definition at line 176 of file FedmIscTagHandler_EPC_Class1_Gen2.cpp.
unsigned int FedmIscTagHandler_EPC_Class1_Gen2::GetMaskDesignerID | ( | ) |
Method to query the 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.
const char * FedmIscTagHandler_EPC_Class1_Gen2::GetMaskDesignerName | ( | ) |
Method to query the 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.
unsigned int FedmIscTagHandler_EPC_Class1_Gen2::GetProtocolControl | ( | ) |
Method to query the Protocol-Control (PC)
Description
Definition at line 160 of file FedmIscTagHandler_EPC_Class1_Gen2.cpp.
unsigned int FedmIscTagHandler_EPC_Class1_Gen2::GetTagModelNumber | ( | ) |
Method to query the 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.
const char * FedmIscTagHandler_EPC_Class1_Gen2::GetTidOfUid | ( | ) |
Returns the TID from the UID.
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.
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.
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.
[in] | sPassword | Optional hex-coded password with even number of chars. Set to "" (empty string) disables password. |
[in] | bRecom_AssertedLSB | Recommissioning Bit Asserted LSB (preset: disabled) |
[in] | bRecom_Asserted2SB | Recommissioning Bit Asserted 2LSB (preset: disabled) |
[in] | bRecom_Asserted3SB | Recommissioning Bit Asserted 3LSB (preset: disabled) |
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.
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)
[in] | sPassword | Optional hex-coded password with even number of chars. Set to "" (empty string) disables password. |
[in] | ucLockKill | lock settings for kill |
[in] | ucLockAccess | lock settings for access pasword |
[in] | ucLockEPC | lock settings for EPC memory |
[in] | ucLockTID | lock settings for TID memory |
[in] | ucLockUser | lock settings for User memory |
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:
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)
[in] | sPassword | Optional hex-coded password with even number of chars. Set to "" (empty string) disables password. |
[in] | ucKillMask | 2 Bit mask settings for kill |
[in] | ucKillAction | 2 Bit action settings for kill |
[in] | ucAccessMask | 2 Bit mask settings for access pasword |
[in] | ucAccessAction | 2 Bit action settings for access pasword |
[in] | ucEPCMask | 2 Bit mask settings for EPC memory |
[in] | ucEPCAction | 2 Bit action settings for EPC memory |
[in] | ucTIDMask | 2 Bit mask settings for TID memory |
[in] | ucTIDAction | 2 Bit action settings for TID memory |
[in] | ucUserMask | 2 Bit mask settings for User memory |
[in] | ucUserAction | 2 Bit action settings for User memory |
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.
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.
[in] | uiBank | Bank number. Use [BANK_RESERVED](BANK_RESERVED), [BANK_EPC](BANK_EPC), [BANK_TID](BANK_TID) or [BANK_USER](BANK_USER) |
[in] | sPassword | Optional hex-coded password with even number of chars. Set to "" (empty string) disables password. |
[out] | pucData | Pointer to array for received data blocks |
[in] | uiDataBufferSize | Size of the array for received data blocks |
[out] | uiNoOfDataBlocksRead | Return of the number of data blocks read |
Description
[0xB0][0x23] Read Multiple Blocks command with READ_COMPLETE_BANK option
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
[in] | uiBank | Bank number. Use [BANK_RESERVED](BANK_RESERVED), [BANK_EPC](BANK_EPC), [BANK_TID](BANK_TID) or [BANK_USER](BANK_USER) |
[in] | uiFirstDataBlock | First data block address |
[in] | uiNoOfDataBlocks | Number of requested data blocks |
[in] | sPassword | Optional hex-coded password with even number of chars. Set to "" (empty string) disables password. |
[out] | pucData | Pointer to array for received data blocks |
Description
[0xB0][0x23] Read Multiple Blocks command
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
[in] | uiBank | Bank number. Use [BANK_RESERVED](BANK_RESERVED), [BANK_EPC](BANK_EPC), [BANK_TID](BANK_TID) or [BANK_USER](BANK_USER) |
[in] | uiBlockPointer | first block (consider: vendor specific block size) |
[in] | uiBlockRange | number of blocks (limited to 4) |
[in] | sPassword | Optional hex-coded password with even number of chars. Set to "" (empty string) disables password. |
[out] | pucMask | Pointer to array for received mask data |
Description
This is an optional command and must not be supported by the Transponder.
See EPC Class 1 Gen 2 standard for detailed information.
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.
[in] | sNewEPC | Hex-coded string with the new EPC with even number of chars |
[in] | sPassword | Optional hex-coded password with even number of chars. Set to "" (empty string) disables password (preset: disabled). |
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.
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
[in] | uiBank | Bank number. Use [BANK_RESERVED](BANK_RESERVED), [BANK_EPC](BANK_EPC), [BANK_TID](BANK_TID) or [BANK_USER](BANK_USER) |
[in] | uiFirstDataBlock | First data block address |
[in] | uiNoOfDataBlocks | Number of data blocks to transmit to |
[in] | sPassword | Optional hex-coded password with even number of chars. Set to "" (empty string) disables password. |
[in] | pucData | Pointer to array with data blocks to transmit to |
Description
Basic [0xB0][0x24] Write Multiple Blocks command
Definition at line 640 of file FedmIscTagHandler_EPC_Class1_Gen2.cpp.
friend class FEDM_ISCReader [friend] |
Reimplemented from FedmIscTagHandler.
Reimplemented in FedmIscTagHandler_ISO18000_3M3, and FedmIscTagHandler_EPC_Class1_Gen2_IDS_SL900A.
Definition at line 90 of file FedmIscTagHandler_EPC_Class1_Gen2.h.
friend class FEDM_ISCReaderModule [friend] |
Reimplemented from FedmIscTagHandler.
Reimplemented in FedmIscTagHandler_ISO18000_3M3, and FedmIscTagHandler_EPC_Class1_Gen2_IDS_SL900A.
Definition at line 89 of file FedmIscTagHandler_EPC_Class1_Gen2.h.
friend class FEDM_ISOTabItem [friend] |
Reimplemented from FedmIscTagHandler.
Reimplemented in FedmIscTagHandler_ISO18000_3M3, and FedmIscTagHandler_EPC_Class1_Gen2_IDS_SL900A.
Definition at line 91 of file FedmIscTagHandler_EPC_Class1_Gen2.h.
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.
std::string FedmIscTagHandler_EPC_Class1_Gen2::m_sEpc [protected] |
Definition at line 457 of file FedmIscTagHandler_EPC_Class1_Gen2.h.
std::string FedmIscTagHandler_EPC_Class1_Gen2::m_sTid [protected] |
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.