6 F 3 B 0 3 6 2
6.4 Using the Ethernet Port Socket Interface
This section describes the requests used by T2N user programs to use UDP and TCP sockets. There are eight types of request as listed below.
∙UDP socket (open request, send request, receive request, close request)
∙TCP socket (open request, send request, receive request, close request)
1.UDP open request (using the SEND instruction)
a.Function
This request opens any of the eight sockets.
Transmission protocol: UDP/IP
b.Transfer parameters
A | 3100H |
A+1 | CMD = 0031H |
A+2 | SportNO |
A+3 | UDP_PORTNO |
Module designation
Command number
Socket identifier (1 to 8)
Local port specified socket UDP port number (1024 to 65535)
c.Status (See figure 4.3 for details on bits C, D, E and F.)
B B+1
F E D C B A 9 8 7 6 5 4 3 2 1 0
|
|
|
| SportNO | TermSTS |
Detailed information (Only valid when TermSTS = 0BH.)
SportNO: Socket identifier (1 to 8)
TermSTS: See tables 4.3 and 4.4.
Detail information: See table 4.5.
d.Important items
∙After this request completes normally, UDP send, receive or close requests can be sent to the socket.
∙An error is returned if an open request is issued for an already open socket.
Status: Transmission error (TermSTS = 0BH)
Detailed information: Already open (0080H)
∙An error is returned if a value other than 1 to 8 is specified as the socket identifier. Status: Transmission error (TermSTS = 0BH)
Detailed information: Illegal socket identifier (0082H)
∙An error is returned if a value other than a local port specified socket UDP port number is specified.
Status: Transmission error (TermSTS = 0BH)
Detailed information: Port number error (0071H)
⎯ 84 ⎯