You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently for each operation there are two possible callbacks, either with or without block transfer. However it is not always known a priori whether a block transfer callback is needed.
For example a "normal" read lwm2m_dm_read can induce a block response which triggers callbacks without block information.
I suggest having a block information structure in every callback which keeps track on the block transfer and is NULL if the callback results from a non-block transfer. Something like:
typedef struct _block_information_
{
int block_num;
int block_size;
bool block_more;
} block_information_t;
However this would break the current API, any thoughts?
The text was updated successfully, but these errors were encountered:
I think having a unifed api with an optional struct as described is much better than the current solution. The reason I didn't do something like that when I implemented block transfer was that I didn't wanted to break the current api, but moving forward I think this is the way to go.
Currently for each operation there are two possible callbacks, either with or without block transfer. However it is not always known a priori whether a block transfer callback is needed.
For example a "normal" read
lwm2m_dm_read
can induce a block response which triggers callbacks without block information.I suggest having a block information structure in every callback which keeps track on the block transfer and is NULL if the callback results from a non-block transfer. Something like:
However this would break the current API, any thoughts?
The text was updated successfully, but these errors were encountered: