pub struct PowerLimitBridge { /* private fields */ }Expand description
Map one pair of commissioned MMS controls to a consumption or production Energy Guard.
Implementations§
Source§impl PowerLimitBridge
impl PowerLimitBridge
Sourcepub fn new(
direction: Direction,
percent_control: &str,
release_control: &str,
device: AddressDevice,
rated_watts: NonZeroU32,
) -> Result<Self, BridgeError>
pub fn new( direction: Direction, percent_control: &str, release_control: &str, device: AddressDevice, rated_watts: NonZeroU32, ) -> Result<Self, BridgeError>
Bind the limit and release controls to one device, power rating and direction.
Sourcepub fn schedule(
&self,
guard: &mut EnergyGuardActor,
event: &ControlEvent,
expires_at: Duration,
now: Duration,
) -> Result<ScheduledLimit, BridgeError>
pub fn schedule( &self, guard: &mut EnergyGuardActor, event: &ControlEvent, expires_at: Duration, now: Duration, ) -> Result<ScheduledLimit, BridgeError>
Schedule an authorized event before its monotonic admission deadline. Delivery, acknowledgement and physical enforcement are later outcomes.
Auto Trait Implementations§
impl Freeze for PowerLimitBridge
impl RefUnwindSafe for PowerLimitBridge
impl Send for PowerLimitBridge
impl Sync for PowerLimitBridge
impl Unpin for PowerLimitBridge
impl UnsafeUnpin for PowerLimitBridge
impl UnwindSafe for PowerLimitBridge
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more