-
Notifications
You must be signed in to change notification settings - Fork 248
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
Support getting and setting the module/device twin for Azure IoT Hub Service #82
Support getting and setting the module/device twin for Azure IoT Hub Service #82
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work! Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, but I have some questions before I'd be ready to merge this.
38a9e29
to
b214734
Compare
b214734
to
3715842
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome stuff. I've noted a few nits that you might consider addressing, but we can also merge as is. 🎉
This PR adds support for most twin related operations for the IoT Hub Service SDK.
Added
get_module_twin
,get_device_twin
,update_module_twin
,replace_module_twin
,update_device_twin
,replace_device_twin
functions toiothub::ServiceClient
.Discussion
DesiredTwinBuilder
generic so it can be used for both updating module and device twins. As to hide some details for the user (mainly the return type ofexecute
which returns theModuleTwin
when updating modules andDeviceTwin
for updating the devices) I had to resort to usingstd::marker::PhantomData
in theDesiredTwinBuilder
. I'm not too sure about that in particular, but couldn't find another way of doing this neatly.