Skip to main content

frequenz_microgrid/
lib.rs

1// License: MIT
2// Copyright © 2025 Frequenz Energy-as-a-Service GmbH
3
4#![doc = include_str!("../README.md")]
5#![cfg_attr(
6    not(test),
7    deny(
8        clippy::unwrap_used,
9        clippy::expect_used,
10        clippy::panic,
11        clippy::unimplemented,
12        clippy::todo,
13        clippy::unreachable,
14    )
15)]
16
17mod bounds;
18pub use bounds::Bounds;
19
20pub mod client;
21pub use client::MicrogridClientHandle;
22
23mod error;
24pub use error::{Error, ErrorKind};
25
26pub mod quantity;
27
28mod sample;
29pub use sample::Sample;
30
31mod logical_meter;
32pub use logical_meter::{Formula, FormulaSubscriber, LogicalMeterConfig, LogicalMeterHandle};
33
34// Re-exported so callers can build the config accepted by
35// [`LogicalMeterConfig::with_component_graph_config`] without depending on the
36// component-graph crate directly.
37pub use frequenz_microgrid_component_graph::ComponentGraphConfig;
38
39pub mod metric;
40
41pub(crate) mod wall_clock_timer;
42
43mod microgrid;
44pub use microgrid::{
45    BatteryPool, BatteryPoolSnapshot, ComponentHealthPartition, InverterBatteryGroup,
46    InverterBatteryGroupStatus, Microgrid, PvPool, PvPoolSnapshot,
47};
48
49#[cfg(any(test, feature = "test-utils"))]
50pub use client::test_utils;