Creates an instance of MQTTLayer.
MQTTLayer
Uri of the Broker. e.g. mqtt://localhost:1883
or ws://localhost:9000
.
Optional
logger: ValidLoggerDefinition = "info"Logger level
Optional
preTopic: string = ...Defaultly all messages will be published on the following topics: <preTopic>/nope/<eventname>
. preTopic
is defaultly set to the hostname of the node in which NoPE
is running.
Optional
qos: 0 | 1 | 2 = 2The QOS of mqtt. see https://www.hivemq.com/blog/mqtt-essentials-part-6-mqtt-quality-of-service-levels/ for more details. Default = Exactly once. Otherwise there might be an issue.
Optional
forwardToCustomTopics: boolean = trueThe Layer is able to forward data, events etc to default ports. This flag enables this behavior
Flag, indication, whether the Layer is connected or not.
The Layer is able to forward data, events etc to default ports. This flag enables this behavior
See id
Defaultly all messages will be published on the following topics: <preTopic>/nope/<eventname>
. preTopic
is defaultly set to the hostname of the node in which NoPE
is running.
The QOS of mqtt. see https://www.hivemq.com/blog/mqtt-essentials-part-6-mqtt-quality-of-service-levels/ for more details. Default = Exactly once. Otherwise there might be an issue.
Readonly
receivesUsed to show, whether the the layer receives its own messages
ICommunicationInterface
Uri of the Broker. e.g. mqtt://localhost:1883
or ws://localhost:9000
.
See emit
See on
Generated using TypeDoc
Default implementation of an ICommunicationInterface.
This layer will use mqtt to connect and transport messages.
Defaultly all messages will be subscribed on the following topics:
+/nope/<eventname>
Defaultly all messages will be published on the following topics:
<preTopic>/nope/<eventname>
preTopic
is set to the hostname.The Layer is able to forward data, events etc to default ports. Asume data is emitted using the
dataChanged
emit. If the flagforwardToCustomTopics
is set to true, the path of the data will directly forward to mqtt.