|
Yate
|
An UART receiver/transmitter. More...
#include <yatemodem.h>
Public Types | |
| enum | State { Idle, BitStart, BitData, BitParity, BitStop, UARTError } |
| enum | Error { EFraming, EParity, EChksum, EInvalidData, EUnknown, EStopped, ENone } |
Public Member Functions | |
| UART (State state, const NamedList ¶ms, const char *name=0) | |
| virtual | ~UART () |
| State | state () const |
| Error | error () const |
| int | modemType () const |
| const BitAccumulator & | accumulator () const |
| virtual void | reset (State newState=Idle) |
| bool | demodulate (const DataBlock &data) |
| bool | modulate (DataBlock &dest, NamedList ¶ms) |
| void | modulate (DataBlock &dest, const DataBlock &src) |
| bool | recvBit (bool value) |
| virtual bool | recvByte (unsigned char data) |
| virtual bool | fskStarted () |
Static Public Attributes | |
| static TokenDict | s_errors [] |
Protected Member Functions | |
| virtual int | idleRecvByte (unsigned char data) |
| virtual bool | createMsg (NamedList ¶ms, DataBlock &data) |
| bool | error (Error e) |
An UART receiver/transmitter.
Accumulate data bits received from a modem
| virtual ~UART | ( | ) | [inline, virtual] |
Destructor
| const BitAccumulator& accumulator | ( | ) | const [inline] |
Create a buffer containing the byte representation of a message to be sent
| params | The list containing message parameters |
| data | Destination message data buffer |
Reimplemented in ETSIModem.
| bool demodulate | ( | const DataBlock & | data | ) | [inline] |
Send data to the enclosed modem to be demodulated
| data | The data to process |
| virtual bool fskStarted | ( | ) | [inline, virtual] |
Notification from modem that the FSK start was detected
| virtual int idleRecvByte | ( | unsigned char | data | ) | [inline, protected, virtual] |
Process an accumulated byte in Idle state
| data | The byte to process |
Reimplemented in ETSIModem.
| int modemType | ( | ) | const [inline] |
Create a buffer containing the modulated representation of a list of parameters
| dest | Destination buffer |
| params | The list containing the values to be modulated |
Create a buffer containing the modulated representation of another one
| dest | Destination buffer |
| src | Source buffer |
| bool recvBit | ( | bool | value | ) |
Push a bit of data into this UART. Once a data byte is accumulated, push it back to itself
| value | The bit to be processed |
| virtual bool recvByte | ( | unsigned char | data | ) | [inline, virtual] |
Reset this UART
| newState | The state to reset to |
1.7.6.1