2using System.Collections.Generic;
3using System.Threading.Tasks;
55 string JID =
string.Empty;
57 string SID =
string.Empty;
58 string PID =
string.Empty;
61 while (!(Loop is
null))
64 SID = SourceNode.RemoteSourceID;
66 PID = PartitionNode.RemotePartitionID;
92 TaskCompletionSource<bool> Done =
new TaskCompletionSource<bool>();
97 Request2.OnFieldsReceived += (sender, Fields) =>
99 foreach (
Field F
in Fields)
103 return Task.CompletedTask;
106 Request2.OnErrorsReceived += (sender, Errors) =>
108 List<ThingError> Errors2 =
new List<ThingError>();
114 return Task.CompletedTask;
117 Request2.OnStateChanged += (sender,
State) =>
123 Done.TrySetResult(
false);
128 Done.TrySetResult(
true);
133 Done.TrySetResult(
false);
137 return Task.CompletedTask;
Maintains information about an item in the roster.
bool HasLastPresence
If the roster item has received presence from an online resource having the given bare JID.
string LastPresenceFullJid
Full JID of last resource sending online presence.
PresenceEventArgs LastPresence
Last presence received from a resource having this bare JID.
Implements an XMPP sensor client interface.
Task< SensorDataClientRequest > RequestReadout(string Destination, FieldType Types)
Requests a sensor data readout.
Manages a sensor data client request.
Manages an XMPP client connection. Implements XMPP, as defined in https://tools.ietf....
bool TryGetExtension(Type Type, out IXmppExtension Extension)
Tries to get a registered extension of a specific type from the client.
RosterItem GetRosterItem(string BareJID)
Gets a roster item.
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.
async Task< INode > GetParent()
Gets the parent of the node.
Base class for all sensor data fields.
Contains information about an error on a thing
string ErrorMessage
Error message.
Node representing an XMPP concentrator.
Base class for nodes in a remote concentrator.
string RemoteNodeID
Node ID
Node representing a partition in a data source in an XMPP concentrator.
Node representing a data source in an XMPP concentrator.
A node in a concentrator.
async Task StartReadout(ISensorReadout Request)
Starts the readout of the sensor.
override Task< string > GetTypeNameAsync(Language Language)
Gets the type name of the node.
SensorNode()
A node in a concentrator.
async Task< XmppClient > GetClient()
Gets the XMPP Client associated with node.
Interface for nodes that are published through the concentrator interface.
NodeState State
Current overall state of the node.
INode Parent
Parent Node, or null if a root node.
Interface for sensor nodes.
Interface for classes managing sensor data readouts.
string ServiceToken
Optional service token.
DateTime When
When the readout is to be made. Use DateTime.MinValue to start the readout immediately.
string[] FieldNames
Names of fields to read.
Task ReportErrors(bool Done, params ThingError[] Errors)
Report error states to the client.
FieldType Types
Field Types to read.
DateTime To
To what time readout is to be made. Use DateTime.MaxValue to specify no upper limit.
string DeviceToken
Optional device token.
Task ReportFields(bool Done, params Field[] Fields)
Report read fields to the client.
DateTime From
From what time readout is to be made. Use DateTime.MinValue to specify no lower limit.
string UserToken
Optional user token.
Interface for thing references.
SensorDataReadoutState
Sensor Data Readout States.