Skip to content

Arduino Giga Wifi R1: data types limitation on RPC #971

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

Closed
njadNissi opened this issue Oct 4, 2024 · 2 comments
Closed

Arduino Giga Wifi R1: data types limitation on RPC #971

njadNissi opened this issue Oct 4, 2024 · 2 comments

Comments

@njadNissi
Copy link

Problem case:

Hello guys, I have 10 sensors that I am reading with analogRead and storing in int data[10] on M4. I need to declare and bind a function on M4 that can return either a String (concatenated values separated by commas) or directly the array of integers onto M7.

Issue:

I have tested all other data types as return types for the function to be bound in RPC and apart from int, float and char, any other is not working. Is there any way to overcome this?

expecting a postive response. thanks

@facchinm
Copy link
Member

facchinm commented Oct 4, 2024

Hi @njadNissi , standard c++ containers are supported, so you can push the values in a std::vector<int> and use it as return value for the serving RPC function.
Let me know if it works fine 🙂

@njadNissi
Copy link
Author

It works just fine. thanks a lot

@facchinm facchinm closed this as completed Oct 7, 2024
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

2 participants