Open qclzdh opened 2 years ago
@qclzdh request-response does not support a user-header since it already uses that portion of the chunk for it's own header. This means the segmentation must be done by the user on the user-payload portion of the chunk
@elBoberido Thanks, if there is no smart way, i will pack them together. It looks a little ugly, but should work well.
@elBoberido is there any limitation about payloadAlignment, for example payloadSize % payloadAlignment must equal to 0 ?
@qclzdh it's not the most convenient solution but should work. If there is a big demand for a user-header with request-response we can think of extending the API but it might become quite complex on the implementation side
@elBoberido is there any limitation about payloadAlignment, for example payloadSize % payloadAlignment must equal to 0 ?
@qclzdh yes, the assumption was that the payload will contain a struct and therefore the same restrictions apply
@qclzdh it's not the most convenient solution but should work. If there is a big demand for a user-header with request-response we can think of extending the API but it might become quite complex on the implementation side
Yes, userHeader is mandatory, please consider to extend the API.
@qclzdh @elBoberido I've not come to a final conclusion, but my feeling is the custom user header could also be helpful for rmw_iceoryx
, see here: https://github.com/ros2/rmw_iceoryx/pull/84
From a user point view, a custom user header would be much more helpful, it's better to support this kind of feature.
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
it is very easy to wrap by using iox untyped_publisher funtions, since loan functions of untyped_publisher has "head" paramter.
and i can easily wrap like this,
but how do i use customer header and untyped payload in request/response, it looks like request/response header size is fixed