AnsweredAssumed Answered

Write floats to the buffer

Question asked by raquel_machado on Feb 25, 2014
Latest reply on Feb 28, 2014 by mhennerich

Hello,

 

I am working on a code that uses the lib_iio_cmdsrv library to send/receive data to/from the FMCOMMS1 board, and I am having a hard time understanding the data types manipulation, especially for the iio_cmd_bufwrite function. I understand that the function writes each byte at a time to the buffer (with a char datatype), but what happens when someone would like to send a float, for example? Simply separating the four bytes maintains data consistency? What would be the best way to proceed in this situation?

 

Thanks.

Outcomes