2using System.Collections;
3using System.Collections.Generic;
4using System.Threading.Tasks;
31 [Page(4,
"Modbus", 100)]
32 [Header(8,
"Coil Number:")]
33 [ToolTip(9,
"Coil number on the Modbus unit.")]
41 [Page(4,
"Modbus", 100)]
42 [Header(11,
"Field Name:")]
43 [ToolTip(12,
"Custom field name for value.")]
44 [DefaultValueStringEmpty]
65 LinkedList<Parameter> Result = await base.GetDisplayableParametersAsync(
Language, Caller) as LinkedList<Parameter>;
102 if (
string.IsNullOrEmpty(this.
FieldName))
120 await Client.
Enter();
128 await Client.
Leave();
131 async (Node, Value) =>
134 await Client.
Enter();
139 if (WritenValue != Value)
140 throw new Exception(
"Coil value not changed.");
144 await Client.
Leave();
Task Leave()
Leaves unique access to the TCP client. Must be called exactly one for each call to Enter.
async Task< BitArray > ReadCoils(byte UnitAddress, ushort ReferenceNumber, ushort NrBits)
Reads coils from a Modbus unit.
async Task< bool > WriteCoil(byte UnitAddress, ushort ReferenceNumber, bool Value)
Write to a single coil
Task Enter()
Enters unique access to the TCP client. Must be followed by exactly one Leave call.
Contains information about a language.
Task< string > GetStringAsync(Type Type, int Id, string Default)
Gets the string value of a string ID. If no such string exists, a string is created with the default ...
Boolean control parameter.
Abstract base class for control parameters.
Node representing a TCP/IP connection to a Modbus Gateway
Abstract base class for child nodes to Mobus Unit nodes.
async Task< ModbusGatewayNode > GetGateway()
Modbus Gateway node.
async Task< ModbusUnitNode > GetUnitNode()
Modbus Unit node.
async Task< ThingReference > GetReportAs()
Under what node fields are to be reported.
Represents a coil on a Modbus unit node.
string GetFieldName()
Gets the field name of the node.
async Task StartReadout(ISensorReadout Request)
Starts the readout of the sensor.
override Task< string > GetTypeNameAsync(Language Language)
Gets the type name of the node.
string FieldName
Custom field name
ModbusUnitCoilNode()
Represents a coil on a Modbus unit node.
override async Task< IEnumerable< Parameter > > GetDisplayableParametersAsync(Language Language, RequestOrigin Caller)
Gets displayable parameters.
Task< ControlParameter[]> GetControlParameters()
Get control parameters for the actuator.
Tokens available in request.
Represents a boolean value that can be either true or false.
Contains information about an error on a thing
Interface for actuator nodes.
Interface for sensor nodes.
Interface for classes managing sensor data readouts.
Task ReportErrors(bool Done, params ThingError[] Errors)
Report error states to the client.
Task ReportFields(bool Done, params Field[] Fields)
Report read fields to the client.
FieldQoS
Field Quality of Service flags
FieldType
Field Type flags