Diagnostic SpaceWire Interface
EtherSpaceLink family User Manual
17.
6
.15.
EtherSpaceLink_callback_packet_type()
S
ynops
i
s
int EtherSpaceLink_callback_packet_type ( EtherSpaceLink DSI_unit
)
D
esc
ri
pt
i
on
Ca
llb
acks f
o
r
sp
e
c
i
a
l
a
n
d
exten
d
e
d cha
r
ac
te
r
s
et
s
m
ay
be m
ad
e to t
h
e
sa
me
p
r
o
c
e
d
u
r
e.
I
n t
h
i
s cas
e
,
EtherSpaceLink_callback_packet_type()
m
ay
be
ca
lle
d
to
d
i
sc
ove
r
wh
i
ch
t
yp
e o
f ca
llb
ack
i
s
i
n
p
r
o
gr
e
ss
.
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
ssf
ul
EtherSpaceLink_open()
c
omm
a
n
d
.
Retu
r
ns
int
EtherSpaceLink_SPECIAL
o
r
EtherSpaceLink_EXTN
.
E
xa
mple
EtherSpaceLink DSI_unit;
char callback_buffer[1024];
void callback ( int length,
int complete,
int data_buffer_position )
{
int type = EtherSpaceLink_callback_packet_type ( DSI_unit);
if ( type == EtherSpaceLink_SPECIAL )
{
// handle Special callback
}
else
if ( type == EtherSpaceLink_EXTN )
{
// handle Extension callback
}
}
4Links Limited
www.4Links.co.uk
[email protected]
page 86 of 130
T +44 1908 642001; F +44 1908 363463
Milton Keynes MK3 6EB, UK
Suite EU2, Bletchley Park