2using System.Threading.Tasks;
67 public override Task
FromXml(XmlElement Definition)
71 return base.FromXml(Definition);
92 await base.Initialize();
111 if (!(this.sniffer is
null))
113 if (this.sniffer is IDisposable Disposable)
114 Disposable.Dispose();
119 return base.Finalize();
Abstract base class for ModBus actors.
const string ComSimModBusSchema
Resource name of ModBus schema.
const string ComSimModBusNamespace
http://lab.tagroot.io/Schema/ComSim.xsd
Hosts a ModBus IP Gateway
override string SchemaResource
Points to the embedded XML Schema resource defining the semantics of the XML namespace.
override async Task Initialize()
Initialized the node before simulation.
void Register(IActor Actor)
Registers an actor with the collection of actors.
override Task Finalize()
Finalizes the node after simulation.
override string LocalName
Local name of XML element defining contents of class.
override ISimulationNode Create(ISimulationNode Parent, Model Model)
Creates a new instance of the node.
ModBusTcpServer Server
Reference to the ModBus TCP server object. (Only available on initialized instances....
override Task FromXml(XmlElement Definition)
Sets properties and attributes of class in accordance with XML definition.
ModBusServer(ISimulationNode Parent, Model Model)
Hosts a ModBus IP Gateway
override string Namespace
XML Namespace where the element is defined.
override Task Start()
Starts the node.
Root node of a simulation model
ISniffer GetSniffer(string Actor)
Gets a sniffer, if sniffer output is desired.
Abstract base class for actors
void Register(IActor Actor)
Registers an actor with the collection of actors.
Abstract base class for simulation nodes with children
Helps with common XML-related tasks.
static string Attribute(XmlElement E, string Name)
Gets the value of an XML attribute.
void Dispose()
Closes and disposes of the server.
static async Task< ModBusTcpServer > CreateAsync(int Port, params ISniffer[] Sniffers)
Creates and opens a ModBus server.
Basic interface for simulator nodes. Implementing this interface allows classes with default contruct...
ISimulationNode Parent
Parent node in the simulation model.
Basic interface for simulator nodes. Implementing this interface allows classes with default contruct...
Interface for collections of actors.
Interface for sniffers. Sniffers can be added to ICommunicationLayer classes to eavesdrop on communic...
BinaryPresentationMethod
How binary data is to be presented.