Open orecham opened 1 month ago
Hi @orecham, I'm currently working on this feature. First, I'm trying to implement the publish subcommand. I'm using the “publish_subscribe_subscriber” example as a test endpoint. As I understand it, in order to communicate with the subscriber, I need to define a service with a specific payload size. Can I get the size of this payload and create a new service with this payload size at runtime? (Because at compile time, I don't know the payload size and the subscriber needs a payload of size)
@brosier01
Hmm, this is a tough problem to solve - something I completely overlooked when imagining this feature, my mistake.
As a first step, I guess the CLI could be made to only use the [u8]
payload type so that concrete types aren't needed. We are currently working on updating iceoryx2
so that the maximum_slice_len
does not need to be provided when defining services of type [u8]
. This however would mean that applications would also need to use the [u8]
payload type for the CLI to connect to it, which is not ideal for many reasons (usability, safety, etc.). Proceeding with this first though would allow for focusing on the other (maybe simpler) aspects of implementing the CLI.
To get the CLI to work with services with concrete types, two ideas come to mind (but I think they might definitely need some more thought):
iceoryx2
applications to compile type definitions into a separate shared library
schemars
(and serde
?) to store type descriptions along with services?
[u8]
payload types thoughLet me know if you have any other ideas. I am not yet super confident that one of these two options would be optimal. Might need some discussion before we work out what makes the most sense.
Can I get the size of this payload and create a new service with this payload size at runtime?
Until we remove the max_slice_len
requirement, you could maybe just make the size the actual size of the payload.
Brief feature description
Make it possible to publish, subscribe, notify, listen (request, respond, etc.) to iceoryx2 services directly from the CLI, e.g.
Detailed information
Nice to have: