FMIceLinkBinary Class Reference

Inherits from NSObject
Declared in FMIceLinkBinary.h
FMIceLinkBinary.m

Overview

Common binary methods.

+ deinterleaveTransformWithInputFrame:outputFrame:width:height:stride:rotation:

Deinterleave and transform (rotate) a byte array containing two planes
+ (void)deinterleaveTransformWithInputFrame:(NSMutableData *)inputFrame outputFrame:(NSMutableData *)outputFrame width:(int)width height:(int)height stride:(int)stride rotation:(int)rotation

Parameters

inputFrame

The inputFrame.

outputFrame

The outputFrame.

width

The width.

height

The height.

stride

The stride.

rotation

Values 0, 90, 180, 270.

Discussion

Deinterleave and transform (rotate) a byte array containing two planes

Declared In

FMIceLinkBinary.h

+ deinterleaveTransformWithInputFrame:outputFrame:width:height:stride:rotation:start:

Deinterleave and transform (rotate) a byte array containing two planes
+ (void)deinterleaveTransformWithInputFrame:(NSMutableData *)inputFrame outputFrame:(NSMutableData *)outputFrame width:(int)width height:(int)height stride:(int)stride rotation:(int)rotation start:(int)start

Parameters

inputFrame

The inputFrame.

outputFrame

The outputFrame.

width

The width.

height

The height.

stride

The stride.

rotation

Values 0, 90, 180, 270.

start

The start.

Discussion

Deinterleave and transform (rotate) a byte array containing two planes

Declared In

FMIceLinkBinary.h

+ deinterleaveTransformWithInputFrame:outputFrame:width:height:stride:rotation:start:reversePlanes:

Deinterleave and transform (rotate) a byte array containing two planes
+ (void)deinterleaveTransformWithInputFrame:(NSMutableData *)inputFrame outputFrame:(NSMutableData *)outputFrame width:(int)width height:(int)height stride:(int)stride rotation:(int)rotation start:(int)start reversePlanes:(bool)reversePlanes

Parameters

inputFrame

The inputFrame.

outputFrame

The outputFrame.

width

The width.

height

The height.

stride

The stride.

rotation

Values 0, 90, 180, 270.

start

The start.

reversePlanes

Reverse output plane order.

Discussion

Deinterleave and transform (rotate) a byte array containing two planes

Declared In

FMIceLinkBinary.h

+ deinterleaveWithInputFrame:outputFrame:

Deinterleaves a byte array i.e. XYXYXYXY -> XXXXYYYY
+ (void)deinterleaveWithInputFrame:(NSMutableData *)inputFrame outputFrame:(NSMutableData *)outputFrame

Parameters

inputFrame

The inputFrame.

outputFrame

The outputFrame.

Discussion

Deinterleaves a byte array i.e. XYXYXYXY -> XXXXYYYY

Declared In

FMIceLinkBinary.h

+ deinterleaveWithInputFrame:outputFrame:start:length:

Deinterleaves a byte array i.e. XYXYXYXY -> XXXXYYYY
+ (void)deinterleaveWithInputFrame:(NSMutableData *)inputFrame outputFrame:(NSMutableData *)outputFrame start:(int)start length:(int)length

Parameters

inputFrame

The inputFrame.

outputFrame

The outputFrame.

start

The start.

length

The length.

Discussion

Deinterleaves a byte array i.e. XYXYXYXY -> XXXXYYYY

Declared In

FMIceLinkBinary.h

+ deinterleaveWithInputFrame:outputFrame:start:length:reversePlanes:

Deinterleaves a byte array
+ (void)deinterleaveWithInputFrame:(NSMutableData *)inputFrame outputFrame:(NSMutableData *)outputFrame start:(int)start length:(int)length reversePlanes:(bool)reversePlanes

Parameters

inputFrame

The inputFrame.

outputFrame

The outputFrame.

start

The start.

length

The length.

reversePlanes

The reversePlanes.

Discussion

Deinterleaves a byte array

Declared In

FMIceLinkBinary.h

+ fromBytes12WithInput:inputIndex:bitOffset:littleEndian:

Reads a 12-bit value from a byte array.
+ (int)fromBytes12WithInput:(NSMutableData *)input inputIndex:(int)inputIndex bitOffset:(int)bitOffset littleEndian:(bool)littleEndian

Parameters

input

The input byte array.

inputIndex

The index to start reading.

bitOffset

The offset of the value within the byte.

littleEndian

Whether to use little-endian format

Return Value

The value.

Discussion

Reads a 12-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ fromBytes13WithInput:inputIndex:bitOffset:littleEndian:

Reads a 13-bit value from a byte array.
+ (int)fromBytes13WithInput:(NSMutableData *)input inputIndex:(int)inputIndex bitOffset:(int)bitOffset littleEndian:(bool)littleEndian

Parameters

input

The input byte array.

inputIndex

The index to start reading.

bitOffset

The offset of the value within the byte.

littleEndian

Whether to use little-endian format

Return Value

The value.

Discussion

Reads a 13-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ fromBytes15WithInput:inputIndex:bitOffset:littleEndian:

Reads a 15-bit value from a byte array.
+ (int)fromBytes15WithInput:(NSMutableData *)input inputIndex:(int)inputIndex bitOffset:(int)bitOffset littleEndian:(bool)littleEndian

Parameters

input

The input byte array.

inputIndex

The index to start reading.

bitOffset

The offset of the value within the byte.

littleEndian

Whether to use little-endian format

Return Value

The value.

Discussion

Reads a 15-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ fromBytes16WithInput:inputIndex:littleEndian:

Reads a 16-bit value from a byte array.
+ (int)fromBytes16WithInput:(NSMutableData *)input inputIndex:(int)inputIndex littleEndian:(bool)littleEndian

Parameters

input

The input byte array.

inputIndex

The index to start reading.

littleEndian

Whether to use little-endian format.

Return Value

The value.

Discussion

Reads a 16-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ fromBytes18WithInput:inputIndex:bitOffset:littleEndian:

Reads an 18-bit value from a byte array.
+ (int)fromBytes18WithInput:(NSMutableData *)input inputIndex:(int)inputIndex bitOffset:(int)bitOffset littleEndian:(bool)littleEndian

Parameters

input

The input byte array.

inputIndex

The index to start reading.

bitOffset

The offset of the value within the byte.

littleEndian

Whether to use little-endian format.

Return Value

The value.

Discussion

Reads an 18-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ fromBytes1WithInput:inputIndex:bitOffset:

Reads a 1-bit value from a byte array.
+ (bool)fromBytes1WithInput:(NSMutableData *)input inputIndex:(int)inputIndex bitOffset:(int)bitOffset

Parameters

input

The input byte array.

inputIndex

The index to start reading.

bitOffset

The offset of the value within the byte.

Return Value

The value.

Discussion

Reads a 1-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ fromBytes24WithInput:inputIndex:littleEndian:

Reads a 24-bit value from a byte array.
+ (int)fromBytes24WithInput:(NSMutableData *)input inputIndex:(int)inputIndex littleEndian:(bool)littleEndian

Parameters

input

The input byte array.

inputIndex

The index to start reading.

littleEndian

Whether to use little-endian format.

Return Value

The value.

Discussion

Reads a 24-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ fromBytes2WithInput:inputIndex:bitOffset:

Reads a 2-bit value from a byte array.
+ (int)fromBytes2WithInput:(NSMutableData *)input inputIndex:(int)inputIndex bitOffset:(int)bitOffset

Parameters

input

The input byte array.

inputIndex

The index to start reading.

bitOffset

The offset of the value within the byte.

Return Value

The value.

Discussion

Reads a 2-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ fromBytes32WithInput:inputIndex:littleEndian:

Reads a 32-bit value from a byte array.
+ (long long)fromBytes32WithInput:(NSMutableData *)input inputIndex:(int)inputIndex littleEndian:(bool)littleEndian

Parameters

input

The input byte array.

inputIndex

The index to start reading.

littleEndian

Whether to use little-endian format.

Return Value

The value.

Discussion

Reads a 32-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ fromBytes3WithInput:inputIndex:bitOffset:

Reads a 3-bit value from a byte array.
+ (int)fromBytes3WithInput:(NSMutableData *)input inputIndex:(int)inputIndex bitOffset:(int)bitOffset

Parameters

input

The input byte array.

inputIndex

The index to start reading.

bitOffset

The offset of the value within the byte.

Return Value

The value.

Discussion

Reads a 3-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ fromBytes40WithInput:inputIndex:littleEndian:

Reads a 40-bit value from a byte array.
+ (long long)fromBytes40WithInput:(NSMutableData *)input inputIndex:(int)inputIndex littleEndian:(bool)littleEndian

Parameters

input

The input byte array.

inputIndex

The index to start reading.

littleEndian

Whether to use little-endian format.

Return Value

The value.

Discussion

Reads a 40-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ fromBytes48WithInput:inputIndex:littleEndian:

Reads a 48-bit value from a byte array.
+ (long long)fromBytes48WithInput:(NSMutableData *)input inputIndex:(int)inputIndex littleEndian:(bool)littleEndian

Parameters

input

The input byte array.

inputIndex

The index to start reading.

littleEndian

Whether to use little-endian format.

Return Value

The value.

Discussion

Reads a 48-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ fromBytes4WithInput:inputIndex:bitOffset:

Reads a 4-bit value from a byte array.
+ (int)fromBytes4WithInput:(NSMutableData *)input inputIndex:(int)inputIndex bitOffset:(int)bitOffset

Parameters

input

The input byte array.

inputIndex

The index to start reading.

bitOffset

The offset of the value within the byte.

Return Value

The value.

Discussion

Reads a 4-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ fromBytes56WithInput:inputIndex:littleEndian:

Reads a 56-bit value from a byte array.
+ (long long)fromBytes56WithInput:(NSMutableData *)input inputIndex:(int)inputIndex littleEndian:(bool)littleEndian

Parameters

input

The input byte array.

inputIndex

The index to start reading.

littleEndian

Whether to use little-endian format.

Return Value

The value.

Discussion

Reads a 56-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ fromBytes5WithInput:inputIndex:bitOffset:

Reads a 5-bit value from a byte array.
+ (int)fromBytes5WithInput:(NSMutableData *)input inputIndex:(int)inputIndex bitOffset:(int)bitOffset

Parameters

input

The input byte array.

inputIndex

The index to start reading.

bitOffset

The offset of the value within the byte.

Return Value

The value.

Discussion

Reads a 5-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ fromBytes64WithInput:inputIndex:littleEndian:

Reads a 64-bit value from a byte array.
+ (long long)fromBytes64WithInput:(NSMutableData *)input inputIndex:(int)inputIndex littleEndian:(bool)littleEndian

Parameters

input

The input byte array.

inputIndex

The index to start reading.

littleEndian

Whether to use little-endian format.

Return Value

The value.

Discussion

Reads a 64-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ fromBytes6WithInput:inputIndex:bitOffset:

Reads a 6-bit value from a byte array.
+ (int)fromBytes6WithInput:(NSMutableData *)input inputIndex:(int)inputIndex bitOffset:(int)bitOffset

Parameters

input

The input byte array.

inputIndex

The index to start reading.

bitOffset

The offset of the value within the byte.

Return Value

The value.

Discussion

Reads a 6-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ fromBytes7WithInput:inputIndex:bitOffset:

Reads a 7-bit value from a byte array.
+ (int)fromBytes7WithInput:(NSMutableData *)input inputIndex:(int)inputIndex bitOffset:(int)bitOffset

Parameters

input

The input byte array.

inputIndex

The index to start reading.

bitOffset

The offset of the value within the byte.

Return Value

The value.

Discussion

Reads a 7-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ fromBytes8WithInput:inputIndex:

Reads an 8-bit value from a byte array.
+ (int)fromBytes8WithInput:(NSMutableData *)input inputIndex:(int)inputIndex

Parameters

input

The input byte array.

inputIndex

The index to start reading.

Return Value

The value.

Discussion

Reads an 8-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ interleaveTransformWithInputFrame:outputFrame:width:height:stride:rotation:

Interleave and transform (rotate) a byte array containing two planes
+ (void)interleaveTransformWithInputFrame:(NSMutableData *)inputFrame outputFrame:(NSMutableData *)outputFrame width:(int)width height:(int)height stride:(int)stride rotation:(int)rotation

Parameters

inputFrame

The inputFrame.

outputFrame

The outputFrame.

width

The width.

height

The height.

stride

The stride.

rotation

Values 0, 90, 180, 270.

Discussion

Interleave and transform (rotate) a byte array containing two planes

Declared In

FMIceLinkBinary.h

+ interleaveTransformWithInputFrame:outputFrame:width:height:stride:rotation:start:

Interleave and transform (rotate) a byte array containing two planes
+ (void)interleaveTransformWithInputFrame:(NSMutableData *)inputFrame outputFrame:(NSMutableData *)outputFrame width:(int)width height:(int)height stride:(int)stride rotation:(int)rotation start:(int)start

Parameters

inputFrame

The inputFrame.

outputFrame

The outputFrame.

width

The width.

height

The height.

stride

The stride.

rotation

Values 0, 90, 180, 270.

start

The start.

Discussion

Interleave and transform (rotate) a byte array containing two planes

Declared In

FMIceLinkBinary.h

+ interleaveTransformWithInputFrame:outputFrame:width:height:stride:rotation:start:reversePlanes:

Interleave and transform (rotate) a byte array containing two planes
+ (void)interleaveTransformWithInputFrame:(NSMutableData *)inputFrame outputFrame:(NSMutableData *)outputFrame width:(int)width height:(int)height stride:(int)stride rotation:(int)rotation start:(int)start reversePlanes:(bool)reversePlanes

Parameters

inputFrame

The inputFrame.

outputFrame

The outputFrame.

width

The width.

height

The height.

stride

The stride.

rotation

Values 0, 90, 180, 270.

start

The start.

reversePlanes

Reverse output plane order.

Discussion

Interleave and transform (rotate) a byte array containing two planes

Declared In

FMIceLinkBinary.h

+ interleaveWithInputFrame:outputFrame:

Interleaves a byte array i.e. XXXXYYYY -> XYXYXYXY
+ (void)interleaveWithInputFrame:(NSMutableData *)inputFrame outputFrame:(NSMutableData *)outputFrame

Parameters

inputFrame

The inputFrame.

outputFrame

The outputFrame.

Discussion

Interleaves a byte array i.e. XXXXYYYY -> XYXYXYXY

Declared In

FMIceLinkBinary.h

+ interleaveWithInputFrame:outputFrame:start:length:

Interleaves a byte array i.e. XXXXYYYY -> XYXYXYXY
+ (void)interleaveWithInputFrame:(NSMutableData *)inputFrame outputFrame:(NSMutableData *)outputFrame start:(int)start length:(int)length

Parameters

inputFrame

The inputFrame.

outputFrame

The outputFrame.

start

The start.

length

The length.

Discussion

Interleaves a byte array i.e. XXXXYYYY -> XYXYXYXY

Declared In

FMIceLinkBinary.h

+ interleaveWithInputFrame:outputFrame:start:length:reversePlanes:

Interleaves a byte array i.e. XXXXYYYY -> XYXYXYXY
+ (void)interleaveWithInputFrame:(NSMutableData *)inputFrame outputFrame:(NSMutableData *)outputFrame start:(int)start length:(int)length reversePlanes:(bool)reversePlanes

Parameters

inputFrame

The inputFrame.

outputFrame

The outputFrame.

start

The start.

length

The length.

reversePlanes

XXXXYYYY -> YXYXYXYX

Discussion

Interleaves a byte array i.e. XXXXYYYY -> XYXYXYXY

Declared In

FMIceLinkBinary.h

+ toBytes1:bitOffset:

Converts a 1-bit value to a byte array.
+ (NSMutableData *)toBytes1:(bool)value bitOffset:(int)bitOffset

Parameters

value

The value to write.

bitOffset

The offset of the value within the byte.

Return Value

The output byte array.

Discussion

Converts a 1-bit value to a byte array.

Declared In

FMIceLinkBinary.h

+ toBytes1:bitOffset:output:outputIndex:

Writes a 1-bit value to a byte array.
+ (NSMutableData *)toBytes1:(bool)value bitOffset:(int)bitOffset output:(NSMutableData *)output outputIndex:(int)outputIndex

Parameters

value

The value to write.

bitOffset

The offset of the value within the byte.

output

The output byte array.

outputIndex

The index to start writing.

Return Value

The output byte array.

Discussion

Writes a 1-bit value to a byte array.

Declared In

FMIceLinkBinary.h

+ toBytes13:bitOffset:littleEndian:

Converts a 13-bit value to a byte array.
+ (NSMutableData *)toBytes13:(int)value bitOffset:(int)bitOffset littleEndian:(bool)littleEndian

Parameters

value

The value to write.

bitOffset

The offset of the value within the byte.

littleEndian

Whether to use little-endian format.

Return Value

The output byte array.

Discussion

Converts a 13-bit value to a byte array.

Declared In

FMIceLinkBinary.h

+ toBytes13:bitOffset:littleEndian:output:outputIndex:

Writes a 13-bit value to a byte array.
+ (NSMutableData *)toBytes13:(int)value bitOffset:(int)bitOffset littleEndian:(bool)littleEndian output:(NSMutableData *)output outputIndex:(int)outputIndex

Parameters

value

The value to write.

bitOffset

The offset of the value within the byte.

littleEndian

Whether to use little-endian format.

output

The output byte array.

outputIndex

The index to start writing.

Return Value

The output byte array.

Discussion

Writes a 13-bit value to a byte array.

Declared In

FMIceLinkBinary.h

+ toBytes16:littleEndian:

Converts a 16-bit value to a byte array.
+ (NSMutableData *)toBytes16:(int)value littleEndian:(bool)littleEndian

Parameters

value

The value to write.

littleEndian

Whether to use little-endian format.

Return Value

The output byte array.

Discussion

Converts a 16-bit value to a byte array.

Declared In

FMIceLinkBinary.h

+ toBytes16:littleEndian:output:outputIndex:

Writes a 16-bit value to a byte array.
+ (NSMutableData *)toBytes16:(int)value littleEndian:(bool)littleEndian output:(NSMutableData *)output outputIndex:(int)outputIndex

Parameters

value

The value to write.

littleEndian

Whether to use little-endian format.

output

The output byte array.

outputIndex

The index to start writing.

Return Value

The output byte array.

Discussion

Writes a 16-bit value to a byte array.

Declared In

FMIceLinkBinary.h

+ toBytes18:bitOffset:littleEndian:output:outputIndex:

Writes an 18-bit value to a byte array.
+ (NSMutableData *)toBytes18:(int)value bitOffset:(int)bitOffset littleEndian:(bool)littleEndian output:(NSMutableData *)output outputIndex:(int)outputIndex

Parameters

value

The value to write.

bitOffset

The offset of the value within the byte.

littleEndian

Whether to use little-endian format.

output

The output byte array.

outputIndex

The index to start writing.

Return Value

The output byte array.

Discussion

Writes an 18-bit value to a byte array.

Declared In

FMIceLinkBinary.h

+ toBytes2:bitOffset:

Converts a 2-bit value to a byte array.
+ (NSMutableData *)toBytes2:(int)value bitOffset:(int)bitOffset

Parameters

value

The value to write.

bitOffset

The offset of the value within the byte.

Return Value

The output byte array.

Discussion

Converts a 2-bit value to a byte array.

Declared In

FMIceLinkBinary.h

+ toBytes2:bitOffset:output:outputIndex:

Writes a 2-bit value to a byte array.
+ (NSMutableData *)toBytes2:(int)value bitOffset:(int)bitOffset output:(NSMutableData *)output outputIndex:(int)outputIndex

Parameters

value

The value to write.

bitOffset

The offset of the value within the byte.

output

The output byte array.

outputIndex

The index to start writing.

Return Value

The output byte array.

Discussion

Writes a 2-bit value to a byte array.

Declared In

FMIceLinkBinary.h

+ toBytes24:littleEndian:

Converts a 24-bit value to a byte array.
+ (NSMutableData *)toBytes24:(int)value littleEndian:(bool)littleEndian

Parameters

value

The value to write.

littleEndian

Whether to use little-endian format.

Return Value

The output byte array.

Discussion

Converts a 24-bit value to a byte array.

Declared In

FMIceLinkBinary.h

+ toBytes24:littleEndian:output:outputIndex:

Writes a 24-bit value to a byte array.
+ (NSMutableData *)toBytes24:(int)value littleEndian:(bool)littleEndian output:(NSMutableData *)output outputIndex:(int)outputIndex

Parameters

value

The value to write.

littleEndian

Whether to use little-endian format.

output

The output byte array.

outputIndex

The index to start writing.

Return Value

The output byte array.

Discussion

Writes a 24-bit value to a byte array.

Declared In

FMIceLinkBinary.h

+ toBytes3:bitOffset:

Converts a 3-bit value to a byte array.
+ (NSMutableData *)toBytes3:(int)value bitOffset:(int)bitOffset

Parameters

value

The value to write.

bitOffset

The offset of the value within the byte.

Return Value

The output byte array.

Discussion

Converts a 3-bit value to a byte array.

Declared In

FMIceLinkBinary.h

+ toBytes3:bitOffset:output:outputIndex:

Writes a 3-bit value to a byte array.
+ (NSMutableData *)toBytes3:(int)value bitOffset:(int)bitOffset output:(NSMutableData *)output outputIndex:(int)outputIndex

Parameters

value

The value to write.

bitOffset

The offset of the value within the byte.

output

The output byte array.

outputIndex

The index to start writing.

Return Value

The output byte array.

Discussion

Writes a 3-bit value to a byte array.

Declared In

FMIceLinkBinary.h

+ toBytes32:littleEndian:

Converts a 32-bit value to a byte array.
+ (NSMutableData *)toBytes32:(long long)value littleEndian:(bool)littleEndian

Parameters

value

The value to write.

littleEndian

Whether to use little-endian format.

Return Value

The output byte array.

Discussion

Converts a 32-bit value to a byte array.

Declared In

FMIceLinkBinary.h

+ toBytes32:littleEndian:output:outputIndex:

Writes a 32-bit value to a byte array.
+ (NSMutableData *)toBytes32:(long long)value littleEndian:(bool)littleEndian output:(NSMutableData *)output outputIndex:(int)outputIndex

Parameters

value

The value to write.

littleEndian

Whether to use little-endian format.

output

The output byte array.

outputIndex

The index to start writing.

Return Value

The output byte array.

Discussion

Writes a 32-bit value to a byte array.

Declared In

FMIceLinkBinary.h

+ toBytes4:bitOffset:

Converts a 4-bit value to a byte array.
+ (NSMutableData *)toBytes4:(int)value bitOffset:(int)bitOffset

Parameters

value

The value to write.

bitOffset

The offset of the value within the byte.

Return Value

The output byte array.

Discussion

Converts a 4-bit value to a byte array.

Declared In

FMIceLinkBinary.h

+ toBytes4:bitOffset:output:outputIndex:

Writes a 4-bit value to a byte array.
+ (NSMutableData *)toBytes4:(int)value bitOffset:(int)bitOffset output:(NSMutableData *)output outputIndex:(int)outputIndex

Parameters

value

The value to write.

bitOffset

The offset of the value within the byte.

output

The output byte array.

outputIndex

The index to start writing.

Return Value

The output byte array.

Discussion

Writes a 4-bit value to a byte array.

Declared In

FMIceLinkBinary.h

+ toBytes40:littleEndian:

Converts a 40-bit value to a byte array.
+ (NSMutableData *)toBytes40:(long long)value littleEndian:(bool)littleEndian

Parameters

value

The value to write.

littleEndian

Whether to use little-endian format.

Return Value

The output byte array.

Discussion

Converts a 40-bit value to a byte array.

Declared In

FMIceLinkBinary.h

+ toBytes40:littleEndian:output:outputIndex:

Writes a 40-bit value to a byte array.
+ (NSMutableData *)toBytes40:(long long)value littleEndian:(bool)littleEndian output:(NSMutableData *)output outputIndex:(int)outputIndex

Parameters

value

The value to write.

littleEndian

Whether to use little-endian format.

output

The output byte array.

outputIndex

The index to start writing.

Return Value

The output byte array.

Discussion

Writes a 40-bit value to a byte array.

Declared In

FMIceLinkBinary.h

+ toBytes48:littleEndian:

Converts a 48-bit value to a byte array.
+ (NSMutableData *)toBytes48:(long long)value littleEndian:(bool)littleEndian

Parameters

value

The value to write.

littleEndian

Whether to use little-endian format.

Return Value

The output byte array.

Discussion

Converts a 48-bit value to a byte array.

Declared In

FMIceLinkBinary.h

+ toBytes48:littleEndian:output:outputIndex:

Writes a 48-bit value to a byte array.
+ (NSMutableData *)toBytes48:(long long)value littleEndian:(bool)littleEndian output:(NSMutableData *)output outputIndex:(int)outputIndex

Parameters

value

The value to write.

littleEndian

Whether to use little-endian format.

output

The output byte array.

outputIndex

The index to start writing.

Return Value

The output byte array.

Discussion

Writes a 48-bit value to a byte array.

Declared In

FMIceLinkBinary.h

+ toBytes5:bitOffset:

Converts a 5-bit value to a byte array.
+ (NSMutableData *)toBytes5:(int)value bitOffset:(int)bitOffset

Parameters

value

The value to write.

bitOffset

The offset of the value within the byte.

Return Value

The output byte array.

Discussion

Converts a 5-bit value to a byte array.

Declared In

FMIceLinkBinary.h

+ toBytes5:bitOffset:output:outputIndex:

Writes a 5-bit value to a byte array.
+ (NSMutableData *)toBytes5:(int)value bitOffset:(int)bitOffset output:(NSMutableData *)output outputIndex:(int)outputIndex

Parameters

value

The value to write.

bitOffset

The offset of the value within the byte.

output

The output byte array.

outputIndex

The index to start writing.

Return Value

The output byte array.

Discussion

Writes a 5-bit value to a byte array.

Declared In

FMIceLinkBinary.h

+ toBytes56:littleEndian:

Converts a 56-bit value to a byte array.
+ (NSMutableData *)toBytes56:(long long)value littleEndian:(bool)littleEndian

Parameters

value

The value to write.

littleEndian

Whether to use little-endian format.

Return Value

The output byte array.

Discussion

Converts a 56-bit value to a byte array.

Declared In

FMIceLinkBinary.h

+ toBytes56:littleEndian:output:outputIndex:

Writes a 56-bit value to a byte array.
+ (NSMutableData *)toBytes56:(long long)value littleEndian:(bool)littleEndian output:(NSMutableData *)output outputIndex:(int)outputIndex

Parameters

value

The value to write.

littleEndian

Whether to use little-endian format.

output

The output byte array.

outputIndex

The index to start writing.

Return Value

The output byte array.

Discussion

Writes a 56-bit value to a byte array.

Declared In

FMIceLinkBinary.h

+ toBytes6:bitOffset:

Converts a 6-bit value to a byte array.
+ (NSMutableData *)toBytes6:(int)value bitOffset:(int)bitOffset

Parameters

value

The value to write.

bitOffset

The offset of the value within the byte.

Return Value

The output byte array.

Discussion

Converts a 6-bit value to a byte array.

Declared In

FMIceLinkBinary.h

+ toBytes6:bitOffset:output:outputIndex:

Writes a 6-bit value to a byte array.
+ (NSMutableData *)toBytes6:(int)value bitOffset:(int)bitOffset output:(NSMutableData *)output outputIndex:(int)outputIndex

Parameters

value

The value to write.

bitOffset

The offset of the value within the byte.

output

The output byte array.

outputIndex

The index to start writing.

Return Value

The output byte array.

Discussion

Writes a 6-bit value to a byte array.

Declared In

FMIceLinkBinary.h

+ toBytes64:littleEndian:

Converts a 64-bit value to a byte array.
+ (NSMutableData *)toBytes64:(long long)value littleEndian:(bool)littleEndian

Parameters

value

The value to write.

littleEndian

Whether to use little-endian format.

Return Value

The output byte array.

Discussion

Converts a 64-bit value to a byte array.

Declared In

FMIceLinkBinary.h

+ toBytes64:littleEndian:output:outputIndex:

Writes a 64-bit value to a byte array.
+ (NSMutableData *)toBytes64:(long long)value littleEndian:(bool)littleEndian output:(NSMutableData *)output outputIndex:(int)outputIndex

Parameters

value

The value to write.

littleEndian

Whether to use little-endian format.

output

The output byte array.

outputIndex

The index to start writing.

Return Value

The output byte array.

Discussion

Writes a 64-bit value to a byte array.

Declared In

FMIceLinkBinary.h

+ toBytes7:bitOffset:

Converts a 7-bit value to a byte array.
+ (NSMutableData *)toBytes7:(int)value bitOffset:(int)bitOffset

Parameters

value

The value to write.

bitOffset

The offset of the value within the byte.

Return Value

The output byte array.

Discussion

Converts a 7-bit value to a byte array.

Declared In

FMIceLinkBinary.h

+ toBytes7:bitOffset:output:outputIndex:

Writes a 7-bit value to a byte array.
+ (NSMutableData *)toBytes7:(int)value bitOffset:(int)bitOffset output:(NSMutableData *)output outputIndex:(int)outputIndex

Parameters

value

The value to write.

bitOffset

The offset of the value within the byte.

output

The output byte array.

outputIndex

The index to start writing.

Return Value

The output byte array.

Discussion

Writes a 7-bit value to a byte array.

Declared In

FMIceLinkBinary.h

+ toBytes8:

Converts an 8-bit value to a byte array.
+ (NSMutableData *)toBytes8:(int)value

Parameters

value

The value to write.

Return Value

The output byte array.

Discussion

Converts an 8-bit value to a byte array.

Declared In

FMIceLinkBinary.h

+ toBytes8:output:outputIndex:

Writes an 8-bit value to a byte array.
+ (NSMutableData *)toBytes8:(int)value output:(NSMutableData *)output outputIndex:(int)outputIndex

Parameters

value

The value to write.

output

The output byte array.

outputIndex

The index to start writing.

Return Value

The output byte array.

Discussion

Writes an 8-bit value to a byte array.

Declared In

FMIceLinkBinary.h

+ transformWithInputFrame:outputFrame:width:height:stride:rotation:

Transforms a byte containing a 2D plane (rotates 90, 180, 270)
+ (void)transformWithInputFrame:(NSMutableData *)inputFrame outputFrame:(NSMutableData *)outputFrame width:(int)width height:(int)height stride:(int)stride rotation:(int)rotation

Parameters

inputFrame

The inputFrame.

outputFrame

The outputFrame.

width

The width.

height

The height.

stride

The stride.

rotation

The rotation.

Discussion

Transforms a byte containing a 2D plane (rotates 90, 180, 270)

Declared In

FMIceLinkBinary.h

+ transformWithInputFrame:outputFrame:width:height:stride:rotation:inputStart:outputStart:

Transforms a byte containing a 2D plane (rotates 90, 180, 270)
+ (void)transformWithInputFrame:(NSMutableData *)inputFrame outputFrame:(NSMutableData *)outputFrame width:(int)width height:(int)height stride:(int)stride rotation:(int)rotation inputStart:(int)inputStart outputStart:(int)outputStart

Parameters

inputFrame

The inputFrame.

outputFrame

The outputFrame.

width

The width.

height

The height.

stride

The stride.

rotation

The rotation.

inputStart

The inputStart.

outputStart

The outputStart.

Discussion

Transforms a byte containing a 2D plane (rotates 90, 180, 270)

Declared In

FMIceLinkBinary.h

+ transformWithInputFrame:outputFrame:width:height:stride:rotation:inputStart:outputStart:chunkLength:

Transforms a byte containing a 2D plane (rotates 90, 180, 270). When transforming interleaved planes. Set the chunkLength to the number of planes.
+ (void)transformWithInputFrame:(NSMutableData *)inputFrame outputFrame:(NSMutableData *)outputFrame width:(int)width height:(int)height stride:(int)stride rotation:(int)rotation inputStart:(int)inputStart outputStart:(int)outputStart chunkLength:(int)chunkLength

Parameters

inputFrame

The inputFrame.

outputFrame

The outputFrame.

width

The width.

height

The height.

stride

The stride.

rotation

The rotation.

inputStart

The inputStart.

outputStart

The outputStart.

chunkLength

The chunkLength.

Discussion

Transforms a byte containing a 2D plane (rotates 90, 180, 270). When transforming interleaved planes. Set the chunkLength to the number of planes.

Declared In

FMIceLinkBinary.h

+ transformWithInputFrame:outputFrame:width:height:stride:rotation:start:

Transforms a byte containing a 2D plane (rotates 90, 180, 270)
+ (void)transformWithInputFrame:(NSMutableData *)inputFrame outputFrame:(NSMutableData *)outputFrame width:(int)width height:(int)height stride:(int)stride rotation:(int)rotation start:(int)start

Parameters

inputFrame

The inputFrame.

outputFrame

The outputFrame.

width

The width.

height

The height.

stride

The stride.

rotation

The rotation.

start

Start position for both input and output frame

Discussion

Transforms a byte containing a 2D plane (rotates 90, 180, 270)

Declared In

FMIceLinkBinary.h

+ tryFromBytes12WithInput:inputIndex:bitOffset:littleEndian:value:

Tries to read a 12-bit value from a byte array.
+ (bool)tryFromBytes12WithInput:(NSMutableData *)input inputIndex:(int)inputIndex bitOffset:(int)bitOffset littleEndian:(bool)littleEndian value:(int *)value

Parameters

input

The input byte array.

inputIndex

The index to start reading.

bitOffset

The offset of the value within the byte.

littleEndian

Whether to use little-endian format

value

The value.

Return Value

true if the index is valid and the value was read; otherwise, false

Discussion

Tries to read a 12-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ tryFromBytes13WithInput:inputIndex:bitOffset:littleEndian:value:

Tries to read a 13-bit value from a byte array.
+ (bool)tryFromBytes13WithInput:(NSMutableData *)input inputIndex:(int)inputIndex bitOffset:(int)bitOffset littleEndian:(bool)littleEndian value:(int *)value

Parameters

input

The input byte array.

inputIndex

The index to start reading.

bitOffset

The offset of the value within the byte.

littleEndian

Whether to use little-endian format

value

The value.

Return Value

true if the index is valid and the value was read; otherwise, false

Discussion

Tries to read a 13-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ tryFromBytes15WithInput:inputIndex:bitOffset:littleEndian:value:

Tries to read a 15-bit value from a byte array.
+ (bool)tryFromBytes15WithInput:(NSMutableData *)input inputIndex:(int)inputIndex bitOffset:(int)bitOffset littleEndian:(bool)littleEndian value:(int *)value

Parameters

input

The input byte array.

inputIndex

The index to start reading.

bitOffset

The offset of the value within the byte.

littleEndian

Whether to use little-endian format.

value

The value.

Return Value

true if the index is valid and the value was read; otherwise, false

Discussion

Tries to read a 15-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ tryFromBytes16WithInput:inputIndex:littleEndian:value:

Tries to read a 16-bit value from a byte array.
+ (bool)tryFromBytes16WithInput:(NSMutableData *)input inputIndex:(int)inputIndex littleEndian:(bool)littleEndian value:(int *)value

Parameters

input

The input byte array.

inputIndex

The index to start reading.

littleEndian

Whether to use little-endian format.

value

The value.

Return Value

true if the index is valid and the value was read; otherwise, false

Discussion

Tries to read a 16-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ tryFromBytes18WithInput:inputIndex:bitOffset:littleEndian:value:

Tries to read a 18-bit value from a byte array.
+ (bool)tryFromBytes18WithInput:(NSMutableData *)input inputIndex:(int)inputIndex bitOffset:(int)bitOffset littleEndian:(bool)littleEndian value:(int *)value

Parameters

input

The input byte array.

inputIndex

The index to start reading.

bitOffset

The offset of the value within the byte.

littleEndian

Whether to use little-endian format.

value

The value.

Return Value

true if the index is valid and the value was read; otherwise, false

Discussion

Tries to read a 18-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ tryFromBytes1WithInput:inputIndex:bitOffset:value:

Tries to read a 1-bit value from a byte array.
+ (bool)tryFromBytes1WithInput:(NSMutableData *)input inputIndex:(int)inputIndex bitOffset:(int)bitOffset value:(bool *)value

Parameters

input

The input byte array.

inputIndex

The index to start reading.

bitOffset

The offset of the value within the byte.

value

The value.

Return Value

true if the index is valid and the value was read; otherwise, false

Discussion

Tries to read a 1-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ tryFromBytes24WithInput:inputIndex:littleEndian:value:

Tries to read a 24-bit value from a byte array.
+ (bool)tryFromBytes24WithInput:(NSMutableData *)input inputIndex:(int)inputIndex littleEndian:(bool)littleEndian value:(int *)value

Parameters

input

The input byte array.

inputIndex

The index to start reading.

littleEndian

Whether to use little-endian format.

value

The value.

Return Value

true if the index is valid and the value was read; otherwise, false

Discussion

Tries to read a 24-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ tryFromBytes2WithInput:inputIndex:bitOffset:value:

Tries to read a 2-bit value from a byte array.
+ (bool)tryFromBytes2WithInput:(NSMutableData *)input inputIndex:(int)inputIndex bitOffset:(int)bitOffset value:(int *)value

Parameters

input

The input byte array.

inputIndex

The index to start reading.

bitOffset

The offset of the value within the byte.

value

The value.

Return Value

true if the index is valid and the value was read; otherwise, false

Discussion

Tries to read a 2-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ tryFromBytes32WithInput:inputIndex:littleEndian:value:

Tries to read a 32-bit value from a byte array.
+ (bool)tryFromBytes32WithInput:(NSMutableData *)input inputIndex:(int)inputIndex littleEndian:(bool)littleEndian value:(long long *)value

Parameters

input

The input byte array.

inputIndex

The index to start reading.

littleEndian

Whether to use little-endian format.

value

The value.

Return Value

true if the index is valid and the value was read; otherwise, false

Discussion

Tries to read a 32-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ tryFromBytes3WithInput:inputIndex:bitOffset:value:

Tries to read a 3-bit value from a byte array.
+ (bool)tryFromBytes3WithInput:(NSMutableData *)input inputIndex:(int)inputIndex bitOffset:(int)bitOffset value:(int *)value

Parameters

input

The input byte array.

inputIndex

The index to start reading.

bitOffset

The offset of the value within the byte.

value

The value.

Return Value

true if the index is valid and the value was read; otherwise, false

Discussion

Tries to read a 3-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ tryFromBytes40WithInput:inputIndex:littleEndian:value:

Tries to read a 40-bit value from a byte array.
+ (bool)tryFromBytes40WithInput:(NSMutableData *)input inputIndex:(int)inputIndex littleEndian:(bool)littleEndian value:(long long *)value

Parameters

input

The input byte array.

inputIndex

The index to start reading.

littleEndian

Whether to use little-endian format.

value

The value.

Return Value

true if the index is valid and the value was read; otherwise, false

Discussion

Tries to read a 40-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ tryFromBytes48WithInput:inputIndex:littleEndian:value:

Tries to read a 48-bit value from a byte array.
+ (bool)tryFromBytes48WithInput:(NSMutableData *)input inputIndex:(int)inputIndex littleEndian:(bool)littleEndian value:(long long *)value

Parameters

input

The input byte array.

inputIndex

The index to start reading.

littleEndian

Whether to use little-endian format.

value

The value.

Return Value

true if the index is valid and the value was read; otherwise, false

Discussion

Tries to read a 48-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ tryFromBytes4WithInput:inputIndex:bitOffset:value:

Tries to read a 4-bit value from a byte array.
+ (bool)tryFromBytes4WithInput:(NSMutableData *)input inputIndex:(int)inputIndex bitOffset:(int)bitOffset value:(int *)value

Parameters

input

The input byte array.

inputIndex

The index to start reading.

bitOffset

The offset of the value within the byte.

value

The value.

Return Value

true if the index is valid and the value was read; otherwise, false

Discussion

Tries to read a 4-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ tryFromBytes56WithInput:inputIndex:littleEndian:value:

Tries to read a 56-bit value from a byte array.
+ (bool)tryFromBytes56WithInput:(NSMutableData *)input inputIndex:(int)inputIndex littleEndian:(bool)littleEndian value:(long long *)value

Parameters

input

The input byte array.

inputIndex

The index to start reading.

littleEndian

Whether to use little-endian format.

value

The value.

Return Value

true if the index is valid and the value was read; otherwise, false

Discussion

Tries to read a 56-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ tryFromBytes5WithInput:inputIndex:bitOffset:value:

Tries to read a 5-bit value from a byte array.
+ (bool)tryFromBytes5WithInput:(NSMutableData *)input inputIndex:(int)inputIndex bitOffset:(int)bitOffset value:(int *)value

Parameters

input

The input byte array.

inputIndex

The index to start reading.

bitOffset

The offset of the value within the byte.

value

The value.

Return Value

true if the index is valid and the value was read; otherwise, false

Discussion

Tries to read a 5-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ tryFromBytes64WithInput:inputIndex:littleEndian:value:

Tries to read a 64-bit value from a byte array.
+ (bool)tryFromBytes64WithInput:(NSMutableData *)input inputIndex:(int)inputIndex littleEndian:(bool)littleEndian value:(long long *)value

Parameters

input

The input byte array.

inputIndex

The index to start reading.

littleEndian

Whether to use little-endian format.

value

The value.

Return Value

true if the index is valid and the value was read; otherwise, false

Discussion

Tries to read a 64-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ tryFromBytes6WithInput:inputIndex:bitOffset:value:

Tries to read a 6-bit value from a byte array.
+ (bool)tryFromBytes6WithInput:(NSMutableData *)input inputIndex:(int)inputIndex bitOffset:(int)bitOffset value:(int *)value

Parameters

input

The input byte array.

inputIndex

The index to start reading.

bitOffset

The offset of the value within the byte.

value

The value.

Return Value

true if the index is valid and the value was read; otherwise, false

Discussion

Tries to read a 6-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ tryFromBytes7WithInput:inputIndex:bitOffset:value:

Tries to read a 7-bit value from a byte array.
+ (bool)tryFromBytes7WithInput:(NSMutableData *)input inputIndex:(int)inputIndex bitOffset:(int)bitOffset value:(int *)value

Parameters

input

The input byte array.

inputIndex

The index to start reading.

bitOffset

The offset of the value within the byte.

value

The value.

Return Value

true if the index is valid and the value was read; otherwise, false

Discussion

Tries to read a 7-bit value from a byte array.

Declared In

FMIceLinkBinary.h

+ tryFromBytes8WithInput:inputIndex:value:

Tries to read an 8-bit value from a byte array.
+ (bool)tryFromBytes8WithInput:(NSMutableData *)input inputIndex:(int)inputIndex value:(int *)value

Parameters

input

The input byte array.

inputIndex

The index to start reading.

value

The value.

Return Value

true if the index is valid and the value was read; otherwise, false

Discussion

Tries to read an 8-bit value from a byte array.

Declared In

FMIceLinkBinary.h