![4Links EtherSpaceLink Series User Manual Download Page 75](http://html.mh-extra.com/html/4links/etherspacelink-series/etherspacelink-series_user-manual_445096075.webp)
EtherSpaceLink-RG408
EtherSpaceLink family User Manual
E
xa
mple
A
n
a
s
y
n
ch
r
o
n
ou
s
p
ac
k
et
r
e
a
d
EtherSpaceLink_read_packet_full_nowait ( ESL_unit,
buffer,
buffer_length,
&terminator,
0
);
// This will return immediately, even if the transfer has to wait
// for the system or SpaceWire link.
// Processing can take place here at the same time as the packet
// is being received.
// The status of the transfer can be tested, for example with:
while ( ( read_length = EtherSpaceLink_read_packet_status(ESL_unit) ) < 0 )
{
// A negative value from read_packet_status indicates that
// the transfer is not yet complete.
printf( "... waiting\n" );
usleep( 500000 );
}
// A read length >= 0 from read_packet_status
// indicates that the transfer has completed.
4Links Limited
www.4Links.co.uk
[email protected]
page 75 of 110
T +44 1908 642001; F +44 1908 363463
Milton Keynes MK3 6EB, UK
Suite EU2, Bletchley Park