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

Feature/rd registration #26

Merged
merged 9 commits into from
Dec 16, 2019
Merged

Feature/rd registration #26

merged 9 commits into from
Dec 16, 2019

Conversation

MatthiasBraeuer
Copy link
Collaborator

  • Register automatically to a Resource Directory
  • Send an update periodically if device is registered
  • Reregister to Resource Directory if update failed for any reason

Note: It may be necessary to wait a certain time on startup until the board is fully configured (has non-tentative IPv6 address, ...), or better trigger registration as soon as the configuration is done (if it is somehow possible).

For more information check out issue #14.

Closes #14

Matthias Bräuer and others added 4 commits November 11, 2019 18:10
Periodical update seems not to be triggered..
When the board starts it tries to register to a resource directory
until the registering succeeds.
After that an update request is sent to the resource directory
periodically (period defined in Makefile).
When the update fails only a message is printed so far because
trying to register again like on boot seems not to work (I have to
figure out what the issue is).
@MatthiasBraeuer MatthiasBraeuer added the enhancement New feature or request label Dec 9, 2019
Copy link
Collaborator

@rosetree rosetree left a comment

Choose a reason for hiding this comment

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

Thank you, @MatthiasBraeuer – great work! It’s wonderful, that you documented your functions. I’m not sure how to test it, though :)

The requested changes are mostly 👾 whitespaces fixes. And maybe we could talk about how we deal with debug messages and prints…

main.c Show resolved Hide resolved
@@ -36,8 +55,13 @@ int main(void)

msg_init_queue(_main_msg_queue, MAIN_QUEUE_SIZE);

saul_cord_ep_register_cb(_on_ep_event);
Copy link
Collaborator

@rosetree rosetree Dec 16, 2019

Choose a reason for hiding this comment

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

Maybe we could just register this event handler, if (DEBUG).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Since we want to make our project includeable as a module, I would keep it like this, because our main module would not be included in an application using our module.

saul_coap.c Show resolved Hide resolved
saul_cord_ep.c Outdated Show resolved Hide resolved
saul_cord_ep.c Outdated Show resolved Hide resolved
saul_cord_ep.c Outdated Show resolved Hide resolved
saul_cord_ep.c Outdated Show resolved Hide resolved
saul_cord_ep.c Outdated Show resolved Hide resolved
Before `SAUL_CORD_EP_DEREGISTERED` was passed when registration
succeeded and `SAUL_CORD_EP_REGISTERED` when registration failed.
I switched it.

Also cord ep dump is called outside of the register function now.
RIOT style guide says, that one indentation level must be 4 spaces.
@rosetree rosetree merged commit a4c7ed4 into master Dec 16, 2019
@rosetree rosetree deleted the feature/rd-registration branch December 16, 2019 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Register to Raspberry Pi Resource Directory
2 participants