The following sections describe the changes to the API functions of the Network Component compared to RL-TCPnet, the Real-Time Library provided with MDK Version 4. Previously, there have been two files carrying the header files: rtl.h and net_config.h. This has been unified in MDK-ARM Version 5 to one header file called rl_net.h. The MDK-ARM Version 5 Network Component requires CMSIS-RTOS functionality. Events are no longer called by interrupt service routines which makes the timing of the overall system more predictable.
The API functions along with the differences are shown in the order:
RL-TCPnet: MDK-ARM Version 4 with links to the RL-ARM online manual.
Network Component: MDK-ARM Version 5.
Description of the difference.
Note
Some API function names are changed to unify the name space of the Software Components.
Changes from rtl.hrtl.h // Network API for RL-ARM middleware components (MDK-ARM Version 4)rl_net.h // Complete API for Network Component (MDK-ARM Version 5)MDK Middleware now uses a single header file for the Network Component.
void init_TcpNet (void)netStatusnet_initialize (void)Return code changed to netStatus.
BOOL main_TcpNet (void)int net_main (void)Return code changed to int.
void timer_tick (void)removed The function is now replaced by CMSIS-RTOS functionality and therefore no longer required.
U8 udp_get_socket (U8 tos, U8 opt, U16 (*listener)(U8 socket, U8 *remip, U16 port, U8 *buf, U16 len))int32_t udp_get_socket (uint8_t tos, uint8_t opt, net_udp_cb_t cb_func)
Returns socket handle number or execution status as defined with netStatus.
Event listening callback function added (must be provided by the user). Refer to net_udp_cb_t.