In rx_streaming_samples.cc, why use host_items for storing samples?

Hi Eric,

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

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

On Fri, Sep 11, 2009 at 6:51 AM, hanwen [email protected] wrote:

Discuss-gnuradio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Doug G.
[email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs