27 #ifndef __ETHERNETUDP_H__ 28 #define __ETHERNETUDP_H__ 46 #ifndef HIDE_FROM_DOXYGEN 57 #endif // !HIDE_FROM_DOXYGEN 72 bool Begin(uint16_t localPort);
128 uint32_t
PacketWrite(
const uint8_t *buffer, uint32_t size);
158 int32_t
PacketRead(
unsigned char *dataPtr, uint16_t len);
194 uint16_t m_udpLocalPort;
196 struct pbuf *m_outgoingPacket;
198 struct pbuf *m_incomingPacket;
199 uint16_t m_udpBytesAvailable;
201 uint16_t m_udpRemotePortReceived;
203 uint16_t m_udpRemotePortDestination;
210 bool m_packetReadyToSend;
214 uint16_t UdpPacketRead(pbuf *packet, uint16_t *available,
215 unsigned char *buffer, uint16_t size);
218 #ifndef HIDE_FROM_DOXYGEN 220 void UdpReceive(
void *arg,
struct udp_pcb *pcb,
struct pbuf *p,
221 const ip_addr_t *addr, u16_t port);
223 #endif // !HIDE_FROM_DOXYGEN 225 #endif // !__ETHERNETUDP_H__ bool PacketSend()
Send the UDP packet set up with Connect().
An IP Address class.
Definition: IpAddress.h:41
uint16_t RemotePort()
Returns the remote port for the current packet.
uint32_t PacketWrite(uint8_t c)
Write data into the outgoing UDP packet.
Namespace to encompass the ClearCore board API.
Definition: AdcManager.h:36
void PacketFlush()
Flush the current packet.
bool Begin(uint16_t localPort)
Initialize the UDP session and begin listening on the specified local port.
bool Connect(IpAddress remoteIp, uint16_t remotePort)
Setup to send a UDP packet to a specified remote.
int32_t PacketRead(unsigned char *dataPtr, uint16_t len)
Reads the current packet received from the UDP session.
uint16_t BytesAvailable()
Number of bytes available to read from the current packet.
int16_t Peek()
Attempts to get the next available character.
uint16_t PacketParse()
Check for the newest incoming UDP packet.
ClearCore UDP session class.
Definition: EthernetUdp.h:43
void End()
Disable the UDP session.
IpAddress RemoteIp()
Returns the remote IP address for the current packet.