EtherSpaceLink-RG408
EtherSpaceLink family User Manual
14.
6
.19.
EtherSpaceLink_link_connected()
S
ynops
i
s
int EtherSpaceLink_link_connected ( EtherSpaceLink ESL_unit
)
D
esc
ri
pt
i
on
EtherSpaceLink_link_connected()
dete
r
m
i
nes
w
h
et
h
e
r
t
h
e
S
p
ac
e
W
ir
e
l
i
n
k
i
s
c
u
rr
ent
ly
c
o
nne
c
ted (
i
.e.
w
h
et
h
e
r
t
h
e
S
p
ac
e
W
ir
e st
a
te m
ach
i
ne
i
s
i
n t
h
e
R
u
n st
a
te
)
.
I
nput p
ara
mete
r
s
ESL_unit
t
h
e
ha
nd
l
e
r
et
u
r
ned b
y
a
s
u
cc
ess
f
ul
EtherSpaceLink_open()
c
o
mm
a
nd.
Retu
r
ns
+1
Th
e
l
i
n
k
i
s
c
o
nne
c
ted
0
Th
e
l
i
n
k
i
s n
o
t
c
o
nne
c
ted
-
1
A
n e
rr
o
r
o
cc
u
rr
ed
Note
EtherSpaceLink_link_connected()
sends
a
st
a
t
u
s
r
e
q
u
est t
o
t
h
e
E
t
h
e
rS
p
ac
eL
i
n
k u
n
i
t
a
nd
t
h
en
r
e
a
ds
f
r
o
m t
h
e
TC
P/
I
P
c
o
nne
c
t
i
o
n
u
nt
i
l
i
t
r
e
c
e
iv
es
a
s
u
cc
ess
f
ul
r
es
po
nse. I
f
t
h
e
u
n
i
t
u
nde
r
test
g
ene
r
a
tes
a
s
y
n
ch
r
o
n
ou
s t
r
aff
i
c
w
h
i
l
e t
h
i
s
poll
i
n
g
t
a
k
es
pl
ac
e
,
t
ha
t
S
p
ac
e
W
ir
e t
r
aff
i
c
m
ig
h
t be
d
i
s
ca
r
ded.
EtherSpaceLink_link_connected()
r
et
u
r
ns
a
r
es
ul
t
c
o
de
o
f -
1
i
f a
n
y
S
p
ac
e
W
ir
e d
a
t
a
i
s
lo
st.
S
ee se
c
t
i
o
n 1
E
xa
mple
EtherSpaceLink ESL_unit;
// Open a TCP/IP link to the ESL unit
ESL_unit = EtherSpaceLink_open ( "192.168.3.40" );
// Set up Link 1
EtherSpaceLink_set_active_link ( ESL_unit, 1 );
EtherSpaceLink_set_mode ( ESL_unit, EtherSpaceLink_LINK_mode_normal );
// Wait for a connection
while ( EtherSpaceLink_link_connected ( ESL_unit ) == 0 )
{ usleep ( 5000 );
}
4Links Limited
www.4Links.co.uk
[email protected]
page 80 of 110
T +44 1908 642001; F +44 1908 363463
Milton Keynes MK3 6EB, UK
Suite EU2, Bletchley Park