|  | GM6000 Digital Heater Controller Build: 20 (Branch = develop)
    SDX-1330 | 
This concrete template class provide a basic implementation of the Frame::Decoder interface that uses Cpl::Io::Input stream as the input source. More...
This concrete template class provide a basic implementation of the Frame::Decoder interface that uses Cpl::Io::Input stream as the input source.
In addition this class only accepts PRINTABLE ASCII characters within the frame; AND the start-of-frame character is ANY printable ASCII; AND the end-of-frame character is a newline character (\r or \n); AND there is NO escape sequence since the escape sequence is need to embedded EOF characters - but in this case EOF (newline) is NOT a printable ASCII character -->so an escape sequence is not meaningful.
NOTE: If a non-printable ASCII character is encounter within a frame, the current frame is aborted AND a newline character is required before accepting/detecting a new SOF character(s).
Template args: BUFSIZE Size of the internal buffer to use when reading raw characters from the Input stream.
#include <LineDecoder.h>
| Public Member Functions | |
| LineDecoder (Cpl::Io::Input *inputSource=0, char convertTabs='\t', bool blocking=true) | |
| Constructor. | |
|  Public Member Functions inherited from Cpl::Text::Frame::StreamDecoder | |
| void | setInput (Cpl::Io::Input &newInFd) noexcept | 
| This method allows the Application/consumer to change/Set the Input Stream handle. | |
|  Public Member Functions inherited from Cpl::Text::Frame::Decoder_ | |
| Decoder_ (char rawInputBuffer[], size_t sizeOfRawInputBuffer) | |
| Constructor. | |
| bool | scan (size_t maxSizeOfFrame, char *frame, size_t &frameSize) noexcept | 
| See Cpl::Text::Frame::Decoder. | |
| bool | scan (size_t maxSizeOfFrame, char *frame, size_t &frameSize, bool &isEof) noexcept | 
| See Cpl::Text::Frame::Decoder. | |
| bool | oobRead (void *buffer, int numBytes, int &bytesRead) noexcept | 
| See Cpl::Text::Frame::Decoder. | |
|  Public Member Functions inherited from Cpl::Text::Frame::Decoder | |
| virtual | ~Decoder () | 
| Virtual Destructor. | |
| Protected Member Functions | |
| bool | isStartOfFrame () noexcept | 
| See Cpl::Text::Frame::Decoder_. | |
| bool | isEofOfFrame () noexcept | 
| See Cpl::Text::Frame::Decoder_. | |
| bool | isEscapeChar () noexcept | 
| See Cpl::Text::Frame::Decoder_. | |
| bool | isLegalCharacter () noexcept | 
| See Cpl::Text::Frame::Decoder_. | |
|  Protected Member Functions inherited from Cpl::Text::Frame::StreamDecoder | |
| StreamDecoder (char rawInputBuffer[], size_t sizeOfRawInputBuffer, Cpl::Io::Input *inputSource=0, bool blocking=true) | |
| Constructor. | |
| bool | read (void *buffer, int numBytes, int &bytesRead) | 
| See Cpl::Text::Frame::Decoder_. | |
|  Protected Member Functions inherited from Cpl::Text::Frame::Decoder_ | |
| virtual char | decodeEscapedChar (char escapedChar) | 
| Returns the un-encoded value for the specified escaped character. | |
| virtual void | initializeFrame () noexcept | 
| Helper method to initialize frame processing. | |
| Protected Attributes | |
| bool | m_illegal | 
| Track if I have encountered an invalid character in the 'middle' of a frame. | |
| char | m_convertTabs | 
| Remember my tabs option. | |
| char | m_buffer [BUFSIZE] | 
| Raw input buffer for reading characters in 'chunks' from my Input stream (i.e. minimize the calls to read()) | |
|  Protected Attributes inherited from Cpl::Text::Frame::StreamDecoder | |
| Cpl::Io::Input *volatile | m_srcPtr | 
| Input stream. | |
| bool | m_blocking | 
| Block semantics. | |
|  Protected Attributes inherited from Cpl::Text::Frame::Decoder_ | |
| int | m_dataLen | 
| Current number of characters remaining in my raw input buffer. | |
| char * | m_dataPtr | 
| Pointer to the next unprocessed character in my raw input buffer. | |
| char * | m_buffer | 
| Raw input buffer for reading characters in 'chunks' from my Input stream (i.e. minimize the calls to read()) | |
| size_t | m_bufSize | 
| Size of my raw input buffer. | |
| bool | m_inFrame | 
| Flag: I am currently in a Frame. | |
| bool | m_escaping | 
| Flag: the next character is an escape character. | |
| char * | m_framePtr | 
| Pointer to the next decoded frame character. | |
| size_t | m_frameSize | 
| Number of bytes current decoded for the frame. | |
| 
 | inline | 
Constructor.
If the 'convertTabs' argument is set to a value OTHER than a tab character, then any tab characters encounter will be converted to the value of 'convertTabs'.
| 
 | inlineprotectedvirtualnoexcept | 
See Cpl::Text::Frame::Decoder_.
Implements Cpl::Text::Frame::Decoder_.
| 
 | inlineprotectedvirtualnoexcept | 
See Cpl::Text::Frame::Decoder_.
Implements Cpl::Text::Frame::Decoder_.
| 
 | inlineprotectedvirtualnoexcept | 
See Cpl::Text::Frame::Decoder_.
Implements Cpl::Text::Frame::Decoder_.
| 
 | inlineprotectedvirtualnoexcept | 
See Cpl::Text::Frame::Decoder_.
Implements Cpl::Text::Frame::Decoder_.
| 
 | protected | 
Raw input buffer for reading characters in 'chunks' from my Input stream (i.e. minimize the calls to read())
| 
 | protected | 
Remember my tabs option.
| 
 | protected | 
Track if I have encountered an invalid character in the 'middle' of a frame.