Skip to content

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

@amgross

Description

@amgross

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:

retVal = underlyingReceive((uint8_t *)&h, sizeof(h));

ret = underlyingSend((uint8_t *)&h, sizeof(h));

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

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

Additional context

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions