2using System.Collections;
3using System.Collections.Generic;
4using System.Threading.Tasks;
52 byte Address = await this.
address.GetUInt8ValueAsync(Variables);
53 ushort
Register = await this.
register.GetUInt16ValueAsync(Variables);
59 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.
ReadModBusCoil(ISimulationNode Parent, Model Model)
Reads a coil value.
override ISimulationNode Create(ISimulationNode Parent, Model Model)
Creates a new instance of the node.
override async Task< LinkedListNode< IActivityNode > > Execute(Variables Variables)
Executes a node.
override string LocalName
Local name of XML element defining contents of class.
Root node of a simulation model
void Register(IActivityNode Node)
Registers a child activity node.
async Task< BitArray > ReadCoils(byte UnitAddress, ushort ReferenceNumber, ushort NrBits)
Reads coils 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.