Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ModBusReadOperation.cs
1using System.Threading.Tasks;
2using System.Xml;
4
6{
10 public abstract class ModBusReadOperation : ModBusOperation
11 {
16
23 : base(Parent, Model)
24 {
25 }
26
31 public override Task FromXml(XmlElement Definition)
32 {
33 foreach (XmlAttribute Attr in Definition.Attributes)
34 {
35 switch (Attr.Name)
36 {
37 case "responseVariable":
38 this.responseVariable = new StringAttribute(Attr.Value);
39 break;
40 }
41 }
42
43 return base.FromXml(Definition);
44 }
45 }
46}
Abstract base class for ModBus operations.
Abstract base class for ModBus read operations.
override Task FromXml(XmlElement Definition)
Sets properties and attributes of class in accordance with XML definition.
StringAttribute responseVariable
Response variable attribute.
ModBusReadOperation(ISimulationNode Parent, Model Model)
Abstract base class for ModBus read operations.
Root node of a simulation model
Definition: Model.cs:49
Contains the value of a string attribute, possibly with embedded script.
Basic interface for simulator nodes. Implementing this interface allows classes with default contruct...
ISimulationNode Parent
Parent node in the simulation model.