Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ generation with busports broken #7069

Open
marcusmueller opened this issue Jan 8, 2024 · 0 comments
Open

C++ generation with busports broken #7069

marcusmueller opened this issue Jan 8, 2024 · 0 comments
Assignees
Labels
C++ Generation codegen Relating to automatic code generation GRC medium

Comments

@marcusmueller
Copy link
Member

What happened?

#7067 fixes Python, but C++ doesn't work so far

System Information

main v3.11.0.0git-632-g148a1091 (Python 3.11.6)

GNU Radio Version

3.11-git (main)

Specific Version

v3.11.0.0git-632-g148a1091 (Python 3.11.6)

Steps to Reproduce the Problem

Generation fails for:

cppgen_bus

https://gist.github.com/marcusmueller/5cd33ac2f6cf752049ddf7a50b7bc974

Relevant log output

Generating: "/home/marcus/src/reproductions/cppgen/busports"
>>> Warning: This flow graph may not have flow control: no audio or RF hardware blocks found. Add a Misc->Throttle block to your flow graph to avoid CPU congestion.
Generate Error: 'CppTopBlockGenerator' object has no attribute 'get_parent_by_type'
>>> Failure
Traceback (most recent call last):
  File "/home/marcus/.usrlocal/lib64/python3.11/site-packages/gnuradio/grc/gui/Application.py", line 758, in _handle_action
    generator.write()
  File "/home/marcus/.usrlocal/lib64/python3.11/site-packages/gnuradio/grc/core/generator/cpp_top_block.py", line 101, in write
    for filename, data in self._build_cpp_header_code_from_template():
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/marcus/.usrlocal/lib64/python3.11/site-packages/gnuradio/grc/core/generator/cpp_top_block.py", line 162, in _build_cpp_header_code_from_template
    connections=self._connections(),
                ^^^^^^^^^^^^^^^^^^^
  File "/home/marcus/.usrlocal/lib64/python3.11/site-packages/gnuradio/grc/core/generator/cpp_top_block.py", line 495, in _connections
    connection = fg.parent_platform.Connection(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/marcus/.usrlocal/lib64/python3.11/site-packages/gnuradio/grc/gui/canvas/connection.py", line 39, in __init__
    super(self.__class__, self).__init__(*args, **kwargs)
  File "/home/marcus/.usrlocal/lib64/python3.11/site-packages/gnuradio/grc/core/Connection.py", line 56, in __init__
    param_factory = self.parent_platform.make_param
                    ^^^^^^^^^^^^^^^^^^^^
  File "/home/marcus/.usrlocal/lib64/python3.11/site-packages/gnuradio/grc/core/utils/descriptors/_lazy.py", line 48, in __get__
    value = self.func(instance)
            ^^^^^^^^^^^^^^^^^^^
  File "/home/marcus/.usrlocal/lib64/python3.11/site-packages/gnuradio/grc/core/base.py", line 108, in parent_platform
    return self.get_parent_by_type(Platform)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/marcus/.usrlocal/lib64/python3.11/site-packages/gnuradio/grc/core/base.py", line 103, in get_parent_by_type
    return parent.get_parent_by_type(cls)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'CppTopBlockGenerator' object has no attribute 'get_parent_by_type'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C++ Generation codegen Relating to automatic code generation GRC medium
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant