Detailed Description
IDBlue should not be instantiated. It only contains static methods
Member Function Documentation
+ (BOOL) compareArrays: |
|
(byte*) |
array1 |
withLen1: |
|
(int) |
len1 |
withArray2: |
|
(byte*) |
array2 |
withLen2: |
|
(int) |
len2 |
|
|
| |
Check if the 2 byte arrays contain the same data.
- Parameters:
-
- Returns:
- TRUE if the arrays are the same length and contains the same data (or are both nil). Otherwise, returns FALSE.
+ (byte) computeChecksum: |
|
(byte*) |
data |
withCount: |
|
(int) |
count |
|
|
| |
Compute the checksum of count bytes in the given array (starting at index 0). The checksum is computed by XOR'ing all the bytes.
- Parameters:
-
data | The byte array to compute the checksum for |
count | The number of bytes to be included in the checksum |
- Returns:
- The XOR of all the bytes (i.e. the checksum)
Gets command status name from the given command status identifier.
- Parameters:
-
status | the command status identifier of the command status to get the name of |
- Returns:
- the name of the command status, if the command status is valid, otherwise the hex value of the specified command status identifier.
Get command name from the given command identifier
- Parameters:
-
cmd | The command identifier of the command to get the name of |
- Returns:
- the name of the command, if the command is valid, otherwise the hex value of the specified command identifier.
Get the connected mode name from the given ConnectedMode enumeration value
- Parameters:
-
mode | The ConnectedMode to get the name of |
- Returns:
- The name of the ConnectedMode
Get the disconnected mode name from the given DisconnectedMode enumeration value
- Parameters:
-
mode | The DisconnectedMode to get the name of |
- Returns:
- The name of the DisconnectedMode
Get property name from the given property identifier
- Parameters:
-
property | The property identifier of the property to get the name of |
- Returns:
- the name of the property, if the property is valid, otherwise the hex value of the specified property identifier.
Get whether logging is enabled in the IDBLUE iOS SDK
Enable or disable logging inside the IDBLUE iOS SDK
- Parameters:
-
enabled | Whether logging is to be enabled or disabled |
+ (NSString *) getHexString: |
|
(byte*) |
data |
withDataLen: |
|
(int) |
dataLen |
|
|
| |
Convert an array of bytes into hex values in string format
- Parameters:
-
data | the array of bytes to be converted |
dataLen | the number of bytes to convert |
- Returns:
- an NSString object containing the hex values of all the bytes, separated by spaces. Returns nil if data is nil or dataLen <= 0
+ (NSString *) getHexStringReversed: |
|
(byte*) |
data |
withDataLen: |
|
(int) |
dataLen |
|
|
| |
Convert an array of bytes into a tag id string. The byte array is traversed in reverse order, and each byte is converted to a 2 character hex string and appended to the end of the tag id string.
- Parameters:
-
data | The byte array to convert to a tag id. |
dataLen | The number of bytes to convert |
- Returns:
- An NSString object containing the tag id if data is not nil and dataLen > 0, otherwise nil is returned.
+ (NSString *) getHexStringReversed: |
|
(byte*) |
data |
withDataLen: |
|
(int) |
dataLen |
withIndex: |
|
(int) |
index |
withCount: |
|
(int) |
count |
|
|
| |
Convert a partial array of bytes into a tag id string. The byte array is traversed in reverse order, and each byte is converted to a 2 character hex string and appended to the end of the tag id string.
- Parameters:
-
data | The byte array to convert to a tag id |
dataLen | The number of bytes stored in the byte array |
index | The index in the byte array to start copying from |
count | The number of characters to convert |
- Returns:
- An NSString object containing the tag id if data is not nil, dataLen > 0, and index / count form a sub array that is completely contained in the given array, otherwise nil is returned.
+ (NSString *) getStringFromAscii: |
|
(byte*) |
data |
withLen: |
|
(int) |
len |
|
|
| |
Convert a byte array of ascii characters into an NSString object
- Parameters:
-
data | the byte array to copy from |
len | the number of bytes to copy |
- Returns:
- An NSString object containing the specified ascii characters if data is not nil and len > 0. Otherwise, nil is returned.
+ (int) getTagIdBytes: |
|
(NSString*) |
tagId |
withDest: |
|
(byte*) |
dest |
withLen: |
|
(int) |
len |
|
|
| |
Convert a tag id string into a byte array.
- Parameters:
-
tagId | the tag id string to convert to a byte array. It should be of even length and every 2 characters represents a single byte of data in hex. |
dest | the byte array that will receive the converted data. |
len | the length of the byte array |
- Returns:
- the number of bytes copied
+ (void) getWord: |
|
(ushort) |
word |
withHigh: |
|
(byte*) |
high |
withLow: |
|
(byte*) |
low |
|
|
| |
The reverse of makeWord. Get the high byte and low byte from the given word, and copy them into the specified locations.
- Parameters:
-
word | the word to get |
high | location of the high byte |
low | location of the low byte |
Determines if the given string contains all numeric values
- Parameters:
-
s | The string to check for numeric |
- Returns:
- TRUE if the given string has all numeric characters, FALSE otherwise. If the string is nil or empty, FALSE is returned.
Determine if the given command header is a valid IDBLUE command header (i.e. it is contained in the CommandIdentifier enumeration).
- Parameters:
-
cmd | the byte header to check |
- Returns:
- TRUE if the given header is a valid IDBLUE command, FALSE otherwise.
Converts a high byte and a low byte into a word (ushort).
- Parameters:
-
highAndLow | byte array containing 2 bytes (high and low) |
- Returns:
- The ushort value formed by left shifting the high byte 8 bits to the left, then oring the low byte.
+ (ushort) makeWord: |
|
(byte) |
high |
withLow: |
|
(byte) |
low |
|
|
| |
Converts a high byte and a low byte into a word (ushort).
- Parameters:
-
high | the high byte |
low | the low byte |
- Returns:
- The ushort value formed by left shifting the high byte 8 bits to the left, then oring the low byte.
+ (int) toAsciiByteArray: |
|
(NSString*) |
s |
withData: |
|
(byte*) |
data |
withMaxLen: |
|
(int) |
maxLen |
|
|
| |
Convert an NSString object into an array of (ascii character) bytes.
- Parameters:
-
s | the string to be converted |
data | pointer to the byte array to receive the ascii bytes |
maxLen | the maximum number of bytes that can be put into the buffer (i.e. the length of the byte array). |
- Returns:
- the number of ascii characters copied into the byte array.
The documentation for this class was generated from the following files: