User guide
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
y
 transmits a 
re
q
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
g
 for the window socket DLL to convert a node’s name into an IP 
address. 
CONNECTING. In the CONNECTING state, CSample_View is waitin
g
 for the 
window socket DLL to 
g
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
y
 established. 
WAIT_TO_TX. In the WAIT_TO_TX state, CSample_View is waitin
g
 to 
transmit the messa
g
e. It transmits the messa
g
e, when the time from the last 
transmit exceeds the specified poll interval. 
BLOCKED. When CSample_View attempts to send a messa
g
e, the window 
socket DLL ma
y
 not be able to transmit the complete messa
g
e. This is a flow 
control condition, and CSample_View enters the BLOCKED state. The 
window socket DLL 
g
enerates the FD_WRITE event when it can send more 
data. 
TX_DONE.  CSample_View enters the TX_DONE when it has completed 
transmittin
g
 the re
q
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
g
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
g
Connect chan
g
es the transmit state to 
RESOLVING_NAME,  and it invokes the window sockets DLL 
WSAAs
y
ncGetHostB
y
Name function to resolve the name. Window sockets DLL 
will 
g
enerate the user defined WM_TCPIP_NAME_RESOLVED messa
g
e which 
indicates if the name has been resolved. The OnTcpIpNameResolved member 
function process the WM_TCPIP_NAME_RESOLVED messa
g
e. If the name is not 
resolved, OnTcpIpNameResolved chan
g
es the transmit state back to IDLE.










