-
Notifications
You must be signed in to change notification settings - Fork 61
Support dynamic payload types as request and response payload type #690
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
Comments
This is exactly what I am going to ask for! |
@zachary0101 Do you require this feature with a C++ language binding, or can you use Rust? struct Temp {
data: [u8; 1024]
} As soon as the slice API is available, you could then switch to Our Roadmap for this feature is that we are currently working on it with the highest priority. So the next things that will be merged into iceoryx2:
|
Thanks for your quick reply! So, on 3rd of May you will release v0.6 with basic request/response feature but without the slice API, right? |
Here a quick path to unblock you: In the beginning you use this implementation // the generic parameter allows you to change the size at least at compile time
struct Data<const N: usize> {
data: [u8; N],
}
let node = NodeBuilder::new().create::<ipc::Service>()?;
let service = node
.service_builder(&"My/Funk/ServiceName".try_into()?)
// substitute 1024 with whatever number you require
.request_response::<Data<1024>, Data<1024>>()
.open_or_create()?; With the member When the slice API/Dynamic Data is available, you just need to refactor the type and the loan API let service = node
.service_builder(&"My/Funk/ServiceName".try_into()?)
// substitute 1024 with whatever number you require
.request_response::<[u8], [u8]>()
.open_or_create()?;
let server = service
.server_builder()
// and provide an optional hint and allocation strategy when creating a client or a server, these are just lines that need to be added
.initial_max_slice_len(1024)
.allocation_strategy(AllocationStrategy::PowerOfTwo)
.create()?; So as you see, the refactoring is minimal, and with the non-dynamic data types, you are already pretty close to what you need.
I would say the latest is on the 24th of May. The heavy lifting is already done, so I suspect that we might finish dynamic memory and slices even earlier.
In general, it is possible if you have a support contract. See the iceoryx2 main readme at the bottom for commercial support. In this case, we already have a sponsor who paid for that priority. For the future, it might be interesting for you to get in touch - this is how the open-source project is financed - and it would ensure that our Roadmap aligns with your requirements. Additionally, there are also commercial extensions and tooling. |
@elfenpiff Thanks for your detailed explanation. I think the workaround you provide is good enough for me at present. If we need commercial support in the future, I will discuss it with my leader. ;) |
FYI @zachary0101 as it turns out, we need the slice API to implement the C/C++ language binding. So we have to exchange the order of 2 and 4. |
@elfenpiff I'm glad to hear that. Looking forward for the code. ;) |
…in server and client
…and active request
@zachary0101 it is merged. The only thing missing is a nice user example but the code is already documented. |
…mple [#690] dyn request response example
@elfenpiff Thanks a lot. I'll try it today. |
Brief feature description
Currently, request response only supports static data types. It shall support dynamic payload types like publish subscribe. Therefore, we require
client.rs
andserver.rs
The text was updated successfully, but these errors were encountered: