RF24Ethernet - TCP/IP over RF24Network v1.6.17
TMRh20 - Pushing the practical limits of RF24 modules
|
#include <RF24Client.h>
Public Member Functions | |
RF24Client () | |
int | connect (IPAddress ip, uint16_t port) |
int | connect (const char *host, uint16_t port) |
int | read (uint8_t *buf, size_t size) |
int | read () |
void | stop () |
uint8_t | connected () |
size_t | write (uint8_t) |
size_t | write (const uint8_t *buf, size_t size) |
int | available () |
int | waitAvailable (uint32_t timeout=750) |
int | peek () |
void | flush () |
operator bool () | |
virtual bool | operator== (const EthernetClient &) |
virtual bool | operator!= (const EthernetClient &rhs) |
Static Public Attributes | |
static uip_userdata_t | all_data [UIP_CONNS] |
Friends | |
class | RF24EthernetClass |
class | RF24Server |
void | serialip_appcall (void) |
void | uip_log (char *msg) |
Definition at line 75 of file RF24Client.h.
RF24Client::RF24Client | ( | ) |
Basic constructor
Definition at line 25 of file RF24Client.cpp.
int RF24Client::connect | ( | IPAddress | ip, |
uint16_t | port ) |
Establish a connection to a specified IP address and port
Definition at line 40 of file RF24Client.cpp.
References IF_RF24ETHERNET_DEBUG_CLIENT, stop(), UIP_CONNECTION_TIMEOUT, and uip_ip_addr.
Referenced by connect().
int RF24Client::connect | ( | const char * | host, |
uint16_t | port ) |
Establish a connection to a given hostname and port
Definition at line 88 of file RF24Client.cpp.
References connect().
int RF24Client::read | ( | uint8_t * | buf, |
size_t | size ) |
Read available data into a buffer
Definition at line 483 of file RF24Client.cpp.
References IF_ETH_DEBUG_L2, UIP_CLIENT_CLOSE, UIP_CLIENT_REMOTECLOSED, UIP_CLIENT_RESTART, and UIP_CLIENT_SOCKETS.
int RF24Client::read | ( | ) |
Read data one byte at a time
Definition at line 532 of file RF24Client.cpp.
References read().
Referenced by read().
void RF24Client::stop | ( | ) |
Disconnects from the current active connection
Definition at line 124 of file RF24Client.cpp.
References IF_RF24ETHERNET_DEBUG_CLIENT, RF24Ethernet, UIP_CLIENT_CLOSE, and UIP_CLIENT_REMOTECLOSED.
Referenced by connect().
uint8_t RF24Client::connected | ( | ) |
Indicates whether the client is connected or not
Definition at line 33 of file RF24Client.cpp.
References UIP_CLIENT_CONNECTED.
size_t RF24Client::write | ( | uint8_t | c | ) |
Write a single byte of data to the stream
Definition at line 173 of file RF24Client.cpp.
size_t RF24Client::write | ( | const uint8_t * | buf, |
size_t | size ) |
Write a buffer of data, to be sent in a single TCP packet
Definition at line 180 of file RF24Client.cpp.
int RF24Client::available | ( | ) |
Indicates whether data is available to be read by the client.
Definition at line 462 of file RF24Client.cpp.
References RF24Ethernet.
Referenced by peek(), and waitAvailable().
int RF24Client::waitAvailable | ( | uint32_t | timeout = 750 | ) |
Wait Available
Helps to ensure all incoming data has been received, prior to writing data back to the client, etc.
Indicates whether data is available to be read by the client, after waiting a maximum period of time.
Definition at line 446 of file RF24Client.cpp.
References available(), and RF24Ethernet.
int RF24Client::peek | ( | ) |
Read a byte from the incoming buffer without advancing the point of reading
Definition at line 542 of file RF24Client.cpp.
References available().
void RF24Client::flush | ( | ) |
Flush all incoming client data from the current connection/buffer
Definition at line 553 of file RF24Client.cpp.
RF24Client::operator bool | ( | ) |
Definition at line 165 of file RF24Client.cpp.
References Ethernet, and UIP_CLIENT_REMOTECLOSED.
|
virtual |
Definition at line 158 of file RF24Client.cpp.
Referenced by operator!=().
|
inlinevirtual |
Definition at line 157 of file RF24Client.h.
References operator==().
|
friend |
Definition at line 175 of file RF24Client.h.
|
friend |
Definition at line 176 of file RF24Client.h.
|
friend |
Definition at line 241 of file RF24Client.cpp.
|
friend |
Definition at line 229 of file RF24Client.cpp.
|
static |
Definition at line 162 of file RF24Client.h.
Referenced by RF24Server::available(), RF24Server::setTimeout(), and RF24Server::write().