Skip to main content

envelope_command

Function envelope_command 

Source
pub fn envelope_command(
    instruction: &Instruction,
    asset: &Asset,
    mode: PhaseMode,
) -> Result<Command, InstructError>
Expand description

The command that carries out a PEBC instruction on asset.

A producer is bounded from below (curtailment), a consumer from above. Which end of the envelope is the operative one is a property of the asset, not of the message — an inverter handed a ConsumptionCeiling would ignore it.

§Errors

InstructError when the instruction carries nothing usable for the asset.