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

Providing status feedback

It is possible to return textual feedback to the administrator for each node. This feedback might include important events, statuses, and error messages. We will make it easy for us, and assume the node works fine:

public NodeState State => NodeState.None; 
 
public Task<IEnumerable<Message>> GetMessagesAsync( 
   RequestOrigin Caller) 
{ 
   return Task.FromResult<IEnumerable<Message>>(null); 
} 
As an exercise, make the node state reflect the status of the sensor. If there are problems connecting to the Arduino board, let the node state reflect this.

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