Definition of the user request.
Request to set power to the
Source code in
adjust_power: bool = True
Whether to adjust the power to match the bounds.
True, the power will be adjusted (lowered) to match the bounds, so
only the reduced power will be set.
False and the power is outside the batteries' bounds, the request will
fail and be replied to with an
The component ids of the batteries to be used for this request.
include_broken_batteries: bool = False
Whether to use all batteries included in the batteries set regardless the status.
If set to
True, the power distribution algorithm will consider all batteries,
including the broken ones, when distributing power. In such cases, any remaining
power after distributing among the available batteries will be distributed equally
among the unavailable (broken) batteries. If all batteries in the set are
unavailable, the power will be equally distributed among all the unavailable
batteries in the request.
If set to
False, the power distribution will only take into account the available
batteries, excluding any broken ones.
The namespace of the request.
This will be used to identify the channel for sending the response into, in the channel registry.
The requested power.
request_timeout: timedelta = timedelta(seconds=5.0)
The maximum amount of time to wait for the request to be fulfilled.