class VariablePowerSupplyData

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

Power supply that lacks good voltage regulation, so its voltage may vary.

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

representation.

usbpd3.1 6.4.1.2.3 "Variable Supply (non-Battery) Power Data Object" and

6.4.1.3.2 "Variable Supply (non-Battery) Power Data Object".

Public Methods

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

The power source's maximum voltage, in multiplies of 50 mV.

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

usb_pd::VariablePowerSupplyData & set_maximum_voltage_50mv (typename std::remove_reference_t<decltype(bits_)> val)

The power source's maximum voltage, in multiplies of 50 mV.

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

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

The power source's minimum voltage, in multiplies of 50 mV.

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

usb_pd::VariablePowerSupplyData & set_minimum_voltage_50mv (typename std::remove_reference_t<decltype(bits_)> val)

The power source's minimum voltage, in multiplies of 50 mV.

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

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

The maximum current offered by the source, in multiples of 10 mA.

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

usb_pd::VariablePowerSupplyData & set_maximum_current_10ma (typename std::remove_reference_t<decltype(bits_)> val)

The maximum current offered by the source, in multiples of 10 mA.

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

int32_t maximum_voltage_mv ()

The power source's maximum voltage, in mV (millivolts).

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

VariablePowerSupplyData & set_maximum_voltage_mv (int32_t voltage_mv)

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

int32_t minimum_voltage_mv ()

The power source's minimum voltage, in mV (millivolts).

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

VariablePowerSupplyData & set_minimum_voltage_mv (int32_t voltage_mv)

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

int32_t maximum_current_ma ()

The maximum current offered by the source, in mA (milliamperes).

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

VariablePowerSupplyData & set_maximum_current_ma (int32_t current_ma)

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

void VariablePowerSupplyData (PowerData power_data)

Debug-checked casting from PowerData.

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

void VariablePowerSupplyData ()

Instance with all fields except for type set to zero.

This is an invalid PDO (power data object). At a minimum, voltage and

maximum current must be set before use in a PD message.

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

void VariablePowerSupplyData (const VariablePowerSupplyData & )

Value type, copying is allowed.

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

VariablePowerSupplyData & operator= (const VariablePowerSupplyData & )

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

void ~VariablePowerSupplyData ()

Trivially destructible.

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

uint32_t operator unsigned int ()

Support explicit casting to uint32_t.

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

bool operator== (const VariablePowerSupplyData & other)

In C++20, equality comparison can be defaulted.

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

bool operator!= (const VariablePowerSupplyData & other)

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