Y-Modem receiver object. More...
#include <ymodem_rx.h>

Classes | |
| class | OutBlock0 |
| class | OutStream |
Public Types | |
| enum | RxError { ErrorOutputStreamError = -400, ErrorTransmitterNotBehaving = -401, ErrorTranferTerminatedByTransmitter = -402, ErrorReceivedBadData = -403, ErrorMultipleFilesSent = -404 } |
Public Member Functions | |
| YModemRx (SerialPort &port) | |
| int | ReceiveX (OutStream &out, unsigned timeout, bool useCrc) |
| int | ReceiveY (OutStream &out, unsigned timeout, bool gMode) |
Private Member Functions | |
| int | ReceiveInitialise (OutStream &out, unsigned timeout) |
| int | ReceiveBlock (OutStream &out) |
| int | OutChar (uint8_t c) |
Private Attributes | |
| bool | ExpectCRC |
| Set to true if blocks will have a CRC rather than a checksum. | |
Y-Modem receiver object.
Definition at line 38 of file ymodem_rx.h.
| enum YModemRx::RxError |
Enumeration of possible error values.
Definition at line 106 of file ymodem_rx.h.
| YModemRx::YModemRx | ( | SerialPort & | port | ) |
Construct a Y-Modem object which will transmit data over the given port.
| port | The port. |
Definition at line 45 of file ymodem_rx.cpp.
| int YModemRx::ReceiveX | ( | OutStream & | out, | |
| unsigned | timeout, | |||
| bool | useCrc | |||
| ) |
Receive data using X-Modem.
| out | The stream of data write received data to. | |
| timeout | Time in milliseconds to wait sender to become ready. | |
| useCrc | If true the CRC checking protocol wil be used. |
Definition at line 209 of file ymodem_rx.cpp.
| int YModemRx::ReceiveY | ( | OutStream & | out, | |
| unsigned | timeout, | |||
| bool | gMode | |||
| ) |
Receive data using Y-Modem.
| out | The stream of data write received data to. | |
| timeout | Time in milliseconds to wait sender to become ready. | |
| gMode | If true the Y-Modem G protocol wil be used. |
Definition at line 315 of file ymodem_rx.cpp.
| int YModemRx::ReceiveInitialise | ( | OutStream & | out, | |
| unsigned | timeout | |||
| ) | [private] |
Receive first block of data.
| out | The stream of data write received data to. | |
| timeout | Time in milliseconds to wait sender to become ready. |
Definition at line 189 of file ymodem_rx.cpp.
| int YModemRx::ReceiveBlock | ( | OutStream & | out | ) | [private] |
Receive a block of data. If ExpectCRC is true, possible formats of blocks are:
If ExpectCRC is false, possible formats of blocks are:
| out | The stream of data write received data to. |
Definition at line 82 of file ymodem_rx.cpp.
| int YModemRx::OutChar | ( | uint8_t | c | ) | [private] |
Transmit a single character.
| c | The character. |
Definition at line 58 of file ymodem_rx.cpp.
1.6.1