Page 184 of 191
800581-2.11 NeurOne System User Manual.doc
GNU Octave script for receiving UDP sample packets:
pkg load sockets
%loads the needed sockets packet
buff_size
=
50
;
%buffer size must be greater than the packet size
rcv_port
=
50000
;
%target port number
rcv_sck
=
socket
(
AF_INET
,
SOCK_DGRAM
,
0
);
bind
(
rcv_sck
,
rcv_port
);
[
str
,
len_s
]=
recv
(
rcv_sck
,
buff_size
);
%the first packet is empty packet
for
n
=
1
:
10
[
pckt
(
n
,:),
len_s
]=
recv
(
rcv_sck
,
60
);
% buffer must be greater that the packet
size
end
Note: This script is intended only for test purposes. It is not suitable for real-time measurements.