Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
FormControlOperation.cs
1using System.Threading.Tasks;
3using Waher.Things;
5
7{
12 {
13 private readonly ControlParameter parameter;
14 private readonly string value;
15
24 : base(Node, request, Parameter)
25 {
26 this.parameter = Parameter;
27 this.value = Value;
28 }
29
33 public ControlParameter Parameter => this.parameter;
34
38 public string Value => this.value;
39
44 public override async Task<bool> Set()
45 {
46 bool Result = await this.parameter.SetStringValue(this.Node, this.value);
47
48 if (!Result)
49 await ControlServer.ParameterSyntaxError(this.parameter.Name, this.Request);
50
51 return Result;
52 }
53 }
54}
IThingReference Node
Node on which operation is to be performed.
override async Task< bool > Set()
Performs the control operation.
FormControlOperation(IThingReference Node, ControlParameter Parameter, string Value, IqEventArgs request)
Form control operation.
Implements an XMPP control server interface.
Event arguments for IQ queries.
Definition: IqEventArgs.cs:12
Abstract base class for control parameters.
Interface for thing references.