Quantcast
Channel:
Viewing all articles
Browse latest Browse all 59170

Forum Post: RE: Troubles with UDP send

$
0
0
Thanks@Karol, Related sentence in my codes are described as below NX_PACKET               packet_ptr; ... #define     SLAVE_IP_ADDRESS       IP_ADDRESS(192,168,1,2) ... /* Enable UDP traffic. */ status = nx_udp_enable(&ip_0); /* Check for UDP enable errors. */ if (status) error_counter++; /* Create UDP socket. */ status = nx_udp_socket_create(&ip_0,&udp_socket,"UDP Socket 0", NX_IP_NORMAL, NX_FRAGMENT_OKAY,0x80,30); /* Check for UDP socket create errors. */ if (status) error_counter++; /* Bind the previously created UDP socket to port 11000 on the previously created IP instance. If the port is already bound, wait for 300 timer ticks before giving up. */ status = nx_udp_socket_bind(&udp_socket, 11000, 300); /* If status is NX_SUCCESS, the UDP socket is now bound to port 11000.*/ /* Check for UDP bind errors. */ if (status) error_counter++; /* Send a packet to the UDP server at server_address on port 11000. */ slave_address.nxd_ip_version = NX_IP_VERSION_V4; slave_address.nxd_ip_address.v4 = SLAVE_IP_ADDRESS; status = nxd_udp_socket_send(&udp_socket, packet_ptr, &slave_address, 11000); /* Check for UDP send errors. */ if (status) error_counter++; And function   nxd_udp_socket_send is defined in nx_api.h as #define nxd_udp_socket_send(s,p,i,t)            _nxde_udp_socket_send(s,&p,i,t) for detail, I re-upload a new attachment for netx_thread_entry, if convenient, please kindly investigate it... (Please visit the site to view this file)

Viewing all articles
Browse latest Browse all 59170

Trending Articles