March 2018
Beginner to intermediate
410 pages
10h 40m
English
To define a node class, we need to determine which of the interfaces, ISensor or IActuator, to implement. Implementing ISensor and IActuator automatically implements INode, which is a requirement. But the node can also choose to implement both. For our sensor node, we will only implement the ISensor interface, however. We base our class on the ThingReference class, defined in Waher.Things. The sensor node will have a static identity. And we do not use partitions in our example:
public class SensorNode : ThingReference, ISensor
{
public const string NodeID = "Sensor";
public SensorNode()
: base(NodeID, MeteringTopology.ID, string.Empty)
{
}
The ThingReference class defines the NodeId property, which we define ...
Read now
Unlock full access