UniPRT SDK  v1.0.0.0
com.UniPRT.Sdk.LabelMaker.RfidConvert Class Reference

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

Static Public Member Functions

static int ToUInt (byte[] bytesFromRfidTag)
 Convert 4 bytes read from RFID tag into 32 bit unsigned integer. More...
 
static int ToUShort (byte[] bytesFromRfidTag)
 Convert 2 bytes read from RFID tag into 16 bit unsigned integer. More...
 
static String ToHex (long uintData)
 Convert a 4-byte unsigned integer into hex string that can be written on RFID tag. More...
 
static String ToHex (int ushortData)
 Convert a 2-byte unsigned integer into hex string that can be written on RFID tag. More...
 
static byte[] ToBytes (long uintData)
 Convert a 32-bit unsigned integer into a byte array that can be written to RFID tag. Lower index has MSB. More...
 
static byte[] ToBytes (int ushortData)
 Convert a 16-bit unsigned short integer into a byte array that can be written to RFID tag. Lower index has MSB. More...
 
static String ToHex (byte[] bytes)
 Convenience routine that takes an array of bytes and converts to hex string that can be written to RFID tag. More...
 
static String ToHex (String asciiString)
 Convenience routine that takes an ASCII string and converts to hex. More...
 

Static Private Member Functions

static String ToHexString (byte[] bytes)
 

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.

Member Function Documentation

◆ ToBytes() [1/2]

static byte [] com.UniPRT.Sdk.LabelMaker.RfidConvert.ToBytes ( int  ushortData)
static

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

◆ ToBytes() [2/2]

static byte [] com.UniPRT.Sdk.LabelMaker.RfidConvert.ToBytes ( long  uintData)
static

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

Referenced by com.UniPRT.Sdk.LabelMaker.RfidConvert.ToHex().

◆ ToHex() [1/4]

static String com.UniPRT.Sdk.LabelMaker.RfidConvert.ToHex ( byte[]  bytes)
static

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

References com.UniPRT.Sdk.LabelMaker.RfidConvert.ToHexString().

◆ ToHex() [2/4]

static String com.UniPRT.Sdk.LabelMaker.RfidConvert.ToHex ( int  ushortData)
static

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

References com.UniPRT.Sdk.LabelMaker.RfidConvert.ToBytes(), and com.UniPRT.Sdk.LabelMaker.RfidConvert.ToHexString().

◆ ToHex() [3/4]

static String com.UniPRT.Sdk.LabelMaker.RfidConvert.ToHex ( long  uintData)
static

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

References com.UniPRT.Sdk.LabelMaker.RfidConvert.ToBytes(), and com.UniPRT.Sdk.LabelMaker.RfidConvert.ToHexString().

◆ ToHex() [4/4]

static String com.UniPRT.Sdk.LabelMaker.RfidConvert.ToHex ( String  asciiString)
static

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

References com.UniPRT.Sdk.LabelMaker.RfidConvert.ToHexString().

◆ ToHexString()

static String com.UniPRT.Sdk.LabelMaker.RfidConvert.ToHexString ( byte[]  bytes)
staticprivate

◆ ToUInt()

static int com.UniPRT.Sdk.LabelMaker.RfidConvert.ToUInt ( byte[]  bytesFromRfidTag)
static

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

◆ ToUShort()

static int com.UniPRT.Sdk.LabelMaker.RfidConvert.ToUShort ( byte[]  bytesFromRfidTag)
static

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


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