class PowerRequestData
Defined at line 507 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h
Fields common to all RDO (power Request Data Object) types.
Conceptually, the RDO in the USB PD spec is a sum type (like std::variant).
Values have 32 bits. The type discriminant is conveyed indirectly by the top
4 bits, which must be combined with out-of-band information. Concretely, the
top 4 bits point to a PDO (Power Data Object) in a different message, and the
PDO's type determines the RDO type.
usbpd3.1 6.4.2 "Request Message" defines the high-level representation and
the formats for all subtypes. Subsections define field semantics.
Protected Members
uint32_t bits_
Public Methods
typename std::remove_reference_t<decltype(bits_)> related_power_data_object_position ()
The position of the related PDO (Power Data Object) in a related message.
Each RDO is based on a PDO in a message that lists power Source
capabilities. The PDO subtype determines the RDO's subtype, and PDO fields
set limits on the RDO fields. For example, an RDO based on a Fixed Supply
PDO may not request more current than is advertised in the PDO.
This field uses 1-based indexing, and the value 0 is reserved.
Defined at line 521 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h
usb_pd::PowerRequestData & set_related_power_data_object_position (typename std::remove_reference_t<decltype(bits_)> val)
The position of the related PDO (Power Data Object) in a related message.
Each RDO is based on a PDO in a message that lists power Source
capabilities. The PDO subtype determines the RDO's subtype, and PDO fields
set limits on the RDO fields. For example, an RDO based on a Fixed Supply
PDO may not request more current than is advertised in the PDO.
This field uses 1-based indexing, and the value 0 is reserved.
Defined at line 521 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h
usb_pd::PowerRequestData & set_supports_power_give_back (typename std::remove_reference_t<decltype(bits_)> val)
True if the Sink can honor GotoMin messages.
If true, the Sink must react to GotoMin messages by reducing its power
consumption to the minimum stated in the request object.
Defined at line 527 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h
typename std::remove_reference_t<decltype(bits_)> supports_power_give_back ()
True if the Sink can honor GotoMin messages.
If true, the Sink must react to GotoMin messages by reducing its power
consumption to the minimum stated in the request object.
Defined at line 527 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h
typename std::remove_reference_t<decltype(bits_)> capability_mismatch ()
True if the requested power is not sufficient for all the Sink's features.
Sinks are required to submit a power Request even when the Source's
capabilities are not sufficient for full operation. In that case, the Sink
must request enough power for a subset of its features. The subset could be
"do nothing" or "flash an LED indicating insufficient power".
Sources may also alert the user when this bit is set. For example, some
operating systems show insufficient power warnings.
Defined at line 538 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h
usb_pd::PowerRequestData & set_capability_mismatch (typename std::remove_reference_t<decltype(bits_)> val)
True if the requested power is not sufficient for all the Sink's features.
Sinks are required to submit a power Request even when the Source's
capabilities are not sufficient for full operation. In that case, the Sink
must request enough power for a subset of its features. The subset could be
"do nothing" or "flash an LED indicating insufficient power".
Sources may also alert the user when this bit is set. For example, some
operating systems show insufficient power warnings.
Defined at line 538 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h
usb_pd::PowerRequestData & set_supports_usb_communications (typename std::remove_reference_t<decltype(bits_)> val)
Indicates if the Sink can communicate over a USB data channel.
The data channels are D+/- introduced in usb2.0 and SS Tx/Rx introduced in
usb3.0.
Defined at line 544 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h
typename std::remove_reference_t<decltype(bits_)> supports_usb_communications ()
Indicates if the Sink can communicate over a USB data channel.
The data channels are D+/- introduced in usb2.0 and SS Tx/Rx introduced in
usb3.0.
Defined at line 544 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h
typename std::remove_reference_t<decltype(bits_)> prefers_waiving_usb_suspend ()
If true, the Sink is asking the Source to waive USB Suspend requirements.
This hint is meaningful when the related PDO (Power Data Object) has the
`requires_usb_suspend` bit set. The Source may react to the hint by making
a new offer (via a new Source_Capabilities message) that includes the same
PDO without the `requires_usb_suspend` bit set.
Setting this bit is not sufficient for the Sink to ignore USB Suspend
requirements. The Sink is only free to disregard USB Suspend if it
establishes a PD Contract based on a PDO without the `requires_usb_suspend`
bit.
Defined at line 557 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h
usb_pd::PowerRequestData & set_prefers_waiving_usb_suspend (typename std::remove_reference_t<decltype(bits_)> val)
If true, the Sink is asking the Source to waive USB Suspend requirements.
This hint is meaningful when the related PDO (Power Data Object) has the
`requires_usb_suspend` bit set. The Source may react to the hint by making
a new offer (via a new Source_Capabilities message) that includes the same
PDO without the `requires_usb_suspend` bit set.
Setting this bit is not sufficient for the Sink to ignore USB Suspend
requirements. The Sink is only free to disregard USB Suspend if it
establishes a PD Contract based on a PDO without the `requires_usb_suspend`
bit.
Defined at line 557 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h
usb_pd::PowerRequestData & set_supports_unchunked_extended_messages (typename std::remove_reference_t<decltype(bits_)> val)
True iff the Port can receive messages with more than 26 data bytes.
If true, the underlying BMC PHY must be designed to receive and transmit
extended messages up to 260-bytes.
Defined at line 563 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h
typename std::remove_reference_t<decltype(bits_)> supports_unchunked_extended_messages ()
True iff the Port can receive messages with more than 26 data bytes.
If true, the underlying BMC PHY must be designed to receive and transmit
extended messages up to 260-bytes.
Defined at line 563 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h
usb_pd::PowerRequestData & set_supports_extended_power_range (typename std::remove_reference_t<decltype(bits_)> val)
True iff the Sink supports EPR (Extended Power Range) operation.
Defined at line 566 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h
typename std::remove_reference_t<decltype(bits_)> supports_extended_power_range ()
True iff the Sink supports EPR (Extended Power Range) operation.
Defined at line 566 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h
void PowerRequestData (uint32_t bits)
Used to decode the fields common to all RDOs.
Defined at line 569 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h
void PowerRequestData (const PowerRequestData & )
Value type, copying is allowed.
Defined at line 574 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h
PowerRequestData & operator= (const PowerRequestData & )
Defined at line 575 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h
void ~PowerRequestData ()
Trivially destructible.
Defined at line 578 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 581 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h
Protected Methods
void PowerRequestData (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 591 of file ../../src/devices/power/drivers/fusb302/usb-pd-message-objects.h