2using System.Collections.Generic;
3using System.Threading.Tasks;
21 private string localTopic =
string.Empty;
35 [Header(22,
"Local Topic:")]
36 [ToolTip(23,
"Local topic, unique among siblings.")]
37 [DefaultValueStringEmpty]
40 get => this.localTopic;
41 set => this.localTopic = value;
47 public override string LocalId => this.localTopic;
54 string Result = this.localTopic;
57 while (!(Loop is
null))
59 Result = Loop.LocalTopic +
"/" + Result;
73 while (!(Parent is
null))
131 LinkedList<Parameter> Parameters = (LinkedList<Parameter>)await base.GetDisplayableParametersAsync(
Language, Caller);
134 if (!(Topic is
null))
146 (await this.
GetTopic())?.Remove(Topic.LocalTopic);
148 return await base.RemoveAsync(Child);
157 List<ControlParameter> Parameters =
new List<ControlParameter>();
158 Parameters.AddRange(await base.GetControlParameters());
161 Parameters.AddRange(P);
163 return Parameters.ToArray();
183 await base.StartReadout(Request, (Topic is
null) && DoneAfter);
185 if (!(Topic is
null))
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 ...
Abstract base class for control parameters.
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.
async Task< INode > GetParent()
Gets the parent of the node.
MQTT Broker connection object.
async Task< MqttTopic > GetTopic(string TopicString, bool CreateNew, bool IgnoreGuids)
Gets the Node responsible for managing a Topic
async Task< IEnumerable< Parameter > > GetDisplayableParametersAsync(LinkedList< Parameter > Parameters, Language Language, RequestOrigin _)
TODO
Task StartReadout(ISensorReadout Request, bool DoneAfter)
Starts the readout of the sensor.
Node representing a connection to an MQTT broker.
Task< MqttBroker > GetBroker()
Gets the corresponding broker node.
A Metering node representing an MQTT topic
virtual Task< IMqttData > GetDefaultDataObject()
Gets the default data object, if any.
override string LocalId
Local ID
async Task< MqttBrokerNode > GetBroker()
TODO
override Task< bool > AcceptsChildAsync(INode Child)
If the node accepts a given child.
override bool IsReadable
If the node can be read.
async Task< MqttTopic > GetTopic()
TODO
override async Task< IEnumerable< Parameter > > GetDisplayableParametersAsync(Language Language, RequestOrigin Caller)
Gets displayable parameters.
virtual async Task< IMqttTopicNode > CreateNew(MqttTopicRepresentation Topic)
Creates a new node of the same type.
MqttTopicNode()
A Metering node representing an MQTT topic
override async Task StartReadout(ISensorReadout Request, bool DoneAfter)
Starts the readout of the sensor.
async override Task< bool > RemoveAsync(INode Child)
TODO
override async Task< ControlParameter[]> GetControlParameters()
Get control parameters for the actuator.
override Task< bool > AcceptsParentAsync(INode Parent)
If the node accepts a given parent.
string LocalTopic
Local Topic segment
virtual Grade Supports(MqttTopicRepresentation Topic)
How well the topic node supports an MQTT topic
async Task< string > GetFullTopic()
Gets the full topic string.
override Task< string > GetTypeNameAsync(Language Language)
Diaplayable type name for node.
Contains information about an MQTT topic
string CurrentSegment
Current segment being processed.
Tokens available in request.
Contains information about an error on a thing
Virtual node, that can be used as a placeholder for services.
Interface for actuator nodes.
Interface for nodes that are published through the concentrator interface.
INode Parent
Parent Node, or null if a root node.
Interface for sensor nodes.
Interface for classes managing sensor data readouts.
Task ReportErrors(bool Done, params ThingError[] Errors)
Report error states to the client.
new INode Parent
Parent Node, or null if a root node.
Task< INode > GetParent()
Gets the parent of the node.
new string NodeId
ID of node.
Interface for MQTT Topic nodes.
Interface for MQTT Data encapsulations