discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Read file metadata


From: Tom Rondeau
Subject: Re: [Discuss-gnuradio] Read file metadata
Date: Thu, 14 Apr 2016 09:57:27 -0400

On Thu, Apr 14, 2016 at 7:44 AM, Yan Huang <address@hidden> wrote:

Hi all,

 

I’m using Message Strobe to control UHD: USRP Source to receive signal with specified frequency(2.4GHz), but I find flow graph start running before Message Strobe set the frequency as 2.4 GHz.

 

Message Strobe -> UHD: USRP Source ->File Sink

 

So I want to use stream tag to know the time of first item with 2.4GHz. I think I can change File Sink to File Meta Sink to receive the ‘rx_time’ stored in ‘tag_sense1.hdr’ file(attached), and I use the existing program called ‘gr_read_file_metadata’ to read out the header information, but it comes out an error:

 

File "tag_sense1.hdr", line 1

SyntaxError: Non-ASCII character '\xb5' in file tag_sense1.hdr on line 2, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details

 

I have checked the link, but I don’t understand what’s the encoding information of the python source file. Do need to add # -*- coding: <encoding name> -*- to the source file?

 

I problems are:

 

1.       How can I read the’ .hdr’ file?

2.       Am I right to use file meta sink to get the start receiving time?

3.       Do I need to add stream tag and then read it out using other blocks in this scenario?

 

Any advice will be appreciated. Many thanks in advance.

 

Best Regards,

 

Yan



Yan,

Have you fully read over the description of the metadata files and how to use them in the manual? 

http://gnuradio.org/doc/doxygen/page_metadata.html

Specifically, since you have a .hdr file, you've set this into Detached mode. You'll need to use the -D flag to indicate that to gr_read_file_metadata.

Tom


reply via email to

[Prev in Thread] Current Thread [Next in Thread]