Problems creating my own GRC blocks

Hi Guys,

I am trying to add my own block to GRC for Doppler correction. To be
honest, the code itself is a very simple python UDP Client that talks
to predict.

The code itself works fine, and talks to predict. So I decided to
create a block for GRC. This is the XML for the block:

<?xml version="1.0"?> Predict Doppler get_doppler Misc from predict get_doppler predict.get_doppler($predhost, $predport, $satellite) Host localhost predhost string Port predport 1210 int Satellite satellite string out float

However, I get the following when starting GRC:

Warning: Block validation failed:

/home/iain/.grc_gnuradio/predict.xml:2:0:ERROR:VALID:DTD_NOT_PCDATA:
Element block was declared #PCDATA but contains non text nodes
/home/iain/.grc_gnuradio/predict.xml:4:0:ERROR:VALID:DTD_UNKNOWN_ELEM:
No declaration for element key
/home/iain/.grc_gnuradio/predict.xml:5:0:ERROR:VALID:DTD_UNKNOWN_ELEM:
No declaration for element category
/home/iain/.grc_gnuradio/predict.xml:6:0:ERROR:VALID:DTD_UNKNOWN_ELEM:
No declaration for element import
/home/iain/.grc_gnuradio/predict.xml:7:0:ERROR:VALID:DTD_UNKNOWN_ELEM:
No declaration for element make
/home/iain/.grc_gnuradio/predict.xml:8:0:ERROR:VALID:DTD_UNKNOWN_ELEM:
No declaration for element param
/home/iain/.grc_gnuradio/predict.xml:10:0:ERROR:VALID:DTD_UNKNOWN_ELEM:
No declaration for element value
/home/iain/.grc_gnuradio/predict.xml:11:0:ERROR:VALID:DTD_UNKNOWN_ELEM:
No declaration for element key
/home/iain/.grc_gnuradio/predict.xml:12:0:ERROR:VALID:DTD_UNKNOWN_ELEM:
No declaration for element type
/home/iain/.grc_gnuradio/predict.xml:14:0:ERROR:VALID:DTD_UNKNOWN_ELEM:
No declaration for element param
/home/iain/.grc_gnuradio/predict.xml:16:0:ERROR:VALID:DTD_UNKNOWN_ELEM:
No declaration for element key
/home/iain/.grc_gnuradio/predict.xml:17:0:ERROR:VALID:DTD_UNKNOWN_ELEM:
No declaration for element value
/home/iain/.grc_gnuradio/predict.xml:18:0:ERROR:VALID:DTD_UNKNOWN_ELEM:
No declaration for element type
/home/iain/.grc_gnuradio/predict.xml:20:0:ERROR:VALID:DTD_UNKNOWN_ELEM:
No declaration for element param
/home/iain/.grc_gnuradio/predict.xml:22:0:ERROR:VALID:DTD_UNKNOWN_ELEM:
No declaration for element value
/home/iain/.grc_gnuradio/predict.xml:23:0:ERROR:VALID:DTD_UNKNOWN_ELEM:
No declaration for element key
/home/iain/.grc_gnuradio/predict.xml:24:0:ERROR:VALID:DTD_UNKNOWN_ELEM:
No declaration for element type
/home/iain/.grc_gnuradio/predict.xml:26:0:ERROR:VALID:DTD_UNKNOWN_ELEM:
No declaration for element source
/home/iain/.grc_gnuradio/predict.xml:28:0:ERROR:VALID:DTD_UNKNOWN_ELEM:
No declaration for element type
Ignoring: /home/iain/.grc_gnuradio/predict.xml

While googling, I only found one reference to this (back in 2009), and
that suggested that I needed a callback, even if it was empty, so I
added it, but to no avail.

I’ve compared my block to the others bundled with GRC, and can’t see
anything that stands out. I’ve also updated to the latest git, but
still no luck (Previous was from sometime around Christmas/New Year)

Anyone have any ideas on what I’ve missed ?

Thanks in Advance & Best Regards

Iain

On 01/23/2011 05:09 AM, Iain Young, G7III wrote:

Predict Doppler get_doppler Misc from predict get_doppler

it has to validate block.dtd, the … should be after

-Josh

Hey Josh,

First, Thanks for the reply. You Wrote:

On 23/01/11 19:46, Josh B. wrote:

<?xml version="1.0"?> Predict Doppler get_doppler Misc from predict get_doppler

it has to validate block.dtd, the… should be after…

I just tried that, no change unfortunately. Is that all I’ve missed, or
is there something equally obvious and silly ?

Best Regards

Iain

On Sun, Jan 23, 2011 at 08:20:33PM +0000, Iain Young, G7III wrote:

<category>Misc</category>
<import>from predict get_doppler</import>
<callback></callback>

it has to validate block.dtd, the… should be after…

I just tried that, no change unfortunately. Is that all I’ve missed, or
is there something equally obvious and silly ?

Hi Iain,

I had a very similar (might have been the same) problem just recently.
Did you create your XML file by copy & pasting from another? That’s
what caused my problems, although I don’t know why exactly (the original
file worked).
In the end, I identified the XML-segment which was causing the troubles
by commenting it out and rewrote it by hand, and then it worked. Pretty
braindead solution, I know.

Bye,
MB


Karlsruhe Institute of Technology (KIT)
Communications Engineering Lab (CEL)

Dipl.-Ing. Martin B.
Research Associate

Kaiserstraße 12
Building 05.01
76131 Karlsruhe

Phone: +49 721 608-43790
Fax: +49 721 608-46071
www.cel.kit.edu

KIT – University of the State of Baden-Württemberg and
National Laboratory of the Helmholtz Association

Hi Iain,

first of all my apologies for my bad English.

I had the same problem with GNURadio.Rewriting didn’t work for me.
I fixed it by coping the part that was copied to another place in the
file.
I had three params in the file the last param was the last edit to the
file and then I got the error.
when I placed the last param between the first and second param it
worked.

greetings,
-Nimsi