class SinkPolicyEngineStateMachine
Defined at line 53 of file ../../src/devices/power/drivers/fusb302/pd-sink-state-machine.h
Implements the USB PD Sink Policy Engine state machine.
usbpd3.1 8.3.3 "State Diagrams", especially 8.3.3.3 "Policy Engine Sink Port
State Diagram"
Public Methods
void Reset ()
Called when the Type C port state changes.
Defined at line 39 of file ../../src/devices/power/drivers/fusb302/pd-sink-state-machine.cc
void DidReceiveSoftReset ()
Called when the driver reports the receipt of a Soft Reset message.
This is a separate method to facilitate interacting with hardware that
reports Soft Reset receipt via dedicated signals, instead of simply
bubbling the PD message's bytes up to the driver.
Drivers must always report Soft Reset receipt via this method. Soft Reset
must not also be reported as received PD messages.
Defined at line 43 of file ../../src/devices/power/drivers/fusb302/pd-sink-state-machine.cc
void SinkPolicyEngineStateMachine (usb_pd::SinkPolicy & policy, Fusb302 & device, inspect::Node inspect_root)
`policy` and `device` must remain alive throughout the new instance's
lifetime.
Defined at line 59 of file ../../src/devices/power/drivers/fusb302/pd-sink-state-machine.h
void SinkPolicyEngineStateMachine (const SinkPolicyEngineStateMachine & )
Defined at line 65 of file ../../src/devices/power/drivers/fusb302/pd-sink-state-machine.h
SinkPolicyEngineStateMachine & operator= (const SinkPolicyEngineStateMachine & )
Defined at line 66 of file ../../src/devices/power/drivers/fusb302/pd-sink-state-machine.h
void ~SinkPolicyEngineStateMachine ()
Defined at line 68 of file ../../src/devices/power/drivers/fusb302/pd-sink-state-machine.h
void ProcessUnexpectedMessage ()
Forces this instance to adjust its state to reply to an unexpected message.
Defined at line 345 of file ../../src/devices/power/drivers/fusb302/pd-sink-state-machine.cc
Protected Methods
void EnterState (SinkPolicyEngineState state)
The implementation follows Section 8.3.3.3 "Policy Engine Sink Port State
Diagram" and Section 8.3.3.4.2 "SOP Sink Port Soft Reset and Protocol Error
State Diagram" of the USB PD spec.
Defined at line 51 of file ../../src/devices/power/drivers/fusb302/pd-sink-state-machine.cc
void ExitState (SinkPolicyEngineState state)
Defined at line 228 of file ../../src/devices/power/drivers/fusb302/pd-sink-state-machine.cc
SinkPolicyEngineState NextState (SinkPolicyEngineInput input, SinkPolicyEngineState current_state)
Defined at line 133 of file ../../src/devices/power/drivers/fusb302/pd-sink-state-machine.cc
const char * StateToString (SinkPolicyEngineState state)
Defined at line 391 of file ../../src/devices/power/drivers/fusb302/pd-sink-state-machine.cc