Schneider-optics Web Embedded Server User Manual Page 86

  • Download
  • Add to my manuals
  • Print
  • Page
    / 105
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 85
Ethernet Developers Guide
76
840 USE 115 00 Version 1.0
The member function rx_ms
g
calls the window socket recv function to read data.
The recv function either returns a non ne
g
ative number that is the number of b
y
tes
read or it returns an error. If the number b
y
tes read is zero, then the connection no
lon
g
er exits, and rx_ms
g
closes the socket, and sets the transmit state to IDLE. If
the recv function returns the error indicatin
g
that no receive data is available, then
rx_ms
g
j
ust returns. For an
y
other recv function error, rx_ms
g
closes the socket,
and sets the transmit state to IDLE.
B.12 Displaying on the Screen
CSample_View m_displa
y
member indicates the displa
y
t
y
pe. The different t
y
pes
of the displa
y
s and the CSample_View member functions for showin
g
the displa
y
are as follows.
1.
Displa
y
in
g
the connection state. The different connection states displa
y
ed are
IDLE, RESOLVING NAME, and CONNECTING. ConnPaint member function
displa
y
s the connection state.
2.
GetStatsPaint member function displa
y
s the results of a
g
et statistics re
q
uest.
3.
ClearStatsPaint member function displa
y
s the results of a clear statisitics
re
q
uest.
4.
ReadRe
g
Paint member function displa
y
s the results of a read re
g
ister re
q
uest.
5.
WriteRe
g
Paint member function displa
y
s the results of a write re
g
ister re
q
uest.
MFC architectual framework calls CSample_View OnDraw member function to
process the window WM_PAINT messa
g
e. OnDraw examines m_displa
y
member
variable and calls the correspondin
g
member function described in the previous
para
g
raph. Whenever CSample_View needs to displa
y
a result, it calls Cview
Invalidate function which causes a WM_PAINT messa
g
e.
CSample_View is derived from MFC CScrollView class. This class handles the
scroll lo
g
ic. To perform the scroll lo
g
ic, CScrollView re
q
uires the size of the
document. It is informed of the document size via its SetScrollSizes member
function.
CSample_View UpdateScrollSizes member function based on the displa
y
t
y
pe
calculates the document size, and then calls SetScrollSizes. CSample_View calls
UpdateScrollSizes when the displa
y
t
y
pe chan
g
es or when the user chan
g
es the
window size.
Page view 85
1 2 ... 81 82 83 84 85 86 87 88 89 90 91 ... 104 105

Comments to this Manuals

No comments