mosh:protocol_overview
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| mosh:protocol_overview [2025/06/27 15:21] – [Notes] mosh | mosh:protocol_overview [2026/06/10 13:54] (current) – mosh | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | <WRAP important> | ||
| + | This page is retained for historical reference and may not reflect the current MOSH/ | ||
| + | See [[guide: | ||
| + | </ | ||
| ====== Architectural Overview ====== | ====== 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. |
| - | + | ||
| - | ===== Element Manager ===== | + | |
| - | + | ||
| - | The Element Manager is the hardware-to-MOSH interface. 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: | For example: | ||
| Line 15: | Line 15: | ||
| The Element Manager also maintains a list of element properties to be the used by the Virtual Wire Manager. | The Element Manager also maintains a list of element properties to be the used by the Virtual Wire Manager. | ||
| - | ===== Virtual Wire Manager ===== | ||
| - | |||
| - | Before an element can communicate with other elements, it must be placed on a Virtual Wire. A **Virtual Wire** in MOSH is a logical connection between two or more elements—similar to a physical wire that connects a switch to a light, but defined entirely in software. Virtual wires allow input elements (like buttons or sensors) to send signals to output elements (like LEDs or relays), regardless of where those elements reside on the network. | ||
| - | |||
| - | Virtual wires are transport-agnostic, | ||
| - | |||
| - | ==== Concept ==== | ||
| - | Virtual wires are declared in element configuration using the `virtual_wire` parameter. When an input element triggers a status message (e.g., `PRESS`, `STATE_ON`), | ||
| - | |||
| - | This allows you to create automation logic without hard-coding behavior into individual element classes. | ||
| - | |||
| - | ==== Runtime Behavior ==== | ||
| - | Virtual wires transmit: | + | The Element Manager ensures that elements: |
| - | Property change | + | * Are initialized and updated in the main loop |
| + | * Can emit and receive | ||
| + | * Report | ||
| - | Status messages (e.g., PRESS, LONG_PRESS) | + | The Element Manager enables modular, plug-and-play integration of inputs, outputs, and logic into the MOSH runtime. |
| + | =====🔌 Virtual Wire Manager===== | ||
| - | User-defined | + | The [[mosh: |
| - | The Element | + | By abstracting the connection layer, the Virtual Wire Manager |
| - | ==== Features ==== | + | Virtual wires form the backbone of decentralized automation in MOSH. |
| - | * One-to-many routing supported | + | =====📡 Transport Manager===== |
| - | * Elements can subscribe to multiple virtual wires | + | |
| - | * Cross-node and cross-transport compatible | + | |
| - | * Supports event-triggered or property-based messaging | + | |
| - | ==== Notes ==== | + | The Transport Manager oversees all communication interfaces used by a MOSH node. It handles registration, |
| - | * Virtual wires are not bidirectional—they flow from a source | + | Each transport is wrapped in a standardized MOSH class, allowing MOSH Core to send and receive |
| - | * Only output elements (like LEDs, relays) should act on incoming virtual wire messages. | + | |
| - | * Virtual wire delivery happens at priority level, ensuring timely response | + | |
| - | ===== Message Framer ===== | + | |
| - | The Message Framer is responsible for a variety of MOSH functions. Some of these functions include: | + | The Transport Manager: |
| - | * The final construction of MOSH Messages | + | * Maintains active transport instances |
| - | * Accepting | + | * Assigns network and node IDs per transport |
| - | * Accepting/ | + | * Manages |
| + | * Supports both point-to-point and broadcast-capable transports | ||
| - | ===== Transport Manager | + | The Transport Manager |
/var/www/wiki.moshnetworks.com/data/attic/mosh/protocol_overview.1751037670.txt.gz · Last modified: by mosh
