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; 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset