2using System.Collections.Generic;
3using System.Threading.Tasks;
54 return Task.CompletedTask;
57 private async
void StartSearch()
64 string RemoteSourceID =
string.Empty;
65 string RemotePartition =
string.Empty;
66 INode Loop = await this.node.GetParent();
68 while (!(Loop is
null))
71 RemotePartition = PartitionNode.RemotePartitionID;
74 RemoteSourceID = SourceNode.RemoteSourceID;
85 this.node.RemoteNodeID, RemoteSourceID, RemotePartition,
86 false,
false,
string.Empty,
string.Empty,
string.Empty,
string.Empty);
88 Dictionary<string, ConcentratorNode> ByNodeId =
new Dictionary<string, ConcentratorNode>();
92 if (Child is ConcentratorNode Node)
93 ByNodeId[Node.RemoteNodeID] = Node;
96 LinkedList<ScanNode> NewScans =
null;
100 if (ByNodeId.ContainsKey(Node.
NodeId))
103 ConcentratorNode NewNode;
107 NewNode =
new SensorNode()
110 RemoteNodeID = Node.NodeId
115 NewNode =
new ConcentratorNode()
118 RemoteNodeID = Node.NodeId
122 await this.node.AddAsync(NewNode);
124 ByNodeId[Node.
NodeId] = NewNode;
126 if (NewScans is
null)
127 NewScans =
new LinkedList<ScanNode>();
132 if (!(NewScans is
null))
134 foreach (ScanNode ScanNode
in NewScans)
135 await ScanNode.ExecuteCommandAsync();
Static class managing the application event log. Applications and services log events on this static ...
static void Exception(Exception Exception, string Object, string Actor, string EventId, EventLevel Level, string Facility, string Module, params KeyValuePair< string, object >[] Tags)
Logs an exception. Event type will be determined by the severity of the exception.
Implements an XMPP concentrator client interface.
Task< NodeInformation[]> GetChildNodesAsync(string To, IThingReference Node, bool Parameters, bool Messages, string Language, string ServiceToken, string DeviceToken, string UserToken)
Gets information about all child nodes of a node in a data source.
XmppClient Client
XMPP Client.
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 ...
Base class for all metering nodes.
static async Task< string > GetUniqueNodeId(string NodeId)
Gets a Node ID, based on NodeId that is not already available in the database.
async Task< INode > GetParent()
Gets the parent of the node.
Abstract base class for concentrator commands.
ConcentratorDevice Concentrator
Reference to the concentrator node.
async Task< ConcentratorClient > GetConcentratorClient()
Gets the concentrator client, if it exists.
string GetRemoteFullJid(XmppClient Client)
Gets the Full JID of the connected device.
Scans a node on a concentrator node for its child nodes.
override ICommand Copy()
Creates a copy of the command object.
ScanNode(ConcentratorDevice Concentrator, ConcentratorNode Node)
Scans a node on a concentrator node for its child nodes.
override Task< string > GetNameAsync(Language Language)
Gets the name of data source.
override string CommandID
ID of command.
override Task ExecuteCommandAsync()
Executes the command.
override CommandType Type
Type of command.
Node representing an XMPP concentrator.
Base class for nodes in a remote concentrator.
Node representing a partition in a data source in an XMPP concentrator.
Node representing a data source in an XMPP concentrator.
Interface for nodes that are published through the concentrator interface.
Task< IEnumerable< INode > > ChildNodes
Child nodes. If no child nodes are available, null is returned.
INode Parent
Parent Node, or null if a root node.