I read the rx_streaming_samples.cc that in opeartor() of
file_writer_16sc
and file_writer_32fc, samples are copied to an array host_items and then
write to file from this array. But why not just write to file from the
*items pointer?
Hanwen,
Because data coming across from the USRP2 is in network order
(big-endian), it must be converted to the proper endianness for the
host. If you look in copiers.cc you’ll see the
copy_u2_16sc_to_host_16sc and copy_u2_16sc_to_host_32fc use the ntoh
(network to host) functions to ensure the conversion is done (if
needed).
Doug