arduino / arduino/ArduinoCore-mbed

Parameter type enhancements for strings

Open
#961 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
411
Forks
225
PR merge metrics
No merged PRs in 30d

Description

I have a rather basic need to pass strings in between the cores via RPC, which actually represent a JSON.

I know those changes are probably meant in other repositories, but the use-case is in the context of `RPC`.

```
/Users/razvan/Library/Arduino15/packages/arduino/hardware/mbed_portenta/4.1.5/libraries/rpclib/src/rpc/msgpack/v1/object.hpp:213:7:
error: 'class arduino::String' has no member named 'msgpack_unpack'
v.msgpack_unpack(o.convert());
~~^~~~~~~~~~~~~~
```
and
```
/Users/razvan/Library/Arduino15/packages/arduino/hardware/mbed_portenta/4.1.5/libraries/rpclib/src/rpc/msgpack/v1/object.hpp:213:7:
error: request for member 'msgpack_unpack' in 'v', which is of non-class type 'const char'
v.msgpack_unpack(o.convert());
~~^~~~~~~~~~~~~~
```

It compiles with `std::string` tho.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the RPC MessagePack conversion path at rpc/msgpack/v1/object.hpp, especially the msgpack_unpack call shown in the compiler errors. Reproduce the failures for arduino::String and const char, then compare them with the std::string case. Done means the requested string parameters can be passed through RPC without these compilation errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
embedded-iot
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.