2using System.Collections.Generic;
3using System.Threading.Tasks;
24 this.Topic =
new MqttTopic(
null,
string.Empty,
string.Empty,
null,
null);
39 public DateTime
Timestamp {
get;
protected set; } = DateTime.UtcNow;
54 public bool Retain {
get;
protected set; }
93 foreach (
ISniffer Sniffer
in Output.Sniffers)
100 protected string Append(
string Prefix,
string Name)
102 if (
string.IsNullOrEmpty(Prefix))
108 return Prefix +
", " + Name;
116 if (Fields.Count > 50)
140 return this.
DataReported(
null, Content).Result != DataProcessingResult.Incompatible ? this.DefaultSupport :
Grade.NotAtAll;
Information about content received from the MQTT server.
Contains information about a language.
Abstract base class for control parameters.
Abstract base class for MQTT data encapsulations.
void Information(ICommunicationLayer Output, string Info)
Outputs information to sniffer.
MqttTopic Topic
Topic used
MqttData(MqttTopic Topic)
Abstract base class for MQTT data encapsulations.
bool Retain
If retain flag was set.
abstract Task< string > GetTypeName(Language Language)
Type name representing data.
void Add(List< Field > Fields, Field Field, ISensorReadout Request)
Reports fields during an active readout.
virtual ControlParameter[] GetControlParameters()
Gets an array of control parameters
abstract Task StartReadout(ThingReference ThingReference, ISensorReadout Request, string Prefix, bool Last)
Starts a readout of the data.
Grade Supports(MqttContent Content)
How well content of a specific type is supported.
abstract Grade DefaultSupport
Default support.
MqttQualityOfService QoS
Quality of Service used
abstract void SnifferOutput(ICommunicationLayer Output)
Outputs the parsed data to the sniffer.
abstract Task< DataProcessingResult > DataReported(MqttTopic Topic, MqttContent Content)
Called when new data has been published.
DateTime Timestamp
Timestamp of data reception.
abstract IMqttData CreateNew(MqttTopic Topic, MqttContent Content)
Creates a new instance of the data.
string Append(string Prefix, string Name)
Appends a name to a topic name.
MqttData()
Abstract base class for MQTT data encapsulations.
virtual bool IsControllable
If data can be controlled (written)
string FullTopic
Full topic name
Base class for all sensor data fields.
Contains a reference to a thing
Interface for observable classes implementing communication protocols.
Interface for sniffers. Sniffers can be added to ICommunicationLayer classes to eavesdrop on communic...
Task Information(string Comment)
Called to inform the viewer of something.
Interface for classes managing sensor data readouts.
Task ReportFields(bool Done, params Field[] Fields)
Report read fields to the client.
Interface for MQTT Data encapsulations
MqttQualityOfService
MQTT Quality of Service level.