configureCallback
Set callback function and trigger condition for communication with UDP socket
Syntax
Description
configureCallback(
sets the callback function u,"terminator",callbackFcn)callbackFcn to trigger whenever a terminator
is available to be read from the specified UDP socket. u must be a
byte-type udpport object. This syntax sets the
BytesAvailableFcnMode property of u to
"terminator", and the BytesAvailableFcn property
to callbackFcn.
You set the terminator string with the configureTerminator function.
configureCallback(
sets the callback function u,"byte",count,callbackFcn)callbackFcn to trigger whenever a new
count number of bytes are available to be read. u
must be a byte-type udpport object. This syntax sets the
BytesAvailableFcnMode property of u to
"byte", the BytesAvailableFcnCount property to
count, and the BytesAvailableFcn property to
callbackFcn.
configureCallback(
sets the callback function u,"datagram",count,callbackFcn)callbackFcn to trigger whenever a new
count number of datagrams are available to be read.
u must be a datagram-type udpport object. This
syntax sets the DatagramsAvailableFcnMode property of
u to "datagram", the
DatagramsAvailableFcnCount property to count,
and the DatagramsAvailableFcn property to
callbackFcn.
configureCallback( turns off
callbacks. This syntax sets the u,"off")BytesAvailableFcnMode or
DatagramsAvailableFcnMode property of u to
"off".
Examples
Input Arguments
Version History
Introduced in R2020b