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

Defining our embedded actuator node

Our actuator node will be defined in much the same way as the sensor node. The key difference is that it will implement the IActuator interface as well as the ISensor interface:

public class ActuatorNode : ThingReference, ISensor, IActuator 
{ 
   public const string NodeID = "Actuator"; 
 
   public ActuatorNode() 
         : base(NodeID, MeteringTopology.ID, string.Empty) 
   { 
   } 

We also need to explicitly state that it is always controllable:

public bool IsReadable => true; 
public bool IsControllable => true; 

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