opened
SkypLabs
username_0
Hi,

First of all, thank you for your work. Your library is all I needed.

However, since the reception is done by a single pass operation, when should we use the 'yahdlc_get_data()' function on our receiving buffer knowing that the payload of an HDLC frame has a variable length ? In my case, I use an UART interruption which adds each single byte received in a buffer.

In addition, it could be nice if you find the time to add an example of use in your README file.

Many thanks in advance.
Few questions about the way to intagrate your library
issue
created
jeppefrandsen
username_1
Hi,

Thank you for your request.

I will try to find some time in the nearest future for updating the README. But the idea is to call yahdlc_get_data() whenever you have received one or more bytes on the UART (some UARTs have e.g. a 16 bytes FIFO). The function will return how many bytes should be discarded from the source buffer and start to disassemble the HDLC frame into the destination buffer. 

Whenever a complete frame has been received (which can be of variable length since the buffer size is not specified by yahdlc) the yahdlc_get_data() function will return a positive size like the read() function.

If you have more questions just let me know but will try to get the README updated soon. Thanks.

Kind Regards,
Jeppe
comment
created
jeppefrandsen
username_1
Hi again,

You can try to have a look at the yahdlcTestGetDataFromMultipleBuffers test case until I get the README updated.

Kind Regards,
Jeppe
comment
created
SkypLabs
username_0
Hi Jeppe,

Thank you for your explanations. I had the time to read your library's code and to test it and it works well.

Kind Regards,
Paul
comment
closed
jeppefrandsen
username_1
issue
created
jeppefrandsen
username_1
Hi Skyper,

Sounds good. I will work on the README file.

Kind Regards,
Jeppe
comment