Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ISensorReadout.cs
1using System;
2using System.Collections.Generic;
3using System.Threading.Tasks;
5
6namespace Waher.Things
7{
11 public interface ISensorReadout
12 {
17 {
18 get;
19 }
20
25 {
26 get;
27 }
28
32 string[] FieldNames
33 {
34 get;
35 }
36
40 DateTime From
41 {
42 get;
43 }
44
48 DateTime To
49 {
50 get;
51 }
52
56 DateTime When
57 {
58 get;
59 }
60
64 string Actor
65 {
66 get;
67 }
68
73 {
74 get;
75 }
76
81 {
82 get;
83 }
84
88 string UserToken
89 {
90 get;
91 }
92
98 bool IsIncluded(string FieldName);
99
105 bool IsIncluded(DateTime Timestamp);
106
113
120 bool IsIncluded(string FieldName, FieldType Type);
121
129 bool IsIncluded(string FieldName, DateTime Timestamp, FieldType Type);
130
134 Task Start();
135
141 Task ReportFields(bool Done, params Field[] Fields);
142
148 Task ReportFields(bool Done, IEnumerable<Field> Fields);
149
155 Task ReportErrors(bool Done, params ThingError[] Errors);
156
162 Task ReportErrors(bool Done, IEnumerable<ThingError> Errors);
163 }
164}
Base class for all sensor data fields.
Definition: Field.cs:20
Contains information about an error on a thing
Definition: ThingError.cs:10
Interface for classes managing sensor data readouts.
Task Start()
Report that readout has started. Can optionally be used to report feedback to end-user when readout i...
string ServiceToken
Optional service token.
bool IsIncluded(string FieldName)
Checks if a field with the given parameters is included in the readout.
string Actor
Actor making the request.
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.
Task ReportErrors(bool Done, IEnumerable< 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.
bool IsIncluded(FieldType Type)
Checks if a field with the given parameters is included in the readout.
IThingReference[] Nodes
Array of nodes to read. Can be null or empty, if reading a sensor that is not a concentrator.
DateTime From
From what time readout is to be made. Use DateTime.MinValue to specify no lower limit.
bool IsIncluded(DateTime Timestamp)
Checks if a field with the given parameters is included in the readout.
bool IsIncluded(string FieldName, DateTime Timestamp, FieldType Type)
Checks if a field with the given parameters is included in the readout.
string UserToken
Optional user token.
Task ReportFields(bool Done, IEnumerable< Field > Fields)
Report read fields to the client.
bool IsIncluded(string FieldName, FieldType Type)
Checks if a field with the given parameters is included in the readout.
Interface for thing references.
FieldType
Field Type flags
Definition: FieldType.cs:10