tcpip_write
>Psychtoolbox>PsychHardware>iViewXToolbox>tcp_udp_ip>tcpip
unsent = tcpip_write(fid, arg2, arg3, . . .)
unsent = tcpip_write(str, arg2 . . .)
fid is file id number returned from tcpip_open.
arg2, arg2 Arrays of any type to send throw
str char array must be first argument if fid
is not the first. Chould be str=’’
unsent is returned string with usent charecters.
On success an empty char array is returned.
Outputs arrays to tcpip channel. All variables is sent as the
datatype it is but in network byte order. Notice that a char
array is sent as one data byte per matlab char.
If first argument is a scalar double it’s used as file id.
If a char array is given as first argument then last used
fid (current) is used.
Usually all character is sent but if their is trouble only
some or no character is sent, non sent characters is returned.
NOTE: changed from version 1.0 to 1.1 of tcpip toolbox.
EXAMPLE 1:
V=23;
tcpip_write(fid,V);
Sends V as double to tcpip connection in network byte order.
EXAMPLE 2:
V=’Hello World!’;
tcpip_write(fid,V);
Sends text string as array of bytes to tcpip connection;
EXAMPLE 3:
V=uint16([1 3 0 1024]);
tcpip_write(fid,V);
Sends 4 uint16 to tcpip connection in network byte order;
Psychtoolbox/PsychHardware/iViewXToolbox/tcp_udp_ip/tcpip/tcpip_write.m