0

I have to user set parameters in the grc gui and I need to multiply them to set the output vector length of my block. I cannot figure out how to do this in the grc xml file. I have tried looking at cheetah documentation but it has no examples of multiplying two parameters.

I have tried using the cheetah $ and * but does not work.

 <?xml version="1.0"?>
    <block>
    <name>vectors_to_vector</name>
    <key>cognitive_rcvr_vectors_to_vector</key>
    <category>[cognitive_rcvr]</category>
    <import>import cognitive_rcvr</import>
    <make>cognitive_rcvr.vectors_to_vector($input_vlen, $num_vectors)</make>

    <param>
    <name>input_vlen</name>
    <key>input_vlen</key>
    <type>int</type>
    </param>
    <param>
    <name>num_vectors</name>
    <key>num_vectors</key>
    <type>int</type>
    </param>
    <param>
    <name>out_length</name>
    <key>out_length</key>
    <type>int</type>
  </param>
  <sink>
    <name>in</name>
    <type>complex</type>
    <vlen>$input_vlen</vlen>
    <nports>$num_vectors</nports>
  </sink>
  <source>
    <name>out</name>
    <type>complex</type>
    <vlen>$out_length</vlen>
  </source>
  </block>

I want out to have vlen of input_vlen*num_vectors instead of having to have a user filled out_length.

1 Answers1

0

Maybe you should try adding () after the variable name like this: $num_vectors()