O'Reilly logo

Mastering Internet of Things by Peter Waher

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Updating a registration

After a thing has been registered, we can update the registration as many times as we want. We can only update our own registration. The difference between a registration and an update is that a registration rewrites the complete set of metadata for the device, while an update only changes, updates, or adds tags to the set, but it does not remove tags not mentioned. Updates only work if there's a previous registration, however. If the update procedure fails, we try to re-register the thing instead:

private void UpdateRegistration(MetaDataTag[] MetaInfo) { Log.Informational("Updating registration of device."); this.registryClient.UpdateThing(MetaInfo, (sender, e) => { if (e.Ok) Log.Informational( "Registration update ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required