No just add 'intelToHost_XX()' or 'HostToIntel' functions for reading data, or writing data. Then a host sensitive reader would have these defined appropriately for the endianness of the host.
This is definitely the way to go. I have written the intel_to_host functionality. I will do as Eric proposed and write a sink and source block which takes care of this, unless someone comes up with it first.
This is done all the time throughout the networking code.
Obvious example. Should of thought of that first. ;-)
Obviously if the files are never going to be seen outside the particular host, it doesn't matter.
This is also right, but I guess I came across it since I do not have a method on my mac of acquiring source data. Therefore I looked at what people had made available. Being able to share data across platforms is definitely meaningful even if at this point in gnuradio it seems a minor one since it seems most people using gnuradio use their own methods of generating/acquiring signals. Da know, addressing endianness could be taken for granted but it may bite back later. Thanks, Josh On 8/18/06, John Clark <[EMAIL PROTECTED]> wrote:
Josh Jennings schrieb: > > As far as I know, one would need to make an endian sniffer which would > either read a header in the file or decide on its own how to > read/convert the file. No just add 'intelToHost_XX()' or 'HostToIntel' functions for reading data, or writing data. Then a host sensitive reader would have these defined appropriately for the endianness of the host. This is done all the time throughout the networking code. Perhaps to make it more efficient, 'Intel_Array_To_Host', or 'Host_Array_To_Intel' would allow for converting chunks of data from the file format to the host format. Obviously if the files are never going to be seen outside the particular host, it doesn't matter. The alternative would be to format data al la a 'IFF' chunk... if there is a float or double format for such... John Clark
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio