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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass along resource CoAP_Res_t as a member of CoAP_Message_t #23

Merged
merged 1 commit into from
Dec 4, 2017

Conversation

NZSmartie
Copy link
Contributor

@NZSmartie NZSmartie commented Nov 28, 2017

This closes #14.
The idea is to pass along the CoAP resource (CoAP_Res_t) as a member of CoAP_Message_t in the request message for the callback handler.
To the request which can be used in a shared callback to easily identify which resource to process. Instead of implementing a single callback for each and every CoAP resource.

Edit: No longer a breaking change 馃懠

@NZSmartie
Copy link
Contributor Author

NZSmartie commented Nov 28, 2017

Hmm. I could throw the CoAP resourse pointer into CoAP_Message_t instead. which would not be a breaking API change and the pReq parameter would contain the pointer to the resource for the request. which would stay true to the Handle(Reqeust, Response); API model

@NZSmartie NZSmartie changed the title Add CoAP_Res_t to resource handler Pass along resource CoAP_Res_t as a member of CoAP_Message_t Nov 28, 2017
@niondir niondir merged commit d01d326 into lobaro:master Dec 4, 2017
@niondir
Copy link
Member

niondir commented Dec 4, 2017

Thanks for the PR and sorry for the delay on my side. I appreciate your commitment to the project 馃憤

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Callback Functions With User Supplied Data Pointers
2 participants