class BatteryPowerRequestData

Defined at line 686 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h

RDO based on a battery power supply PDO.

See `PowerRequestData` for a general description of the RDO (power

Request Data Object) representation.

See `PowerData` for a general description of the PDO (Power Data Object)

representation, and `BatteryPowerSupplyData` for battery power supply PDOs.

usbpd3.1 6.4.2 "Request Message", Tables 6-23 "Battery Request Data Object"

and 6-24 "Battery Request Data Object with GiveBack Support"

Public Methods

typename std::remove_reference_t<decltype(bits_)> operating_power_250mw ()

The Sink's (estimated) power consumption, in multiples of 250 mW.

Defined at line 689 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h

usb_pd::BatteryPowerRequestData & set_operating_power_250mw (typename std::remove_reference_t<decltype(bits_)> val)

The Sink's (estimated) power consumption, in multiples of 250 mW.

Defined at line 689 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h

typename std::remove_reference_t<decltype(bits_)> limit_power_250mw ()

The Sink's maximum or minimum power consumption, in multiples of 250 mW.

Defined at line 692 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h

usb_pd::BatteryPowerRequestData & set_limit_power_250mw (typename std::remove_reference_t<decltype(bits_)> val)

The Sink's maximum or minimum power consumption, in multiples of 250 mW.

Defined at line 692 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h

int32_t operating_power_mw ()

The Sink's (estimated) power consumption, in mW (millwatts).

The Source uses this estimate to manage its power reserve, and power

distribution across multiple ports.

The Sink is expected to send a new Request message when its estimated

current consumption changes.

This field must be at most `maximum_power_mw()` in the related

BatteryPowerSupplyData object.

Defined at line 704 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h

BatteryPowerRequestData & set_operating_power_mw (int32_t power_mw)

Defined at line 710 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h

int32_t limit_power_mw ()

The Sink's maximum or minimum power consumption, in mW (milliwatts).

If `supports_power_give_back` is true, this is the Sink's minimum operating

power, which can be requested via a GotoMin message.

If `supports_power_give_back` is false, this is the maximum amount of power

that the Sink may ever consume. `operating_power_mw()` must be below this

value.

If `capabilities_mismatch` is true, this field may exceed

`maximum_power_mw()` in the related BatteryPowerSupplyData object. If

`capabilities_mismatch` is false, this field must be at most

`maximum_power_mw()`.

Defined at line 727 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h

BatteryPowerRequestData & set_limit_power_mw (int32_t power_mw)

Defined at line 732 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h

BatteryPowerRequestData CreateForPosition (int32_t related_power_data_object_position)

Defined at line 736 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h

void BatteryPowerRequestData (uint32_t bits)

Defined at line 740 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h

void BatteryPowerRequestData (PowerRequestData request_data)

Defined at line 741 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h

void BatteryPowerRequestData (int32_t related_power_data_object_position, PositionTag )

Instance with all fields except for PDO position set to zero.

This is most likely an invalid RDO. At a minimum, power consumption must be

set before use in a PD message.

Defined at line 748 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h

void BatteryPowerRequestData (const BatteryPowerRequestData & )

Value type, copying is allowed.

Defined at line 752 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h

BatteryPowerRequestData & operator= (const BatteryPowerRequestData & )

Defined at line 753 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h

bool operator== (const BatteryPowerRequestData & other)

Defined at line 755 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h