![4Links EtherSpaceLink Series User Manual Download Page 70](http://html.mh-extra.com/html/4links/etherspacelink-series/etherspacelink-series_user-manual_445096070.webp)
EtherSpaceLink-RG408
EtherSpaceLink family User Manual
I
f
o
ne
o
f
t
h
ese
ac
t
i
o
ns
i
s n
o
t s
p
e
c
i
f
i
ed
,
t
h
o
se
p
ac
k
ets
w
i
ll
be d
i
s
ca
r
ded.
EtherSpaceLink_
DISCARD_SPECIAL_DATA
I
g
n
o
r
e
a
n
y
s
p
e
c
i
a
l
d
a
t
a
p
ac
k
ets
[
de
fa
ul
t
]
.
EtherSpaceLink_
REPORT_SPECIAL_DATA
R
et
a
i
n t
h
e s
p
e
c
i
a
l
d
a
t
a
p
ac
k
et
i
n
a
b
u
ff
e
r
a
nd
r
e
po
r
t
i
ts
l
en
g
t
h
.
EtherSpaceLink_
RETURN_SPECIAL_DATA
D
e
l
iv
e
r
t
h
e s
p
e
c
i
a
l
d
a
t
a
i
n t
h
e
giv
en b
u
ff
e
r
.
EtherSpaceLink_
CALLBACK_SPECIAL_DATA
Ca
ll
t
h
e
r
e
gi
ste
r
ed
ca
ll
b
ac
k p
r
o
c
ed
u
r
e t
o
ha
nd
l
e t
h
e
s
p
e
c
i
a
l
d
a
t
a
b
u
ff
e
r
. I
f
n
o
s
u
ch ca
ll
b
ac
k p
r
o
c
ed
u
r
e
ha
s
been
r
e
gi
ste
r
ed
,
t
h
en d
i
s
ca
r
d t
h
e s
p
e
c
i
a
l
d
a
t
a
p
ac
k
et.
S
ee
EtherSpaceLink_read_packet_special_
callback()
.
Output p
ara
mete
r
s
terminator
i
nd
i
ca
tes
w
ha
t te
r
m
i
n
a
t
o
r, i
f a
n
y
,
w
a
s
r
e
c
e
iv
ed
Retu
r
ns
≥
0
Th
e n
u
mbe
r
o
f
d
a
t
a
b
y
tes
ac
t
u
a
lly
i
n t
h
e
r
e
c
e
iv
e b
u
ff
e
r
.
-
1
A
n e
rr
o
r
o
cc
u
rr
ed.
-N-
2
I
f
t
h
e
r
e
c
e
iv
ed d
a
t
a
w
a
s “s
p
e
c
i
a
l”
d
a
t
a a
nd t
h
e
ac
t
i
o
n
r
e
q
u
ested
w
a
s t
o
r
e
po
r
t s
u
ch
d
a
t
a
t
h
en t
h
e
r
et
u
r
ned
v
a
lu
e
i
s ne
g
a
t
iv
e: t
h
e
a
bs
olu
te
v
a
lu
e m
i
n
u
s 2 be
i
n
g
t
h
e n
u
mbe
r
o
f
s
p
e
c
i
a
l
d
a
t
a
b
y
tes
a
v
a
i
l
a
b
l
e. (e.
g
.
a
r
et
u
r
n
v
a
lu
e
o
f -
3
i
nd
i
ca
tes
a
s
p
e
c
i
a
l p
ac
k
et
c
o
nt
a
i
n
i
n
g
1 b
y
te
i
s
a
v
a
i
l
a
b
l
e.
)
E
xa
mple
U
s
i
n
g
t
h
e s
a
me b
u
ff
e
r
f
o
r
n
o
r
m
a
l
a
nd s
p
e
c
i
a
l
d
a
t
a
EtherSpaceLink ESL_unit;
char buffer[1024];
int n;
int EOP;
ESL_unit = EtherSpaceLink_open ( "192.168.3.40" );
EtherSpaceLink_set_mode ( ESL_unit, EtherSpaceLink_LINK_mode_normal );
n = EtherSpaceLink_read_packet_full ( ESL_unit, buffer, sizeof(buffer), &EOP,
EtherSpaceLink_RETURN_SPECIAL_DATA
);
// the terminator value in ‘EOP’ tells us what sort of data we have
4Links Limited
www.4Links.co.uk
[email protected]
page 70 of 110
T +44 1908 642001; F +44 1908 363463
Milton Keynes MK3 6EB, UK
Suite EU2, Bletchley Park