Diagnostic SpaceWire Interface
EtherSpaceLink family User Manual
17.
6
.
22
.
EtherSpaceLink_link_connected()
S
ynops
i
s
int EtherSpaceLink_link_connected ( EtherSpaceLink DSI_unit
)
D
esc
ri
pt
i
on
EtherSpaceLink_link_connected()
d
ete
r
m
i
ne
s
wh
et
h
e
r
t
h
e S
pac
e
W
ir
e l
i
n
k
is
c
u
rr
entl
y
c
onne
c
te
d
(
i
.e.
wh
et
h
e
r
t
h
e S
pac
e
W
ir
e
s
t
a
te m
ach
i
ne
is i
n t
h
e
R
un
s
t
a
te).
I
nput p
ara
mete
r
s
DSI_unit
t
h
e
ha
n
d
le
r
etu
r
ne
d
b
y a
s
u
cc
e
ss
f
ul
EtherSpaceLink_open()
c
omm
a
n
d
.
Retu
r
ns
+
1
Th
e l
i
n
k
is
c
onne
c
te
d
0
Th
e l
i
n
k
is
not
c
onne
c
te
d
-
1
A
n e
rr
o
r
o
cc
u
rr
e
d
Note
EtherSpaceLink_link_connected()
s
en
ds
a
s
t
a
tu
s r
e
q
ue
s
t to t
h
e
E
t
h
e
r
S
pac
eL
i
n
k
un
i
t
a
n
d
t
h
en
r
e
a
ds
f
r
om t
h
e
TC
P/
I
P
c
onne
c
t
i
on unt
i
l
i
t
r
e
c
e
i
ve
s
a
s
u
cc
e
ss
f
ul
r
e
s
p
on
s
e.
I
f
t
h
e un
i
t un
d
e
r
te
s
t
g
ene
r
a
te
s
a
s
y
n
ch
r
onou
s
t
r
aff
i
c wh
i
le t
h
is
p
oll
i
n
g
t
ak
e
s
p
l
ac
e
,
t
ha
t S
pac
e
W
ir
e t
r
aff
i
c
m
ig
h
t be
dis
ca
rd
e
d
.
EtherSpaceLink_link_connected()
r
etu
r
n
s
a
r
e
s
ult
c
o
d
e o
f -
1 i
f a
n
y
S
pac
e
W
ir
e
d
a
t
a
is
lo
s
t.
See
s
e
c
t
i
on
E
xa
mple
EtherSpaceLink DSI_unit;
// Open a TCP/IP link to the ESL unit
DSI_unit = EtherSpaceLink_open ( "192.168.3.40" );
// Set up Link 1
EtherSpaceLink_set_active_link ( DSI_unit, 1 );
EtherSpaceLink_set_mode ( DSI_unit, EtherSpaceLink_LINK_mode_normal );
// Wait for a connection
while ( EtherSpaceLink_link_connected ( DSI_unit ) == 0 )
{ usleep ( 5000 );
}
4Links Limited
www.4Links.co.uk
[email protected]
page 99 of 130
T +44 1908 642001; F +44 1908 363463
Milton Keynes MK3 6EB, UK
Suite EU2, Bletchley Park