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: Yan Huang
Subject: Re: [Discuss-gnuradio] Read file metadata
Date: Thu, 14 Apr 2016 15:33:34 +0000

Hi Tom,

 

Thank you for your kind remind, I find the problem that I stored the metadata file as inline type and I don’t need to add ‘.hdr’ with it.

 

Many Thanks,

Yan

 

 

From: address@hidden [mailto:address@hidden On Behalf Of Tom Rondeau
Sent: 14 April 2016 14:57
To: Yan Huang
Cc: address@hidden
Subject: Re: [Discuss-gnuradio] Read file metadata

 

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? 

 

 

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

 



This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please send it back to me, and immediately delete it. 

Please do not use, copy or disclose the information contained in this
message or in any attachment.  Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham.

This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system, you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation.

reply via email to

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