2using System.Collections.Generic;
3using System.Threading.Tasks;
50 return Task.CompletedTask;
53 private async
void StartSearch()
61 Dictionary<string, ConcentratorSourceNode> BySourceId =
new Dictionary<string, ConcentratorSourceNode>();
66 BySourceId[SourceNode.RemoteSourceID] = SourceNode;
69 LinkedList<ScanSource> NewScans =
null;
73 if (BySourceId.ContainsKey(Source.
SourceID))
79 RemoteSourceID = Source.SourceID
84 BySourceId[Source.
SourceID] = SourceNode;
87 NewScans =
new LinkedList<ScanSource>();
89 NewScans.AddLast(
new ScanSource(this.
Concentrator, SourceNode));
92 if (!(NewScans is
null))
94 foreach (ScanSource ScanSource
in NewScans)
95 await ScanSource.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.
async Task< DataSourceReference[]> GetRootDataSourcesAsync(string To)
Gets all root data sources from the server.
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.
Task< IEnumerable< INode > > ChildNodes
Child nodes. If no child nodes are available, null is returned.
virtual async Task AddAsync(INode Child)
Adds a new child to 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 concentrator node for its root sources.
override Task ExecuteCommandAsync()
Executes the command.
ScanRootSources(ConcentratorDevice Concentrator)
Scans a concentrator node for its root sources.
override CommandType Type
Type of command.
override Task< string > GetNameAsync(Language Language)
Gets the name of data source.
override string CommandID
ID of command.
override ICommand Copy()
Creates a copy of the command object.
Node representing an XMPP concentrator.
Node representing a data source in an XMPP concentrator.
Interface for nodes that are published through the concentrator interface.