eclipse-iceoryx / eclipse-iceoryx/iceoryx
how to use userheader in the untyped request/response
- Dominant language
- C++
- Stars
- 2.2k
- Forks
- 492
- Avg merge
- 18h 57m
- Merged PRs (30d)
- 1
Description
If i have a common IPC send function as following code, parameter msgPayload is untyped, it may changed according some other conditions, and paramter cnt is the number of msgPayload, so the total size i want to send is header + sizeof(msgPayload) * count
```
bool sendBroadcast(
const msgHeader& header,
const msgPayload* payload,
const uint32_t& cnt)
```
it is very easy to wrap by using iox untyped_publisher funtions, since loan functions of untyped_publisher has "head" paramter.
```
loan(const uint32_t userPayloadSize,
const uint32_t userPayloadAlignment = iox::CHUNK_DEFAULT_USER_PAYLOAD_ALIGNMENT,
const uint32_t userHeaderSize = iox::CHUNK_NO_USER_HEADER_SIZE,
const uint32_t userHeaderAlignment = iox::CHUNK_NO_USER_HEADER_ALIGNMENT)
```
and i can easily wrap like this,
```
loan(sizeof(msgPayload) * cnt, alignof(msgPayload), sizeof(msgHeader), alignof(msgHeader));
```
but how do i use customer header and untyped payload in request/response, it looks like request/response header size is fixed
```
cxx::expected UntypedClientImpl::loan(const uint32_t payloadSize,
const uint32_t payloadAlignment) noexcept
cxx::expected UntypedServerImpl::loan(const RequestHeader* const requestHeader,
const uint32_t payloadSize,
const uint32_t payloadAlignment) noexcept
```
Contributor guide
Research direction
Start with the untyped request/response loan entry points named in the issue: UntypedClientImpl::loan and UntypedServerImpl::loan. Trace how request and response headers are allocated and used, then document whether a custom header can be supplied with an untyped payload and what the supported alternative or limitation is.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- api, distributed-systems
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100