Skip to content
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

pkg/wakaama: add Light Control object implementation #16204

Merged

Conversation

leandrolanzieri
Copy link
Contributor

@leandrolanzieri leandrolanzieri commented Mar 18, 2021

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 leandrolanzieri added Type: new feature The issue requests / The PR implemements a new feature for RIOT Area: pkg Area: External package ports labels Mar 18, 2021
@leandrolanzieri leandrolanzieri force-pushed the pr/pkg/wakaama_add_obj_light_ctrl branch from 99e31d6 to 544daf4 Compare March 18, 2021 11:14
@MrKevinWeiss MrKevinWeiss added this to the Release 2021.07 milestone Jun 22, 2021
@MrKevinWeiss MrKevinWeiss removed this from the Release 2021.07 milestone Jul 15, 2021
@fjmolinas
Copy link
Contributor

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

@stale
Copy link

stale bot commented Jun 12, 2022

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 stale bot added the State: stale State: The issue / PR has no activity for >185 days label Jun 12, 2022
@Teufelchen1
Copy link
Contributor

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

@stale stale bot removed the State: stale State: The issue / PR has no activity for >185 days label Jan 30, 2024
@leandrolanzieri leandrolanzieri force-pushed the pr/pkg/wakaama_add_obj_light_ctrl branch from 544daf4 to 414226c Compare February 1, 2024 09:13
@github-actions github-actions bot added Area: doc Area: Documentation Area: examples Area: Example Applications Area: Kconfig Area: Kconfig integration labels Feb 1, 2024
@leandrolanzieri
Copy link
Contributor Author

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

Copy link
Contributor

@Teufelchen1 Teufelchen1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found very little to complain - you are either a genius or I am sloppy at reviewing.
Still have to test it.

examples/lwm2m/README.md Show resolved Hide resolved
pkg/wakaama/contrib/objects/light_control.c Show resolved Hide resolved
pkg/wakaama/contrib/objects/light_control.c Outdated Show resolved Hide resolved
@Teufelchen1
Copy link
Contributor

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

I tested it on native and it works fine!

@leandrolanzieri leandrolanzieri force-pushed the pr/pkg/wakaama_add_obj_light_ctrl branch from c201cda to 644bae5 Compare March 12, 2024 15:12
@leandrolanzieri
Copy link
Contributor Author

Squashed!

@Teufelchen1 Teufelchen1 added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Mar 12, 2024
@riot-ci
Copy link

riot-ci commented Mar 12, 2024

Murdock results

✔️ PASSED

ea2440f examples/lwm2m: add light control object

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

Artifacts

@leandrolanzieri leandrolanzieri force-pushed the pr/pkg/wakaama_add_obj_light_ctrl branch from 644bae5 to 02e254a Compare March 13, 2024 07:36
@leandrolanzieri leandrolanzieri force-pushed the pr/pkg/wakaama_add_obj_light_ctrl branch from 02e254a to ea2440f Compare March 13, 2024 09:25
@Teufelchen1 Teufelchen1 added this pull request to the merge queue Mar 13, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 13, 2024
@benpicco benpicco added this pull request to the merge queue Mar 13, 2024
Merged via the queue into RIOT-OS:master with commit d3ec7cf Mar 13, 2024
25 checks passed
@leandrolanzieri
Copy link
Contributor Author

Thanks for the review!

@leandrolanzieri leandrolanzieri deleted the pr/pkg/wakaama_add_obj_light_ctrl branch March 13, 2024 13:52
@MrKevinWeiss MrKevinWeiss added this to the Release 2024.04 milestone Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: doc Area: Documentation Area: examples Area: Example Applications Area: Kconfig Area: Kconfig integration Area: pkg Area: External package ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: new feature The issue requests / The PR implemements a new feature for RIOT
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants