# CC encoder definition (variable\_cc\_encoder\_def)

**URL:** <https://www.ruby-forum.com/t/cc-encoder-definition-variable-cc-encoder-def/232398>\
**Category:** GNU Radio\
**Created:** [October 7, 2014, 4:23pm UTC](https://www.ruby-forum.com/t/cc-encoder-definition-variable-cc-encoder-def/232398 "2014-10-07T16:23:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [October 7, 2014, 4:23pm UTC](https://www.ruby-forum.com/t/cc-encoder-definition-variable-cc-encoder-def/232398/1 "2014-10-07T16:23:58Z")

</div>

Dear All,

I am trying to get the latest gr-fec code running in an older version of  
GNU Radio. I know this sounds like a terrible idea, and I don’t expect  
any sympathy but there is a reason why we can’t upgrade to the newest  
GNU Radio, due to some legacy issues.

If you are still reading…

I can’t get the CC Encoder Definition block to appear in GNU Radio, we  
are using 3.7.2. I have copied the whole of the gr-fec folder from the  
latest install including the grc folder which contains  
‘variable\_cc\_encoder\_def\_list.xml’. Is there something else  
fundamentally missing from older version of GNU Radio to support this  
kind of definition block?

Thanks!

David

* * *

David Halls Ph.D.  
Research Engineer  
Toshiba Research Europe Limited  
32 Queen Square, Bristol, BS1 4ND, UK  
Tel: +44 (0) 117 906 0790

* * *

NOTE: The information in this email and any attachments may be  
confidential and/or legally privileged. This message may be read, copied  
and used only by the intended recipient. If you are not the intended  
recipient, please destroy this message, delete any copies held on your  
system and notify the sender immediately.

Toshiba Research Europe Limited, registered in England and Wales  
(2519556). Registered Office 208 Cambridge Science Park, Milton Road,  
Cambridge CB4 0GZ, England. Web: www.toshiba.eu/research/trl

---

<div class="post-metadata">

**Author:** ![divotdave](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bbe5ce/32.png) [@divotdave](https://www.ruby-forum.com/u/divotdave)\
**Post date:** [October 7, 2014, 4:42pm UTC](https://www.ruby-forum.com/t/cc-encoder-definition-variable-cc-encoder-def/232398/2 "2014-10-07T16:42:05Z")

</div>

The problem appears to be using \<var\_make\> and \<var\_value\> in the xml  
files.

Presumably this is a new(ish) additional functionality in GNU Radio,  
which my old version can’t parse?

From: discuss-gnuradio-bounces+david.halls=removed\_email\_address@domain.invalid  
[[mailto:discuss-gnuradio-bounces+david.halls=removed\_email\_address@domain.invalid](mailto:discuss-gnuradio-bounces+david.halls=removed_email_address@domain.invalid)]  
On Behalf Of David Halls  
Sent: 07 October 2014 15:21  
To: removed\_email\_address@domain.invalid  
Subject: [Discuss-gnuradio] CC encoder definition  
(variable\_cc\_encoder\_def)

Dear All,

I am trying to get the latest gr-fec code running in an older version of  
GNU Radio. I know this sounds like a terrible idea, and I don’t expect  
any sympathy but there is a reason why we can’t upgrade to the newest  
GNU Radio, due to some legacy issues.

If you are still reading…

I can’t get the CC Encoder Definition block to appear in GNU Radio, we  
are using 3.7.2. I have copied the whole of the gr-fec folder from the  
latest install including the grc folder which contains  
‘variable\_cc\_encoder\_def\_list.xml’. Is there something else  
fundamentally missing from older version of GNU Radio to support this  
kind of definition block?

Thanks!

David

* * *

David Halls Ph.D.  
Research Engineer  
Toshiba Research Europe Limited  
32 Queen Square, Bristol, BS1 4ND, UK  
Tel: +44 (0) 117 906 0790

* * *

NOTE: The information in this email and any attachments may be  
confidential and/or legally privileged. This message may be read, copied  
and used only by the intended recipient. If you are not the intended  
recipient, please destroy this message, delete any copies held on your  
system and notify the sender immediately.

Toshiba Research Europe Limited, registered in England and Wales  
(2519556). Registered Office 208 Cambridge Science Park, Milton Road,  
Cambridge CB4 0GZ, England. Web:  
www.toshiba.eu/research/trl[http://www.toshiba.eu/research/trl](http://www.toshiba.eu/research/trl)

* * *

This email has been scanned for email related threats and delivered  
safely by Mimecast.  
For more information please visit [http://www.mimecast.com](http://www.mimecast.com)

* * *

* * *

NOTE: The information in this email and any attachments may be  
confidential and/or legally privileged. This message may be read, copied  
and used only by the intended recipient. If you are not the intended  
recipient, please destroy this message, delete any copies held on your  
system and notify the sender immediately.

Toshiba Research Europe Limited, registered in England and Wales  
(2519556). Registered Office 208 Cambridge Science Park, Milton Road,  
Cambridge CB4 0GZ, England. Web: www.toshiba.eu/research/trl

---

<div class="post-metadata">

**Author:** ![divotdave](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bbe5ce/32.png) [@divotdave](https://www.ruby-forum.com/u/divotdave)\
**Post date:** [October 7, 2014, 5:28pm UTC](https://www.ruby-forum.com/t/cc-encoder-definition-variable-cc-encoder-def/232398/3 "2014-10-07T17:28:49Z")

</div>

On Tue, Oct 7, 2014 at 10:40 AM, David Halls  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> The problem appears to be using \<var\_make\> and \<var\_value\> in the xml  
> files.
> 
> Presumably this is a new(ish) additional functionality in GNU Radio, which  
> my old version can’t parse?

Yes, those are new in 3.7 (3.7.4, I think but would have to check to  
verify). It’s a way of letting us build objects within GRC and use them  
as  
such in other areas of the flowgraph. So you can define an FEC variable  
and  
call methods on it, like cc.K() to get the CC’s constraint length.

You can probably remove these from the .xml files and lose that  
functionality. It’s a nice convenience but not necessary. You can  
replace  
it by having another variable, say for K, and use that in any place you  
might require it instead of pulling it straight from the CC variable  
itself.

Tom

---

<div class="post-metadata">

**Author:** ![divotdave](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bbe5ce/32.png) [@divotdave](https://www.ruby-forum.com/u/divotdave)\
**Post date:** [October 7, 2014, 6:10pm UTC](https://www.ruby-forum.com/t/cc-encoder-definition-variable-cc-encoder-def/232398/4 "2014-10-07T18:10:17Z")

</div>

* * *

From: removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid] on behalf of Tom  
Rondeau [removed\_email\_address@domain.invalid]  
Sent: 07 October 2014 16:27  
To: David Halls  
Cc: removed\_email\_address@domain.invalid  
Subject: Re: [Discuss-gnuradio] CC encoder definition  
(variable\_cc\_encoder\_def)

On Tue, Oct 7, 2014 at 10:40 AM, David Halls  
\<removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\>  
wrote:  
The problem appears to be using \<var\_make\> and \<var\_value\> in the xml  
files.

Presumably this is a new(ish) additional functionality in GNU Radio,  
which my old version can’t parse?

Yes, those are new in 3.7 (3.7.4, I think but would have to check to  
verify). It’s a way of letting us build objects within GRC and use them  
as such in other areas of the flowgraph. So you can define an FEC  
variable and call methods on it, like cc.K() to get the CC’s constraint  
length.

You can probably remove these from the .xml files and lose that  
functionality. It’s a nice convenience but not necessary. You can  
replace it by having another variable, say for K, and use that in any  
place you might require it instead of pulling it straight from the CC  
variable itself.

Tom

Thanks Tom, that is a useful piece of functionality indeed. I commented  
out the \<var\_make\> and \<var\_value\> and have instead

“self.$(id) = $(id) = fec.cc\_encoder\_make($framebits, $k, $rate,  
$polys, $state\_start, $mode, $padding)”

Is that OK? I can also manually create the Encoder Objects variable as

fec.cc\_encoder\_make(frame\_size\*8, k, rate, (polys), start\_state,  
fec.CC\_TERMINATED, padding)

how would I add the parallelism

(fec.cc\_encoder\_make(frame\_size_8, k, rate, (polys), start\_state,  
fec.CC\_TERMINATED, padding);fec.cc\_encoder\_make(frame\_size_8, k, rate,  
(polys), start\_state, fec.CC\_TERMINATED, padding))

or similar?

From:  
discuss-gnuradio-bounces+david.halls=removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[mailto:discuss-gnuradio-bounces+david.halls[mailto:discuss-gnuradio-bounces%2Bdavid.halls](mailto:discuss-gnuradio-bounces%2Bdavid.halls)=removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)]  
On Behalf Of David Halls  
Sent: 07 October 2014 15:21  
To: removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: [Discuss-gnuradio] CC encoder definition  
(variable\_cc\_encoder\_def)

Dear All,

I am trying to get the latest gr-fec code running in an older version of  
GNU Radio. I know this sounds like a terrible idea, and I don’t expect  
any sympathy but there is a reason why we can’t upgrade to the newest  
GNU Radio, due to some legacy issues.

If you are still reading…

I can’t get the CC Encoder Definition block to appear in GNU Radio, we  
are using 3.7.2. I have copied the whole of the gr-fec folder from the  
latest install including the grc folder which contains  
‘variable\_cc\_encoder\_def\_list.xml’. Is there something else  
fundamentally missing from older version of GNU Radio to support this  
kind of definition block?

Thanks!

David

* * *

David Halls Ph.D.  
Research Engineer  
Toshiba Research Europe Limited  
32 Queen Square, Bristol, BS1 4ND, UK  
Tel: +44 (0) 117 906 0790tel:%2B44%20(0)%20117%20906%200790

* * *

NOTE: The information in this email and any attachments may be  
confidential and/or legally privileged. This message may be read, copied  
and used only by the intended recipient. If you are not the intended  
recipient, please destroy this message, delete any copies held on your  
system and notify the sender immediately.

Toshiba Research Europe Limited, registered in England and Wales  
(2519556). Registered Office 208 Cambridge Science Park, Milton Road,  
Cambridge CB4 0GZ, England. Web:  
www.toshiba.eu/research/trl[http://www.toshiba.eu/research/trl](http://www.toshiba.eu/research/trl)

* * *

This email has been scanned for email related threats and delivered  
safely by Mimecast.  
For more information please visit [http://www.mimecast.com](http://www.mimecast.com)

* * *

* * *

NOTE: The information in this email and any attachments may be  
confidential and/or legally privileged. This message may be read, copied  
and used only by the intended recipient. If you are not the intended  
recipient, please destroy this message, delete any copies held on your  
system and notify the sender immediately.

Toshiba Research Europe Limited, registered in England and Wales  
(2519556). Registered Office 208 Cambridge Science Park, Milton Road,  
Cambridge CB4 0GZ, England. Web:  
www.toshiba.eu/research/trl[http://www.toshiba.eu/research/trl](http://www.toshiba.eu/research/trl)

* * *

This email has been scanned for email related threats and delivered  
safely by Mimecast.  
For more information please visit [http://www.mimecast.com](http://www.mimecast.com)

* * *

* * *

Discuss-gnuradio mailing list  
removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[https://lists.gnu.org/mailman/listinfo/discuss-gnuradio](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

* * *

NOTE: The information in this email and any attachments may be  
confidential and/or legally privileged. This message may be read, copied  
and used only by the intended recipient. If you are not the intended  
recipient, please destroy this message, delete any copies held on your  
system and notify the sender immediately.

Toshiba Research Europe Limited, registered in England and Wales  
(2519556). Registered Office 208 Cambridge Science Park, Milton Road,  
Cambridge CB4 0GZ, England. Web: www.toshiba.eu/research/trl

---

<div class="post-metadata">

**Author:** ![divotdave](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bbe5ce/32.png) [@divotdave](https://www.ruby-forum.com/u/divotdave)\
**Post date:** [October 8, 2014, 5:13pm UTC](https://www.ruby-forum.com/t/cc-encoder-definition-variable-cc-encoder-def/232398/5 "2014-10-08T17:13:26Z")

</div>

On Tue, Oct 7, 2014 at 12:08 PM, David Halls  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> On Tue, Oct 7, 2014 at 10:40 AM, David Halls \<[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> call methods on it, like cc.K() to get the CC’s constraint length.  
> out the \<var\_make\> and \<var\_value\> and have instead
> 
> (fec.cc\_encoder\_make(frame\_size_8, k, rate, (polys), start\_state,  
> fec.CC\_TERMINATED, padding);fec.cc\_encoder\_make(frame\_size_8, k, rate,  
> (polys), start\_state, fec.CC\_TERMINATED, padding))
> 
> or similar?

Plus or minus syntax, yes, either way should work for you.

The parallelism is just a list, like you’ve put here or a list of lists  
if  
you’re doing multiple levels of parallelism (generally only used with  
the  
BER curve generator example).

Tom
