RIOT icon indicating copy to clipboard operation
RIOT copied to clipboard

pkg/wakaama: add Light Control object implementation

Open leandrolanzieri opened this issue 3 years ago • 4 comments

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

leandrolanzieri avatar Mar 18 '21 11:03 leandrolanzieri

@cgundogan @leandrolanzieri is this of interest for the next release?

fjmolinas avatar Nov 18 '21 09:11 fjmolinas

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.

stale[bot] avatar Jun 12 '22 17:06 stale[bot]

Is there a way to have a unit or integration test for this?

Teufelchen1 avatar Jan 30 '24 17:01 Teufelchen1

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

leandrolanzieri avatar Feb 01 '24 09:02 leandrolanzieri

LGTM! There are some static test issues you might want to fix?

I tested it on native and it works fine!

Teufelchen1 avatar Mar 12 '24 14:03 Teufelchen1

Squashed!

leandrolanzieri avatar Mar 12 '24 15:03 leandrolanzieri

Murdock results

:heavy_check_mark: PASSED

ea2440f4ebb166ec069ed9816282c9bc533951e0 examples/lwm2m: add light control object

Success Failures Total Runtime
10008 0 10009 06m:56s

Artifacts

riot-ci avatar Mar 12 '24 18:03 riot-ci

Thanks for the review!

leandrolanzieri avatar Mar 13 '24 13:03 leandrolanzieri