#include <UdpTransceiver.h>
Definition at line 33 of file UdpTransceiver.h.
◆ UdpTransceiver()
Boardcore::UdpTransceiver::UdpTransceiver |
( |
std::shared_ptr< Wiz5500 > | wiz, |
|
|
int | sock_n ) |
|
inline |
◆ ~UdpTransceiver()
Boardcore::UdpTransceiver::~UdpTransceiver |
( |
| ) |
|
|
inline |
◆ close()
void Boardcore::UdpTransceiver::close |
( |
| ) |
|
|
inline |
◆ open()
bool Boardcore::UdpTransceiver::open |
( |
uint16_t | recv_port, |
|
|
Boardcore::WizIp | send_ip, |
|
|
uint16_t | send_port ) |
|
inline |
Open this UdpTransceiver on the specified ports.
- Parameters
-
recv_port | Port to receive data from. |
send_ip | IP to send data to. |
send_port | Port to send data to. |
Definition at line 63 of file UdpTransceiver.h.
◆ receive()
ssize_t Boardcore::UdpTransceiver::receive |
( |
uint8_t * | packet, |
|
|
size_t | packetLength ) |
|
inlinevirtual |
Wait until a new packet is received.
- Parameters
-
packet | Buffer to store the packet (at least packetLength bytes). |
packetLength | Maximum length of the received data. |
- Returns
- Size of the data received or -1 if failure
Implements Boardcore::Transceiver.
Definition at line 49 of file UdpTransceiver.h.
◆ send()
bool Boardcore::UdpTransceiver::send |
( |
uint8_t * | packet, |
|
|
size_t | packetLength ) |
|
inlinevirtual |
Send a packet.
The function must block the thread until the packet is sent (successfully or not).
- Parameters
-
packet | Pointer to the packet (at least packetLength bytes). |
packetLength | Length of the packet to be sent. |
- Returns
- True if the message was sent correctly.
Implements Boardcore::Transceiver.
Definition at line 47 of file UdpTransceiver.h.
The documentation for this class was generated from the following file: