File BradyPrintSdkRfid.h

FileList > BradyPrintSdkRfid.h

Go to the source code of this file

RFID encoding operations for the Brady Desktop Print SDK. More...

  • #include "BradyPrintSdkCore.h"

Public Functions

Type Name
BRADY_SDK_EXPORT BradySdkStatus AddRfidBlockPermaLock (PrinterHandle printer, PrintJobHandle jobHandle, int location, unsigned int offset, unsigned int numBlocks, unsigned int accessPassword)
Adds an RFID "BlockPermaLock" operation to lock specific blocks on the current page.
BRADY_SDK_EXPORT BradySdkStatus AddRfidLock (PrinterHandle printer, PrintJobHandle jobHandle, int location, unsigned int accessPassword)
Adds an RFID "Lock" operation to the current page. The access password provided must match the tag's current access password. Note: For full security, after locking the target memory bank, you should also lock the access password bank itself.
BRADY_SDK_EXPORT BradySdkStatus AddRfidPermaLock (PrinterHandle printer, PrintJobHandle jobHandle, int location, unsigned int accessPassword)
Adds an RFID "PermaLock" (permanent lock) operation to the current page.
BRADY_SDK_EXPORT BradySdkStatus AddRfidPermaWrite (PrinterHandle printer, PrintJobHandle jobHandle, int location, unsigned int accessPassword)
Adds an RFID "PermaWrite" (permanent unlock) operation to the current page.
BRADY_SDK_EXPORT BradySdkStatus AddRfidSetRxPower (PrinterHandle printer, PrintJobHandle jobHandle, unsigned char powerValue)
Sets the RFID Receive (Rx) power for the operations on the current page.
BRADY_SDK_EXPORT BradySdkStatus AddRfidSetTxPower (PrinterHandle printer, PrintJobHandle jobHandle, unsigned char powerValue)
Sets the RFID Transmit (Tx) power for the operations on the current page.
BRADY_SDK_EXPORT BradySdkStatus AddRfidUnlock (PrinterHandle printer, PrintJobHandle jobHandle, int location, unsigned int accessPassword)
Adds an RFID "Unlock" operation to the current page.
BRADY_SDK_EXPORT BradySdkStatus AddRfidWriteAfi (PrinterHandle printer, PrintJobHandle jobHandle, unsigned char afiValue)
Adds an RFID "Write" operation to the current page to set the Application Family Identifier (AFI).
BRADY_SDK_EXPORT BradySdkStatus AddRfidWriteData (PrinterHandle printer, PrintJobHandle jobHandle, int location, unsigned int offset, const unsigned char * data, size_t dataSize)
Adds an RFID "Write" operation to the current page to write binary data. This is used for the EPC or User memory banks.
BRADY_SDK_EXPORT BradySdkStatus AddRfidWritePassword (PrinterHandle printer, PrintJobHandle jobHandle, int location, unsigned int password)
Adds an RFID "Write" operation to the current page to set a password. This is used only for the AccessPassword or KillPassword memory banks. Note: Writing a password does not inherently secure the tag. To prevent the password from being overwritten, you must also lock the password memory bank.

Detailed Description

This header provides functions for adding RFID operations to print job pages, including writing data, setting passwords, locking memory banks, and configuring RFID power levels.

An EPC Gen2 tag has two separate passwords: an access password and a kill password. Assigning a non-zero access password does not lock the tag; it only requires future users to provide the access password to change the lock state. Only the reserved memory bank (access and kill passwords) can be both read and write-locked; all others (EPC, TID, User) can be write-locked only.

Follow this sequence for successful RFID encoding and locking: * Unlock: Unlock access password bank with existing password if locked (optional). * Update Password: Update the access password (mandatory). * Unlock Banks: Unlock each memory bank (EPC, User, Kill password) with new password (optional). * Update Banks: Update each memory bank data with new password (mandatory). * Lock Banks: Lock each memory bank (EPC, User, Kill Password) with new password (optional). * Lock Password: Lock the access password bank itself to prevent further changes (optional).

Public Functions Documentation

function AddRfidBlockPermaLock

Adds an RFID "BlockPermaLock" operation to lock specific blocks on the current page.

BRADY_SDK_EXPORT BradySdkStatus AddRfidBlockPermaLock (
    PrinterHandle printer,
    PrintJobHandle jobHandle,
    int location,
    unsigned int offset,
    unsigned int numBlocks,
    unsigned int accessPassword
) 

Parameters:

  • printer The handle to the connected printer instance.
  • jobHandle The handle to the print job.
  • location The memory bank (e.g., User). This is an integer value that corresponds to the RfidMemoryLocation enum.
  • offset The starting block offset.
  • numBlocks The number of blocks to lock.
  • accessPassword The 32-bit access password required to perform the operation.

Returns:

BRADY_SDK_SUCCESS if the operation was added successfully.

See also: BradyPrintJobConsts::RfidMemoryLocation


function AddRfidLock

Adds an RFID "Lock" operation to the current page. The access password provided must match the tag's current access password. Note: For full security, after locking the target memory bank, you should also lock the access password bank itself.

BRADY_SDK_EXPORT BradySdkStatus AddRfidLock (
    PrinterHandle printer,
    PrintJobHandle jobHandle,
    int location,
    unsigned int accessPassword
) 

Parameters:

  • printer The handle to the connected printer instance.
  • jobHandle The handle to the print job.
  • location The memory bank to lock. This is an integer value that corresponds to the RfidMemoryLocation enum.
  • accessPassword The 32-bit access password required to perform the lock.

Returns:

BRADY_SDK_SUCCESS if the operation was added successfully.

See also: RfidMemoryLocation

See also: command_sequence


function AddRfidPermaLock

Adds an RFID "PermaLock" (permanent lock) operation to the current page.

BRADY_SDK_EXPORT BradySdkStatus AddRfidPermaLock (
    PrinterHandle printer,
    PrintJobHandle jobHandle,
    int location,
    unsigned int accessPassword
) 

Parameters:

  • printer The handle to the connected printer instance.
  • jobHandle The handle to the print job.
  • location The memory bank to permanently lock. This is an integer value that corresponds to the RfidMemoryLocation enum.
  • accessPassword The 32-bit access password required to perform the operation.

Returns:

BRADY_SDK_SUCCESS if the operation was added successfully.

See also: RfidMemoryLocation


function AddRfidPermaWrite

Adds an RFID "PermaWrite" (permanent unlock) operation to the current page.

BRADY_SDK_EXPORT BradySdkStatus AddRfidPermaWrite (
    PrinterHandle printer,
    PrintJobHandle jobHandle,
    int location,
    unsigned int accessPassword
) 

Parameters:

  • printer The handle to the connected printer instance.
  • jobHandle The handle to the print job.
  • location The memory bank to permanently unlock. This is an integer value that corresponds to the RfidMemoryLocation enum.
  • accessPassword The 32-bit access password required to perform the operation.

Returns:

BRADY_SDK_SUCCESS if the operation was added successfully.

See also: RfidMemoryLocation


function AddRfidSetRxPower

Sets the RFID Receive (Rx) power for the operations on the current page.

BRADY_SDK_EXPORT BradySdkStatus AddRfidSetRxPower (
    PrinterHandle printer,
    PrintJobHandle jobHandle,
    unsigned char powerValue
) 

Parameters:

  • printer The handle to the connected printer instance.
  • jobHandle The handle to the print job.
  • powerValue Power level from 1 (Low) to 30 (High).

Returns:

BRADY_SDK_SUCCESS if the operation was added successfully.


function AddRfidSetTxPower

Sets the RFID Transmit (Tx) power for the operations on the current page.

BRADY_SDK_EXPORT BradySdkStatus AddRfidSetTxPower (
    PrinterHandle printer,
    PrintJobHandle jobHandle,
    unsigned char powerValue
) 

Parameters:

  • printer The handle to the connected printer instance.
  • jobHandle The handle to the print job.
  • powerValue Power level from 1 (Low) to 30 (High).

Returns:

BRADY_SDK_SUCCESS if the operation was added successfully.


function AddRfidUnlock

Adds an RFID "Unlock" operation to the current page.

BRADY_SDK_EXPORT BradySdkStatus AddRfidUnlock (
    PrinterHandle printer,
    PrintJobHandle jobHandle,
    int location,
    unsigned int accessPassword
) 

Parameters:

  • printer The handle to the connected printer instance.
  • jobHandle The handle to the print job.
  • location The memory bank to unlock. This is an integer value that corresponds to the RfidMemoryLocation enum.
  • accessPassword The 32-bit access password required to perform the unlock.

Returns:

BRADY_SDK_SUCCESS if the operation was added successfully.

See also: RfidMemoryLocation


function AddRfidWriteAfi

Adds an RFID "Write" operation to the current page to set the Application Family Identifier (AFI).

BRADY_SDK_EXPORT BradySdkStatus AddRfidWriteAfi (
    PrinterHandle printer,
    PrintJobHandle jobHandle,
    unsigned char afiValue
) 

Parameters:

  • printer The handle to the connected printer instance.
  • jobHandle The handle to the print job.
  • afiValue The AFI value to set (0-255).

Returns:

BRADY_SDK_SUCCESS if the operation was added successfully.


function AddRfidWriteData

Adds an RFID "Write" operation to the current page to write binary data. This is used for the EPC or User memory banks.

BRADY_SDK_EXPORT BradySdkStatus AddRfidWriteData (
    PrinterHandle printer,
    PrintJobHandle jobHandle,
    int location,
    unsigned int offset,
    const unsigned char * data,
    size_t dataSize
) 

EPC Memory Offset Behavior

Parameters:

  • printer The handle to the connected printer instance.
  • jobHandle The handle to the print job.
  • location The memory bank to write to. This is an integer value that corresponds to the RfidMemoryLocation enum. (e.g., ElectronicProductCode, User).
  • offset The starting offset for the write operation. Behavior varies based on memory bank. For EPC memory, see the details section for information on PC word updates.
  • data A pointer to the raw binary data to be written.
  • dataSize The size of the data in bytes.

Returns:

BRADY_SDK_SUCCESS if the operation was added successfully.

See also: RfidMemoryLocation


function AddRfidWritePassword

Adds an RFID "Write" operation to the current page to set a password. This is used only for the AccessPassword or KillPassword memory banks. Note: Writing a password does not inherently secure the tag. To prevent the password from being overwritten, you must also lock the password memory bank.

BRADY_SDK_EXPORT BradySdkStatus AddRfidWritePassword (
    PrinterHandle printer,
    PrintJobHandle jobHandle,
    int location,
    unsigned int password
) 

Parameters:

  • printer The handle to the connected printer instance.
  • jobHandle The handle to the print job.
  • location The password to set. This is an integer value that must be AccessPassword or KillPassword from the RfidMemoryLocation enum.
  • password The 32-bit password to write.

Returns:

BRADY_SDK_SUCCESS if the operation was added successfully.

See also: RfidMemoryLocation

See also: command_sequence



The documentation for this class was generated from the following file BradyPrintSdkRfid.h