2using System.Collections.Generic;
3using System.Threading.Tasks;
51 byte Address = await this.
address.GetUInt8ValueAsync(Variables);
52 ushort
Register = await this.
register.GetUInt16ValueAsync(Variables);
54 if (this.
value is
null)
55 throw new Exception(
"Value not defined.");
63 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 write operations.
void Register(IValue Value)
Registers a value for the argument.
StringAttribute responseVariable
Response variable attribute.
IValue value
Value to write.
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.
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.
WriteModBusCoil(ISimulationNode Parent, Model Model)
Writes a coil value.
override async Task< LinkedListNode< IActivityNode > > Execute(Variables Variables)
Executes a node.
Root node of a simulation model
async Task< bool > WriteCoil(byte UnitAddress, ushort ReferenceNumber, bool Value)
Write to a single coil
Class managing a script expression.
static double ToDouble(object Object)
Converts an object to a double value.
Basic interface for simulator nodes. Implementing this interface allows classes with default contruct...
ISimulationNode Parent
Parent node in the simulation model.