RIOT
RIOT copied to clipboard
pkg/wakaama: add Light Control object implementation
Contribution description
This PR adds the implementation of the Light Control LwM2M object. The object takes care of the resources, the actual interaction to the light is done via a callback registered during instance creation. The wakaama example has been adapted to instantiate this object once ~if the LED0
is present~.
Testing procedure
- Check that the example works and the LED0 can be accessed.
Issues/PRs references
None
@cgundogan @leandrolanzieri is this of interest for the next release?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions.
Is there a way to have a unit or integration test for this?
Is there a way to have a unit or integration test for this?
For this I think it would make sense to think about a generic LwM2M object tester application that can be extended as we add our object implementations. Probably out of the scope of this one.
I rebased and updated some things now:
- use
ztimer_stopwatch
to keep track of the on time - allow server resetting on time
- the example always includes the light object
- a new command in the example cli to control the light object from the node's side
- updated documentation on the example
LGTM! There are some static test issues you might want to fix?
I tested it on native and it works fine!
Squashed!
Murdock results
:heavy_check_mark: PASSED
ea2440f4ebb166ec069ed9816282c9bc533951e0 examples/lwm2m: add light control object
Success | Failures | Total | Runtime |
---|---|---|---|
10008 | 0 | 10009 | 06m:56s |
Artifacts
Thanks for the review!