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...
Public Member Functions | |
| DataBufferFramer () | |
| Initializes a new instance of the fm.liveswitch.DataBufferFramer class. More... | |
| void | destroy () |
| Destroys this instance. More... | |
| fm.liveswitch.DataBuffer | getAvailableDataBuffer () |
| Gets the available data. More... | |
| int | getAvailableLength () |
| Gets the available length. More... | |
| int | getFootprint () |
| Gets the size of the internal data buffer, in bytes. More... | |
| String | getHexString () |
| Gets the hexadecimal string representing the current contents of the data buffer. More... | |
| fm.liveswitch.DataBuffer | read (fm.liveswitch.IFunction1< fm.liveswitch.DataBuffer, Integer > getFrameLength) |
| Reads a data buffer from the internal data buffer. More... | |
| void | write (fm.liveswitch.DataBuffer dataBuffer) |
| Writes a data buffer to the internal data buffer. 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.
| fm.liveswitch.DataBufferFramer.DataBufferFramer | ( | ) |
Initializes a new instance of the fm.liveswitch.DataBufferFramer class.
| void fm.liveswitch.DataBufferFramer.destroy | ( | ) |
Destroys this instance.
| fm.liveswitch.DataBuffer fm.liveswitch.DataBufferFramer.getAvailableDataBuffer | ( | ) |
Gets the available data.
| int fm.liveswitch.DataBufferFramer.getAvailableLength | ( | ) |
Gets the available length.
| int fm.liveswitch.DataBufferFramer.getFootprint | ( | ) |
Gets the size of the internal data buffer, in bytes.
| String fm.liveswitch.DataBufferFramer.getHexString | ( | ) |
Gets the hexadecimal string representing the current contents of the data buffer.
| fm.liveswitch.DataBuffer fm.liveswitch.DataBufferFramer.read | ( | fm.liveswitch.IFunction1< fm.liveswitch.DataBuffer, Integer > | getFrameLength | ) |
Reads a data buffer from the internal data buffer.
| getFrameLength | A callback that returns the next frame length. |
| void fm.liveswitch.DataBufferFramer.write | ( | fm.liveswitch.DataBuffer | dataBuffer | ) |
Writes a data buffer to the internal data buffer.
| dataBuffer | The data buffer. |