2using System.Collections.Generic;
3using System.Threading.Tasks;
51 byte Address = await this.
address.GetUInt8ValueAsync(Variables);
52 ushort
Register = await this.
register.GetUInt16ValueAsync(Variables);
58 if (!(Client.
Client is
null))
DoubleAttribute address
ModBus device Address attribute
async Task< ModBusClient > GetClient(Variables Variables)
Gets the ModBus TCP Client to use in the operation.
Abstract base class for ModBus read operations.
StringAttribute responseVariable
Response variable attribute.
Represents a simulated ModBus client
void Unlock()
Unlocks the client.
ModbusTcpClient Client
ModBus TCP client reference.
async Task Lock()
Locks the client for use by one caller.
Reads a holding register value.
override async Task< LinkedListNode< IActivityNode > > Execute(Variables Variables)
Executes a node.
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.
ReadModBusHoldingRegister(ISimulationNode Parent, Model Model)
Reads a holding register value.
Root node of a simulation model
void Register(IActivityNode Node)
Registers a child activity node.
async Task< ushort[]> ReadMultipleRegisters(byte UnitAddress, ushort ReferenceNumber, ushort NrWords)
Reads multiple registers from a Modbus unit.
Basic interface for simulator nodes. Implementing this interface allows classes with default contruct...
ISimulationNode Parent
Parent node in the simulation model.