Please enable JavaScript to view this site.

Introduction

Warnings for the proper use of UDP communication from R3 applications:

UDP communication over Ethernet performed by R3 application works exclusively using the Ethernet interface present on the CPU board. It cannot be used to communicate via an Ethernet interface present on other boards (e.g., Netint board).

Due to its inherent characteristics, UDP communication does not guarantee delivery of data packets. The application must take responsibility, if requested, for verification and retransmission of lost packets.

UDP communication does not guarantee transmission timing

UDP communication does not guarantee the timing of receiving packets. Packet P2, transmitted after packet P1, may be received before P1. The application must take charge, if requested, of data reordering.

The handle associated with a UDP communication (value returned by the udp_open_ functions) makes sense only within the R3 task in which the open was performed. You cannot use the handle in a different task to make calls to other UDP functions

Up to a maximum of 65535 bytes can be transmitted with a single udp_ function call. In the O.S. (IP layer) transmission is done by breaking the buffer into blocks of maximum size equal to MAX_UDP_DATA = 508. If one of these packets fails transmission, the entire buffer, as a result, is lost

The functions udp_send_notify() and udp_recv_notify() must in all cases have a buffer limited to MAX_UDP_DATA bytes

The user making from task R3 a UDP server application can use as many ports as they wish for the connection. However, it is recommended to avoid the 8000 to 8999 range, to avoid conflicts with current and future Robox implementations

udp

Istruzioni

udp_close()

Closing a UDP communication

udp_open_client()

Opening a client-type UDP communication

udp_open_server()

Opening a UDP communication of server type

udp_recv()

Receiving a UDP message from a previously specified station

udp_recv_from()

Receiving a UDP message from a specified station

udp_recv_notify()

Receiving a UDP message (notification) from a previously specified station

udp_send()

Sending a UDP message to a previously specified station

udp_send_notify()

Sending a UDP message with notification to a previously specified station

udp_send_to()

Sending a UDP message to a previously specified station

ipaddr_to_str()

Support

str_to_ipaddr()

Support

NOTE: A client/server example can be found in RDE3-->workspace-->default examples.

Example

 

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC