erpc icon indicating copy to clipboard operation
erpc copied to clipboard

[FEATURE] Read and write the message just by message buffer memory space

Open amgross opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe.

Currently there is difference between the message header and the message body, while the message header is read/write from the stack: https://github.com/EmbeddedRPC/erpc/blob/932a8aa2ef603ca52a4c37d62bb3f59a60e17c05/erpc_c/infra/erpc_framed_transport.cpp#L54 https://github.com/EmbeddedRPC/erpc/blob/932a8aa2ef603ca52a4c37d62bb3f59a60e17c05/erpc_c/infra/erpc_framed_transport.cpp#L115 the problems with it are:

  1. the send happens in two chunks, which is slower
  2. In devices that there is difference between memory regions, it may make life harder

Describe the solution you'd like

for read: read first 4 bytes to the message buffer, (and with the curser read from the buffer?) for write: In the autogenerated code, after reset the cursor, do dummy write of 4 bytes with the cursor. In FramedTransport::send write to the first 4 bytes the header (if want with the cursor, need to fix first #283 ) and send the whole message in one chunk Describe alternatives you've considered

can do just the write to the buffer in the way I described. Steps you didn't forgot to do

  • [X] I checked if there is no related issue opened/closed.
  • [X] I checked that there doesn't exist opened PR which is solving this issue.

Additional context

amgross avatar Jun 06 '22 12:06 amgross

This may impact negativelly (forbidden bytes in buffer) transports which doesn't use framedtransport features.

Hadatko avatar Jul 12 '22 14:07 Hadatko

The PR not really solved this issue. @Hadatko \ @MichalPrincNXP can you please re-open it?

amgross avatar Sep 19 '23 07:09 amgross

@MichalPrincNXP this is not yet solved. RPMSG tty is not solving this issue. Myabe it was closed automatically so i reopened it.

Hadatko avatar Sep 19 '23 07:09 Hadatko