UniPRT SDK v1.0.0.0
 
Loading...
Searching...
No Matches
RfidConvert Class Reference

Support methods to help convert non-byte data to order stored in RFID tags. More...

#include <RfidConvert.h>

Inheritance diagram for RfidConvert:

Class Methods

(uint32_t) + toUInt:
 Convert 4 bytes read from RFID tag into 32 bit unsigned integer.
 
(uint16_t) + toUShort:
 Convert 2 bytes read from RFID tag into 16 bit unsigned integer.
 
(NSString *) + toHexFromUInt:
 Convert a 4 byte unsigned integer into hex string that can be written on RFID tag.
 
(NSString *) + toHexFromUShort:
 Convert a 2 byte unsigned integer into hex string that can be written on RFID tag.
 
(NSData *) + toBytesFromUInt:
 Convert a 32 bit unsigned integer into a byte array that can be written to RFID tag. Lower index has MSB.
 
(NSData *) + toBytesFromUShort:
 Convert a 16 bit unsigned short integer into a byte array that can be written to RFID tag. Lower index has MSB.
 
(NSString *) + toHexFromBytes:
 Convenience routine that takes and array of bytes and converts to hex string that can be written to RFID tag.
 
(NSString *) + toHexFromASCIIString:
 Convenience routine that takes an ASCII string and converts to hex.
 

Detailed Description

Support methods to help convert non-byte data to order stored in RFID tags.

Data is stored in the RFID tag in MSB to LSB. The PC running the SDK may be little or big endian and these support methods help with conversions that may be affected by the endian of the platform running the SDK.

Method Documentation

◆ toBytesFromUInt:

+ (NSData *) toBytesFromUInt: (uint32_t) uintData

Convert a 32 bit unsigned integer into a byte array that can be written to RFID tag. Lower index has MSB.

◆ toBytesFromUShort:

+ (NSData *) toBytesFromUShort: (uint16_t) ushortData

Convert a 16 bit unsigned short integer into a byte array that can be written to RFID tag. Lower index has MSB.

◆ toHexFromASCIIString:

+ (NSString *) toHexFromASCIIString: (NSString *) asciiString

Convenience routine that takes an ASCII string and converts to hex.

◆ toHexFromBytes:

+ (NSString *) toHexFromBytes: (NSData *) bytes

Convenience routine that takes and array of bytes and converts to hex string that can be written to RFID tag.

◆ toHexFromUInt:

+ (NSString *) toHexFromUInt: (uint32_t) uintData

Convert a 4 byte unsigned integer into hex string that can be written on RFID tag.

◆ toHexFromUShort:

+ (NSString *) toHexFromUShort: (uint16_t) ushortData

Convert a 2 byte unsigned integer into hex string that can be written on RFID tag.

◆ toUInt:

+ (uint32_t) toUInt: (NSData *) bytesFromRfidTag

Convert 4 bytes read from RFID tag into 32 bit unsigned integer.

◆ toUShort:

+ (uint16_t) toUShort: (NSData *) bytesFromRfidTag

Convert 2 bytes read from RFID tag into 16 bit unsigned integer.


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