UgiEpc Class Reference

Overview


UgiEpc encapsulates an EPC code

Class Methods

(UgiEpc *_Nonnull) + epcFromBytes:
 
Create a UgiEpc object from a NSData object More...
 
(UgiEpc *_Nonnull) + epcFromString:
 
Create a UgiEpc object from a string of hex digits (uppercase or lowercase) More...
 
(UgiEpc *_Nonnull) + epcFromUGrokItEpc
 
Create a new EPC for use with a U Grok It tag More...
 

Instance Methods

(const uint8_t *_Nonnull) - bytes
 
Get a pointer to the EPC's bytes (convenience method for data.bytes) More...
 
(int) - length
 
Get the length of the EPC (convenience method for data.length) More...
 
(NSString *_Nonnull) - toString
 
Convert to a string of hex digits (uppercase) More...
 
(NSString *_Nonnull) - toTagURI
 
Convert to a tag URI string (as defined by the EPC spec) More...
 
(NSString *_Nonnull) - getManufacturerNameIfUnprogrammed
 
Get the manufacturer name if a EPC is unprogrammed. More...
 
(BOOL) - isUnprogrammedEpc
 
Is this EPC unprogrammed? More...
 

Properties

NSData * data
 EPCs data (the bytes)
 

Instance Method Documentation

◆ epcFromBytes:()

+ (UgiEpc * _Nonnull) epcFromBytes: (NSData *_Nonnull)  data


Create a UgiEpc object from a NSData object

Parameters
dataRaw bytes to create object from
Returns
New UgiEpc object

◆ epcFromString:()

+ (UgiEpc * _Nonnull) epcFromString: (NSString *_Nonnull)  s


Create a UgiEpc object from a string of hex digits (uppercase or lowercase)

Parameters
sString to create object from
Returns
New UgiEpc object

◆ bytes()

- (const uint8_t * _Nonnull) bytes


Get a pointer to the EPC's bytes (convenience method for data.bytes)

Returns
EPC's bytes

◆ length()

- (int) length


Get the length of the EPC (convenience method for data.length)

Returns
EPC's length

◆ toString()

- (NSString * _Nonnull) toString


Convert to a string of hex digits (uppercase)

Returns
String of hex digits representing the EPC code

◆ toTagURI()

- (NSString * _Nonnull) toTagURI


Convert to a tag URI string (as defined by the EPC spec)

Returns
Tag URI string

◆ getManufacturerNameIfUnprogrammed()

- (NSString * _Nonnull) getManufacturerNameIfUnprogrammed


Get the manufacturer name if a EPC is unprogrammed.

This is a hueristic function, based on a variety of tags tested

Returns
Manufacturer name

◆ isUnprogrammedEpc()

- (BOOL) isUnprogrammedEpc


Is this EPC unprogrammed?

Returns
YES if unprogrammed

◆ epcFromUGrokItEpc()

+ (UgiEpc * _Nonnull) epcFromUGrokItEpc


Create a new EPC for use with a U Grok It tag

Returns
Created EPC