2using System.Collections.Generic;
4using System.Threading.Tasks;
23 private string eventArgs;
56 public override async Task
FromXml(XmlElement Definition)
58 this.eventArgs =
XML.
Attribute(Definition,
"eventArgs",
"e");
61 await base.FromXml(Definition);
63 List<FieldNode> Fields =
new List<FieldNode>();
71 this.fields = Fields.ToArray();
84 throw new Exception(
"Sensor data event arguments not found.");
87 LinkedList<Field> Fields =
new LinkedList<Field>();
98 e.ReportErrors(
false,
new ThingError(
Field.ThingReference, DateTime.Now, ex.Message));
102 e.ReportFields(!this.more, Fields);
104 return Task.FromResult<LinkedListNode<IActivityNode>>(
null);
113 public override void ExportPlantUml(StreamWriter Output,
int Indentation,
char QuoteChar)
115 Indent(Output, Indentation);
116 Output.Write(
":ReportFields(");
118 Output.WriteLine(
");");
Root node of a simulation model
ISimulationNode[] Children
Child nodes.
static void Indent(StreamWriter Output, int Indentation)
Adds indentation to the current row.
Abstract base class for sensor data field nodes.
Reports new momentary sensor data fields.
static string Join(string[] References)
Joins an array of references, and delimits them with ", ".
static string[] GetThingReferences(FieldNode[] FieldNodes)
Gets referenced thing references
Reports sensor data fields.
override void ExportPlantUml(StreamWriter Output, int Indentation, char QuoteChar)
Exports PlantUML
override async Task FromXml(XmlElement Definition)
Sets properties and attributes of class in accordance with XML definition.
ReportFields(ISimulationNode Parent, Model Model)
Reports sensor data fields.
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.
override Task< LinkedListNode< IActivityNode > > Execute(Variables Variables)
Executes a node.
Abstract base class for IoT XMPP activity nodes.
Helps with common XML-related tasks.
static string Attribute(XmlElement E, string Name)
Gets the value of an XML attribute.
Static class managing the application event log. Applications and services log events on this static ...
static Exception UnnestException(Exception Exception)
Unnests an exception, to extract the relevant inner exception.
Manages a sensor data server request.
Contains information about a variable.
virtual bool TryGetVariable(string Name, out Variable Variable)
Tries to get a variable object, given its name.
Base class for all sensor data fields.
Contains information about an error on a thing
Basic interface for simulator nodes. Implementing this interface allows classes with default contruct...
ISimulationNode Parent
Parent node in the simulation model.