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

Performing the search

Now that we have the scope of the search defined, performing the search is easy. We call the Search method on the registry client, submitting an offset, the maximum number of nodes to return in the search result, and a callback method to call when the result is returned:

Log.Informational("Searching for MIoT devices in my vicinity."); 
 
this.registryClient.Search(0, 100, Search.ToArray(), 
   (sender, e) => 
   { 
         Log.Informational(e.Things.Length.ToString() +  
               (e.More ? "+" : string.Empty) + " things found."); 

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