srad_eon/lib.rs
1//! Part of [srad](https://crates.io/crates/srad), a general purpose [Sparkplug](https://sparkplug.eclipse.org/) development library in rust.
2//!
3//! This library defines a framework for implementing Sparkplug Edge of Network Nodes.
4//!
5//! # Overview
6//!
7//! `srad-eon` provides a general implementation of a Sparkplug Node.
8//!
9//! The implementation requires the provision of [MetricManager] implementations to the node or when registering devices. This allows for
10//! defining metrics which belong to the node or device as well as the custom handling of CMD messages for those metrics.
11//!
12//! The node starts a tokio `task` for each incoming CMD message.
13//!
14
15mod birth;
16mod builder;
17mod device;
18mod error;
19mod metric;
20mod metric_manager;
21mod node;
22mod registry;
23
24pub use birth::{BirthInitializer, BirthMetricDetails};
25pub use builder::EoNBuilder;
26pub use device::DeviceHandle;
27pub use metric::*;
28pub use metric_manager::manager::{
29 DeviceMetricManager, MetricManager, NoMetricManager, NodeMetricManager,
30};
31pub use metric_manager::simple::SimpleMetricManager;
32pub use node::{EoN, NodeHandle};
33
34#[derive(Debug, PartialEq)]
35pub(crate) enum BirthType {
36 Birth,
37 Rebirth,
38}