In SystemService.cpp [components/generic/servicemanager/src/services/systemservice.cpp] there is a #include that I can't find:

#if defined(HAS_API_SYSTEM) && defined(HAS_API_POWERSTATE)
#include "powerstate.h"
#endif

Later on when handling Power Commands we see this, which is not conditional:

else if( method == METHOD_SYSTEM_SET_POWER_STATE && getApiVersionNumber() >= 2 )
{
QString powerState;
QVariantList list = params["params"].toList();
if(list.length()>0)
powerState = list.first().toString();
bool ok = CPowerState::instance()->setPowerState(powerState);
returnResult["success"] = QVariant(ok);
}

Where can I find this class, which seems to bind the request to the IARM_BUS Power commands served by components/generic/iarmmgrs/power/pwrMgr.c

The code I'm looking at is current as of 7/1/14 and the SHA1 of servicemanager is 6c1255718e4a459070837938307930574e00e49c

Thanks,

Howard

 

  • No labels

4 Comments

  1. I had a dig in a platform repo and found that CPowerState is defined there.

    The implementation posts the power events to either iARM or iARM_BUS depending on build flags.

    Any reason why this isn't generic code?

     

  2. Power manager is a SoC dependent component hence its implementation is in the platform specific repo.

     

     

    1. I have no problem with the implementation being Platform Specific, but the header shouldn't be.

      The header should be in a Generic include location otherwise how can a generic implementation reference it?

      Also, if the RDK is to use iARM and iARM bus as the API to the platform, surely you should be sending messages with that...