User Tools

Site Tools


mosh:protocol_overview

This is an old revision of the document!


Architectural Overview

The following diagram illustrates the overall architecture of the MOSH library.

🧩 Element Manager

The Element Manager is the hardware-to-MOSH interface, and is the subsystem responsible for managing all active elements on a MOSH node. It reads raw hardware data, and separates it into properties used by other MOSH elements. This separation allows an elements properties to reflect their intended use more clearly, and enables different properties from the same device to be routed independently. For example:

  • A basic switch's hardware state (0 or 1) is read by the Element Manager, and provides it to other MOSH elements as its logical state (e.g., On or Off).
  • A GPS module may provide multiple properties—location and time—that can be assigned to different Virtual Wires.

The Element Manager also maintains a list of element properties to be the used by the Virtual Wire Manager.

The Element Manager ensures that elements:

  • Are initialized and updated in the main loop
  • Can emit and receive messages via virtual wires or direct commands
  • Report state changes through a unified property interface

The Element Manager enables modular, plug-and-play integration of inputs, outputs, and logic into the MOSH runtime.

🔌 Virtual Wire Manager

The Virtual Wire Manager is responsible for routing messages between elements based on their assigned virtual wire IDs. It acts as a logical patch panel, allowing input elements (like buttons, sensors, or timers) to trigger actions on output elements (like LEDs, relays, or motors) without direct coupling.

By abstracting the connection layer, the Virtual Wire Manager enables modular, transport-agnostic automation across distributed nodes. It ensures that status or property change messages are delivered in real time to all elements subscribed to a given wire, regardless of their physical location or transport layer.

Virtual wires form the backbone of decentralized automation in MOSH.

Message Framer

The Message Framer is responsible for a variety of MOSH functions. Some of these functions include:

  • The final construction of MOSH Messages
  • Accepting message requests from the Virtual-Wire Manager
  • Accepting/Sending messages to/from the Transport Manager

Transport Manager

/var/www/wiki.moshnetworks.com/data/attic/mosh/protocol_overview.1751038419.txt.gz · Last modified: by mosh

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki