![4Links EtherSpaceLink Series User Manual Download Page 72](http://html.mh-extra.com/html/4links/etherspacelink-series/etherspacelink-series_user-manual_445096072.webp)
EtherSpaceLink-RG408
EtherSpaceLink family User Manual
E
xa
mple
U
s
i
n
g
a ca
ll
b
ac
k
f
o
r
s
p
e
c
i
a
l
d
a
t
a
EtherSpaceLink ESL_unit;
char callback_buffer[1024];
void callback ( int length,
int complete,
int data_buffer_position )
{
switch ( EtherSpaceLink_extract_module_type (ESL_unit, callback_buffer) )
{
case EtherSpaceLink_TT: // time-tag
break;
case EtherSpaceLink_ER: // error report
break;
default: // something else
}
}
char data_buffer[1024];
int n;
int EOP;
ESL_unit = EtherSpaceLink_open ( "192.168.3.40" );
EtherSpaceLink_set_mode ( ESL_unit, EtherSpaceLink_LINK_mode_normal );
EtherSpaceLink_read_packet_callback ( ESL_unit,
callback_buffer, 1024,
callback );
n = EtherSpaceLink_read_packet_full ( ESL_unit, data_buffer, 1024, &EOP,
EtherSpaceLink_CALLBACK_SPECIAL_DATA
);
4Links Limited
www.4Links.co.uk
[email protected]
page 72 of 110
T +44 1908 642001; F +44 1908 363463
Milton Keynes MK3 6EB, UK
Suite EU2, Bletchley Park