mabi-cli 1.5.0

Mabinogion - Industrial Protocol Simulator CLI
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use mabi_runtime::{ProtocolCatalogEntry, ProtocolDriverRegistry};

/// Builds the workspace protocol driver registry from crate-owned drivers.
pub fn workspace_protocol_registry() -> ProtocolDriverRegistry {
    let mut registry = ProtocolDriverRegistry::new();
    registry.register(mabi_modbus::driver());
    registry.register(mabi_opcua::driver());
    registry.register(mabi_bacnet::driver());
    registry.register(mabi_knx::driver());
    registry
}

/// Returns the stable protocol catalog for CLI inspection surfaces.
pub fn protocol_catalog() -> Vec<ProtocolCatalogEntry> {
    workspace_protocol_registry().catalog()
}