MDK 5.0的RL Tcp/ip库和MDK 4.0的RL-TCPNet的区别(2)
- UID
- 1029342
- 性别
- 男
|
MDK 5.0的RL Tcp/ip库和MDK 4.0的RL-TCPNet的区别(2)
Differences to RL-TCPnet
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)netStatus net_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.
BOOL udp_release_socket (U8 socket)netStatus udp_release_socket (int32_t socket)Return code changed to netStatus.
BOOL udp_open (U8 socket, U16 locport)netStatus udp_open (int32_t socket, uint16_t port)Return code changed to netStatus.
BOOL udp_close (U8 socket)netStatus udp_close (int32_t socket)Return code changed to netStatus.
BOOL udp_mcast_ttl (U8 socket, U8 ttl)netStatus udp_multicast_ttl (int32_t socket, uint8_t ttl)Return code changed to netStatus.
U8 udp_get_buf (U16 size)uint8_t udp_get_buf (uint32_t size)Identical functionality.
BOOL udp_send (U8 socket, U8 *remip, U16 remport, U8 *buf, U16 dlen)netStatus udp_send (int32_t socket, const uint8_t *ip_addr, uint16_t port, uint8_t *buf, uint32_t len)Return code changed to netStatus.
U8 tcp_get_socket (U8 type, U8 tos, U16 tout, U16 (*listener)(U8 socket, U8 event, U8 *buf, U16 len))int32_t tcp_get_socket (uint8_t type, uint8_t tos, uint32_t tout, net_tcp_cb_t cb_func)Identical functionality.
BOOL tcp_release_socket (U8 socket)netStatus tcp_release_socket (int32_t socket)Return code changed to netStatus.
BOOL tcp_listen (U8 socket, U16 locport)netStatus tcp_listen (int32_t socket, uint16_t port)Return code changed to netStatus. |
|
|
|
|
|