NXP Reader Library  v17.1.0.2535
Commands_DataManagement

Describes about the NTAG X DNA Data Management commands. More...

Collaboration diagram for Commands_DataManagement:

Modules

 Defines
 Macro Definitions for Data Management commands.
 

Functions

phStatus_t phalNtagXDna_ReadData (void *pDataParams, uint8_t bOption, uint8_t bFileNo, uint8_t *pOffset, uint8_t *pLength, uint8_t **ppResponse, uint16_t *pRspLen)
 Reads data from Standard data files. More...
 
phStatus_t phalNtagXDna_WriteData (void *pDataParams, uint8_t bOption, uint8_t bFileNo, uint8_t *pOffset, uint8_t *pData, uint8_t *pLength)
 Writes data to standard data files. More...
 
phStatus_t phalNtagXDna_IncrementCounterFile (void *pDataParams, uint8_t bOption, uint8_t bFileNo, uint32_t dwIncrValue)
 Increments the counter file. More...
 

Detailed Description

Describes about the NTAG X DNA Data Management commands.

Function Documentation

◆ phalNtagXDna_ReadData()

phStatus_t phalNtagXDna_ReadData ( void *  pDataParams,
uint8_t  bOption,
uint8_t  bFileNo,
uint8_t pOffset,
uint8_t pLength,
uint8_t **  ppResponse,
uint16_t pRspLen 
)

Reads data from Standard data files.

Note
  • Chaining upto the size of below mentioned buffers are handled within this interface. If more data is to be read, the user has to call this function again with bOption = PH_EXCHANGE_RXCHAINING | one of the communication options.
Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_SUCCESS_CHAININGIndicating more data to be read.
PH_ERR_INVALID_DATA_PARAMSIf DataParams is null.
PH_ERR_INVALID_PARAMETER
  • If the buffers are null.
  • For Invalid File Number (bFileNo).
  • For Invalid Communication option value (bOption).
  • For Invalid Exchange option value (bOption).
XXXX
  • Depending on status codes return by PICC.
  • Other Depending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bOption[In] Options for processing of Secure Messaging and reading of data.
[in]bFileNo[In] The file number from where the data to be read.
[in]pOffset[In] The offset from where the data should be read. Will be of 3 bytes with LSB first. If 0x10 need to be offset, then it will be 10 00 00.
  • 0 to (FixeSize - 1): Starting position of Read operation.
  • 0xFFFFFFFF : Return CRLFile Meta-Data
[in]pLength[In] The number of bytes to be read. Will be of 3 bytes with LSB first.
  • If 0x10 bytes need to be read, then it will be 10 00 00.
  • If complete file need to be read, then it will be 00 00 00.
[out]ppResponse[Out] The data returned by the PICC.
[out]pRspLen[Out] Length of bytes available in ppResponse buffer.

◆ phalNtagXDna_WriteData()

phStatus_t phalNtagXDna_WriteData ( void *  pDataParams,
uint8_t  bOption,
uint8_t  bFileNo,
uint8_t pOffset,
uint8_t pData,
uint8_t pLength 
)

Writes data to standard data files.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSIf DataParams is null.
PH_ERR_INVALID_PARAMETER
  • If the buffers are null.
  • For Invalid File Number (bFileNo).
  • For Invalid Communication option value (bOption).
XXXX
  • Depending on status codes return by PICC.
  • Other Depending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bOption[In] Options for processing of Secure Messaging and writing of data.
[in]bFileNo[In] The file number to which the data to be written.
[in]pOffset[In] The offset from where the data should be written. Will be of 3 bytes with LSB first. If 0x10 need to be offset, then it will be 10 00 00.
[in]pData[In] The data to be written to the PICC.
[in]pLength[In] The number of bytes to be written. Will be of 3 bytes with LSB first.
  • If 0x10 bytes need to be written, then it will be 10 00 00.

◆ phalNtagXDna_IncrementCounterFile()

phStatus_t phalNtagXDna_IncrementCounterFile ( void *  pDataParams,
uint8_t  bOption,
uint8_t  bFileNo,
uint32_t  dwIncrValue 
)

Increments the counter file.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSIf DataParams is null.
PH_ERR_INVALID_PARAMETER
  • If the buffers are null.
  • For Invalid File Number (bFileNo).
  • For Invalid Communication option value (bOption).
XXXX
  • Depending on status codes return by PICC.
  • Other Depending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bOption[In] Options for processing of Secure Messaging and writing of data.
[in]bFileNo[In] The file number to which the value to be incremented.
[in]dwIncrValue[In] The value to be incremented. Provide the counter value in regular format, like if 0x10 needs to be incremented then dwIncrValue = 0x00000010