MDK-ARM Keil, MDK-ARM Datasheet - Page 104

KIT REALVIEW MCU DEVELOPMENT

MDK-ARM

Manufacturer Part Number
MDK-ARM
Description
KIT REALVIEW MCU DEVELOPMENT
Manufacturer
Keil
Type
Compiler and IDEr
Datasheets

Specifications of MDK-ARM

For Use With/related Products
ARM MCUs
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
104
Once the data has been written into the packet, we can use udp_send() to transmit
it. When we call the udp_send() function, we must pass the socket handle, the
remote IP address, the remote port, the buffer pointer and the data packet size.
This will cause RL-TCPnet to send the frame. The UDP protocol is a “best
effort” protocol. This means that once the packet is sent there is no
acknowledgement or handshake from the destination station. If you require a
positive acknowledgement that the packet was received, then the destination
station must send a reply UDP frame.
U16 udp_callback (U8 soc, U8 *rip, U16 rport, U8 *buf, U16 len)
}
To receive the UDP data packets the destination station must make the same “get
socket” and “port open” calls. This will ensure that it is listening for the UDP
packet. When a packet arrives, it is processed by the RL-TCPnet and the
udp_callback() function is triggered. This function receives the local socket
handle, the remote IP address, and the port number of the sending station. It also
receives a pointer to the received data along with the number of bytes received.
The destination station can then reply back to the source station using its IP
address and port number.
Exercise: UDP Sockets
This exercise demonstrates peer-to-peer communication between two evaluation
boards using the UDP protocol.
if (soc == socket_udp)
}
return (0);
Process_packet (buf,len);
{
Chapter 4. RL-TCPnet Introduction
{

Related parts for MDK-ARM