PowerDomainStats(PowerDomain &pd)
void setFollowerPowerStates()
Update the followers of the newly updated power state.
Stats::Scalar numLeaderCalls
The PowerDomain groups PowerState objects together to regulate their power states.
PowerDomain(const PowerDomainParams *p)
void regStats() override
Callback to set stat parameters.
std::vector< PowerState * > followers
List of all followers in the PowerDomain.
std::vector< PowerState * > leaders
List of all leaders in the PowerDomain.
PowerDomain::PowerDomainStats stats
const Tick updateLatency
Latency with which power state changes of the leaders will ripple through to the followers.
void pwrStateChangeCallback(Enums::PwrState new_pwr_state, PowerState *leader)
Register the change in power state in one of the leader.
void addFollower(PowerState *pwr_obj) override
Function called by a follower to register itself as a dependant of this power domain.
void calculatePossiblePwrStates()
Calculate the possible power states of the domain based upon the intersection of the power states of ...
Stats::Scalar numLeaderCallsChangingState
bool isPossiblePwrState(Enums::PwrState p_state)
Check if a given p_state is available across all leaders and followers in this domain.
Enums::PwrState leaderTargetState
Power state requested by the leader.
void startup() override
During startup, the list of possible power states the PowerDomain can be in is populated,...
Enums::PwrState calculatePowerDomainState(const std::vector< Enums::PwrState > &f_states={})
Calculate the power state of the power domain, based upon the power states of the leaders.
EventWrapper< PowerDomain, &PowerDomain::setFollowerPowerStates > pwrStateUpdateEvent
Event to update the power states of the followers.