
Ethernet Developers Guide
72
840 USE 115 00 Version 1.0
B.10 Transmit State Machine
The transmit state machine establishes a connection, and periodicall
transmits a
re
uest. The different states for the transmit state machine are as follows.
IDLE. In the IDLE state, there is no connection.
RESOLVING_NAME. In the RESOLVING_NAME state, CSample_View is
waitin
for the window socket DLL to convert a node’s name into an IP
address.
CONNECTING. In the CONNECTING state, CSample_View is waitin
for the
window socket DLL to
enerate the FD_CONNECT event. This event
indicates if the attempt to establish a connection succeeded or failed.
CONNECTED. The CONNECTED state indicates that a connection has been
successfull
established.
WAIT_TO_TX. In the WAIT_TO_TX state, CSample_View is waitin
to
transmit the messa
e. It transmits the messa
e, when the time from the last
transmit exceeds the specified poll interval.
BLOCKED. When CSample_View attempts to send a messa
e, the window
socket DLL ma
not be able to transmit the complete messa
e. This is a flow
control condition, and CSample_View enters the BLOCKED state. The
window socket DLL
enerates the FD_WRITE event when it can send more
data.
TX_DONE. CSample_View enters the TX_DONE when it has completed
transmittin
the re
uest.
If the CSample_View is in the IDLE state, and user selects either the connect menu
item, or the connect tool bar button, CSample_View OnMana
Connect function
attempts to establish connect with its tcpip_initate_connection function. This
function examines the remote destination and determines if it’s a name or an IP
address. If it’s a name, OnMan
Connect chan
es the transmit state to
RESOLVING_NAME, and it invokes the window sockets DLL
WSAAs
ncGetHostB
Name function to resolve the name. Window sockets DLL
will
enerate the user defined WM_TCPIP_NAME_RESOLVED messa
e which
indicates if the name has been resolved. The OnTcpIpNameResolved member
function process the WM_TCPIP_NAME_RESOLVED messa
e. If the name is not
resolved, OnTcpIpNameResolved chan
es the transmit state back to IDLE.
Komentarze do niniejszej Instrukcji