A utility class that allows a continuous stream of data to be written to it with properly framed messages being read out of it. More...
Instance Methods | |
| (FMLiveSwitchDataBuffer *) | - availableDataBuffer |
| Gets the available data. More... | |
| (int) | - availableLength |
| Gets the available length. More... | |
| (void) | - destroy |
| Destroys this instance. More... | |
| (int) | - footprint |
| Gets the size of the internal data buffer, in bytes. More... | |
| (NSString *) | - getHexString |
| Gets the hexadecimal string representing the current contents of the data buffer. More... | |
| (instancetype) | - init |
| Initializes a new instance of the FMLiveSwitchDataBufferFramer class. More... | |
| (FMLiveSwitchDataBuffer *) | - readWithGetFrameLength: |
| Reads a data buffer from the internal data buffer. More... | |
| (FMLiveSwitchDataBuffer *) | - readWithGetFrameLengthBlock |
| Reads a data buffer from the internal data buffer. More... | |
| (FMLiveSwitchDataBuffer *) | - readWithGetFrameLengthBlock: |
| Reads a data buffer from the internal data buffer. More... | |
| (void) | - writeWithDataBuffer: |
| Writes a data buffer to the internal data buffer. More... | |
Class Methods | |
| (FMLiveSwitchDataBufferFramer *) | + dataBufferFramer |
| Initializes a new instance of the FMLiveSwitchDataBufferFramer class. More... | |
A utility class that allows a continuous stream of data to be written to it with properly framed messages being read out of it.
This class is not thread-safe for concurrent reads/writes.
| - (FMLiveSwitchDataBuffer*) availableDataBuffer |
Gets the available data.
| - (int) availableLength |
Gets the available length.
| + (FMLiveSwitchDataBufferFramer*) dataBufferFramer |
Initializes a new instance of the FMLiveSwitchDataBufferFramer class.
| - (void) destroy |
Destroys this instance.
| - (int) footprint |
Gets the size of the internal data buffer, in bytes.
| - (NSString*) getHexString |
Gets the hexadecimal string representing the current contents of the data buffer.
| - (instancetype) init |
Initializes a new instance of the FMLiveSwitchDataBufferFramer class.
| - (FMLiveSwitchDataBuffer*) readWithGetFrameLength: | (FMLiveSwitchFunction1< FMLiveSwitchDataBuffer *, id > *) | getFrameLength |
Reads a data buffer from the internal data buffer.
| getFrameLength | A callback that returns the next frame length. |
| - (FMLiveSwitchDataBuffer*) readWithGetFrameLengthBlock |
Reads a data buffer from the internal data buffer.
@inlineparam getFrameLengthBlock A callback that returns the next frame length.
| - (FMLiveSwitchDataBuffer*) readWithGetFrameLengthBlock: | (int(^)(FMLiveSwitchDataBuffer *)) | getFrameLengthBlock |
Reads a data buffer from the internal data buffer.
| getFrameLengthBlock | A callback that returns the next frame length. |
| - (void) writeWithDataBuffer: | (FMLiveSwitchDataBuffer *) | dataBuffer |
Writes a data buffer to the internal data buffer.
| dataBuffer | The data buffer. |