46static_assert(
sizeof(ConnectForwarder) <=
sizeof(
void *));
47static_assert(std::is_trivially_copyable_v<ConnectForwarder>);
48static_assert(
sizeof(DisconnectForwarder) <=
sizeof(
void *));
49static_assert(std::is_trivially_copyable_v<DisconnectForwarder>);
50static_assert(
sizeof(PowerReadyForwarder) <=
sizeof(
void *));
51static_assert(std::is_trivially_copyable_v<PowerReadyForwarder>);
52static_assert(
sizeof(ErrorForwarder) <=
sizeof(
void *));
53static_assert(std::is_trivially_copyable_v<ErrorForwarder>);
void trigger(const Ts &...x) ESPHOME_ALWAYS_INLINE
@ PD_STATE_EXPLICIT_CONTRACT
@ PD_STATE_PD_TIMEOUT
Negotiation is over without a PD contract (no capabilities, or the request was not accepted); the sou...
bool is_connected_state(PdState state)
Returns true for the states in which a source is attached and supplying power.
Triggers when a source is attached, including after recovering from a communication error.
void operator()(PdState state, PdState previous) const
Triggers when the source is removed, or is no longer known to be attached because communication faile...
void operator()(PdState state, PdState previous) const
Triggers when communication with the chip fails.
void operator()(PdState state, PdState previous) const
Triggers when negotiation is finished: a new PD contract is in place, or the source does not speak PD...
void operator()(PdState state, PdState) const