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

Port with Return Type Not Autocoded Correctly #48

Closed
brh68 opened this issue Jun 8, 2019 · 8 comments
Closed

Port with Return Type Not Autocoded Correctly #48

brh68 opened this issue Jun 8, 2019 · 8 comments

Comments

@brh68
Copy link

brh68 commented Jun 8, 2019

I am trying to make a port that has a return type, and have put the return type in the port definition XML. However, when I make a component that uses this port and should return a value, the impl files are generated with the associated function having a return type of void. This causes the compile error below when I rebuild, and makes sense since there doesn't seem to be a way signify a return type in component XML.
ReturnTypeMismatchError
Do I have to manually chance the return types of the Impl files, or is there something else I can do to fix this through the autocoder?

@brh68 brh68 changed the title Port with Return Type Port with Return Type Not Autocoded Correctly Jun 8, 2019
@timcanham
Copy link
Collaborator

What type of port did you define it as? (sycn, async, guarded?)

@brh68
Copy link
Author

brh68 commented Jun 9, 2019

Synchronous Input

@brh68
Copy link
Author

brh68 commented Jun 10, 2019

I put it in a repository after moving things around, so the errors have changed slightly:
returnTypeError
Here is the repository:
https://github.com/brh68/Cislunar-Flight-Software/tree/peripherals

@LeStarch
Copy link
Collaborator

Did you remake make impl and then copy over the new template files?

@brh68
Copy link
Author

brh68 commented Jun 10, 2019

The problem remains after I rerun make impl.

@brh68
Copy link
Author

brh68 commented Jun 11, 2019

I manually changed the return types of the functions in the impl files, which seems to work.

@LeStarch
Copy link
Collaborator

We'll still need to test for this bug before closing out the issue. Thanks for the report.

@LeStarch
Copy link
Collaborator

LeStarch commented Mar 3, 2020

Reviewing this issue, this is expected behavior.

We don't automatically update the impl files, as we do not want to clobber outstanding work that the user has done.

Once the implementation generator is run, the user owns the files and must manually update or manually regenerate (and move from the _template outputs).

@LeStarch LeStarch closed this as completed Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants