How can I efficiently handle binary data in UDP packets using instrument control toolbox?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I am reading binary packets using the instrument control toolbox's udp object. My plan is to read the full packet as binary data and use typecast to modify the data to other types as necessary. matlab/fread supports specifying the precision with an asterisk to indicate that the output should use the same format as the input (i.e. '*uint8' means read 8-bit values and return 8-bit values instead of converting each 8-bit value to double), but instrument/fread does not. The documentation says 'By default, numeric values are returned in double-precision arrays.'
Is there some way to specify a different return type for instrument/fread? Or do I really have to receive doubles and then convert them back to the desired type? (My guess is that bit would be a performance killer.)
matlab/fread also supports 'machinefmt'. Is there a way to take advantage of that with instrument/fread?
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Instrument Control Toolbox Supported Hardware en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!