Interface ICommunicationInterface

A layer is an element that is used to establish a communication connection. This element implements the connection (e.g. a MQTT layer).

A layer is utilized by the ICommunicationBridge

A layer has the following functionalities provided by its interface:

  • The layer must implement the methods on, which are used to listen for various events that can be subscribed to by the nope systems.
  • Messages are sent out using the emit method.
  • The connection status of the layer is indicated in the connected observable. This value is allowed to be true only if there is a connection.
  • Sometimes the layer receives its own messages (the implementation of an udp-broadcast based layer, while broadcasting we will receive our own messages). If this is the case, the receivesOwnMessages flag must be set to true to prevent messages from being received twice.
  • If a layer is not used, we can destroy it with dispose.

Currently there are 3 layers implemented:

Export

ICommunicationInterface

Hierarchy

Implemented by

Properties

connected: INopeObservable<boolean, boolean, boolean, IEventAdditionalData>

Flag, indication, whether the Layer is connected or not.

id: string

ID of the Layer.

Author

M.Karkowski

Memberof

ICommunicationInterface

receivesOwnMessages: boolean

Used to show, whether the the layer receives its own messages

Memberof

ICommunicationInterface

Methods

  • Helper to detail the listeners of the "event", "rpc", "data" or "responses"

    Parameters

    • type: "event" | "rpc" | "data" | "response"

      valid type to detail the name

    • listeners: string[]

      the currently used listeners.

    Returns any

Generated using TypeDoc