2using System.Collections.Generic;
3using System.Threading.Tasks;
67 TaskCompletionSource<bool> Done =
new TaskCompletionSource<bool>();
72 Request2.OnFieldsReceived += (sender, Fields) =>
74 foreach (
Field F
in Fields)
78 return Task.CompletedTask;
81 Request2.OnErrorsReceived += (sender, Errors) =>
83 List<ThingError> Errors2 =
new List<ThingError>();
89 return Task.CompletedTask;
92 Request2.OnStateChanged += (sender,
State) =>
98 Done.TrySetResult(
false);
103 Done.TrySetResult(
true);
108 Done.TrySetResult(
false);
112 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 sensor data fields.
Contains information about an error on a thing
string ErrorMessage
Error message.
Node representing an XMPP concentrator.
Node representing a device that is connected to XMPP.
A connected standalone sensor.
async Task StartReadout(ISensorReadout Request)
Starts the readout of the sensor.
override Task< string > GetTypeNameAsync(Language Language)
Gets the type name of the node.
SensorDevice()
A connected standalone sensor.
async Task< XmppClient > GetClient()
Gets the XMPP Client associated with node.
NodeState State
Current overall state of the 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.