2using System.Threading.Tasks;
14 private static readonly Dictionary<string, KeyValuePair<Field[], ThingError[]>> sensorData =
new Dictionary<string, KeyValuePair<Field[], ThingError[]>>();
62 && (P.Value?.Length ?? 0) > 0;
64 sensorData[this.
NodeId] =
new KeyValuePair<Field[], ThingError[]>(Fields, Errors);
67 if (!(Fields is
null))
69 List<Field> MomentaryValues =
null;
75 MomentaryValues ??=
new List<Field>();
76 MomentaryValues.Add(
Field);
80 if (!(MomentaryValues is
null))
102 KeyValuePair<Field[], ThingError[]> Data;
107 Found = sensorData.TryGetValue(this.
NodeId, out Data);
112 if (!(Data.Key is
null))
113 await Request.
ReportFields(Data.Value is
null, Data.Key);
115 if (!(Data.Value is
null))
118 if (Data.Key is
null && Data.Value is
null)
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 ...
Node representing an external web node.
override Task< bool > AcceptsChildAsync(INode Child)
TODO
override Task< string > GetTypeNameAsync(Language Language)
Type name representing data.
override Task< bool > AcceptsParentAsync(INode Parent)
If the node accepts a presumptive parent, i.e. can be added to that parent (if that parent accepts th...
async Task StartReadout(ISensorReadout Request)
Starts the readout of the sensor.
ExternalWebNode()
Node representing an external web node.
Node representing the local web server.
Base class for all metering nodes.
Task NewMomentaryValues(params Field[] Values)
Reports newly measured values.
virtual Task LogErrorAsync(string Body)
Logs an error message on the node.
INode Parent
Parent Node, or null if a root node.
virtual Task< bool > RemoveErrorAsync()
Removes error messages with an empty event ID from the node.
Base class for all sensor data fields.
FieldType Type
Field Type flags.
Contains information about an error on a thing
string ErrorMessage
Error message.
Interface for nodes that are published through the concentrator interface.
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.
FieldType
Field Type flags