-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net: lwm2m: Add observe callback for observe and notification events #39651
net: lwm2m: Add observe callback for observe and notification events #39651
Conversation
6abb175
to
6b38ba9
Compare
subsys/net/lib/lwm2m/lwm2m_engine.c
Outdated
int send_traceable_notification(struct lwm2m_ctx *client_ctx, struct lwm2m_obj_path *path, | ||
void *user_data) | ||
{ | ||
/* TODO This should generate the notifications in place and not use the resource buffers, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, where are we with this? The observe notification mechanism looks pretty ok to me already, and it's pretty independent (it doesn't really matter what data do we provide through the user_data
pointer as long as we're consistent), so perhaps the PR should be split in two parts, as the observe events part looks quite mergable as it is now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for checking in Robert! I agree it's better to split it up.
As for the proper historical notification mechanism, I haven't had the chance to really dive into yet. Our backend is still catching up with the current changes, so implementing the historical notifications / SenML JSON is not scheduled yet.
2282df8
to
bbbd913
Compare
bbbd913
to
e7b1361
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but it seems that we're missing a small update of the lwm2m_client
sample, see the CI results:
/workdir/zephyr/samples/net/lwm2m_client/src/lwm2m-client.c: In function 'main':
/workdir/zephyr/samples/net/lwm2m_client/src/lwm2m-client.c:502:2: error: too few arguments to function 'lwm2m_rd_client_start'
502 | lwm2m_rd_client_start(&client, CONFIG_BOARD, flags, rd_client_event);
4e6c65d
to
73e6f6c
Compare
73e6f6c
to
60b7d41
Compare
Seems like I messed up the rebase, but it's fixed now. EDIT: One of the checks is failing due to an internal server error 500..? |
Hmm but I still don't see the changes in the |
7da15fc
to
58665e1
Compare
58665e1
to
0b9ae97
Compare
Added an observe callback so that the application can register to receive events like observer added/deleted, and notification acked/ timed out. The notifications can be traced back to the exact data contained within them by use of the user_data pointer. Fixes zephyrproject-rtos#38531. Signed-off-by: Maik Vermeulen <maik.vermeulen@innotractor.com>
0b9ae97
to
59333e1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
Added an observe callback so that the application can register to
receive events like observer added/deleted, and notification acked/
timed out. The notifications can be traced back to the exact data
contained within them by use of the user_data pointer.
Fixes #38531.
Signed-off-by: Maik Vermeulen maik.vermeulen@innotractor.com