# TCU activity manager **Detailed Description** This section contains APIs related to TCU activity state management. - *group* Telematics\_power\_manager - Typedefs - typedef std::pair<std::string, std::string> ClientInfo - A client represented with a client and machine name pair. First element is client’s name and second element is machine’s name. Enums - enum class TcuActivityState - Power states. *Values:* - enumerator UNKNOWN - Current power state is unknown - enumerator SUSPEND - Master client uses it to indicate that the given machine(s) should suspend (enter lowest power state). Slave client receives it when the machine is about to suspend. - enumerator RESUME - Master client uses it to indicate that the given machine(s) should resume (resume operating at normal power level). Slave client receives it when the machine is about to suspend. - enumerator SHUTDOWN - Master client uses it to indicate that the given machine(s) should power-off. Slave client receives it when the machine is about to get powered-off. - enum class StateChangeResponse - Acknowledgement to accept or deny to transition to the notified power state. *Values:* - enumerator ACK - Ready to change state - enumerator NACK - Not ready to change state - enum class ClientType - Defines a client’s role in the power management. A master client can cause power state change whereas a slave client listens to the state change. In a system there can be only one master client and any number of slave clients. *Values:* - enumerator SLAVE - Slave client - enumerator MASTER - Master client - enum class MachineEvent - Confirms whether a machine is registered with the power management framework or not. *Values:* - enumerator AVAILABLE - Machine is registered - enumerator UNAVAILABLE - Machine is unregistered (for example, crashed, rebooted, shutdown) - enum class TcuActivityStateAck - Defines the acknowledgements to TCU-activity states. The client process sends this after processing the TcuActivityState notification, indicating that it is prepared for state transition. Acknowledgement for [TcuActivityState::RESUME](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1ga6efe388feb8f1e42a4edf85ec56f1b62.html#a00518_1gga6efe388feb8f1e42a4edf85ec56f1b62abac2aec3ee8d7d495123dbe5ca2fdac9) is not required, as the state transition has already happened. Deprecated The API [ITcuActivityManager::sendActivityStateAck](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01898_1a03b13d5d4574f585976f7e2dab5cfbbb) (TCUActivityStateAck) that uses this enum is deprecated. Instead, use [ITcuActivityManager::sendActivityStateAck](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01898_1a03b13d5d4574f585976f7e2dab5cfbbb) (StateChangeResponse, TcuActivityState). *Values:* - enumerator SUSPEND\_ACK - processed [TcuActivityState::SUSPEND](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1ga6efe388feb8f1e42a4edf85ec56f1b62.html#a00518_1gga6efe388feb8f1e42a4edf85ec56f1b62aee93a0b023cef18b34ebfee347881c14) notification - enumerator SHUTDOWN\_ACK - processed [TcuActivityState::SHUTDOWN](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1ga6efe388feb8f1e42a4edf85ec56f1b62.html#a00518_1gga6efe388feb8f1e42a4edf85ec56f1b62ab9984206799a7f9fe4bd1b6c18db8112) notification Variables - static const std::string ALL\_MACHINES = "ALL\_MACHINES" - Collectively represents all the machines on the platform. For example, on hypervisor based system it includes hostvm, televm and fotavm. - static const std::string LOCAL\_MACHINE = "LOCAL\_MACHINE" - Machine on which the caller process is running. On hypervisor based system local machine is the virtual machine on which the caller process is running. - class PowerFactory - [PowerFactory](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01886) allows creation of an [ITcuActivityManager](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01898). Public Functions - virtual std::shared\_ptr<[ITcuActivityManager](https://docs.qualcomm.com/doc/80-PF458-2/topic/class_a01898.html#_CPPv4N5telux5power19ITcuActivityManagerE)> getTcuActivityManager([ClientInstanceConfig](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#_CPPv4N5telux5power20ClientInstanceConfigE) config, telux::common::[InitResponseCb](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00546_1ab92f90010203f914a62cec6bd7af0a1a.html#_CPPv4N5telux6common14InitResponseCbE) callback = nullptr) = 0 - Gets the [ITcuActivityManager](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01898) instance. The instance is configured for the given client type (master/slave role) and identified with the given unique name. Note Recommended for both hypervisor and non-hypervisor based systems. - Parameters: - - **config** – **[in]** Describes the client - **callback** – **[in]** Optional, receives result of the [ITcuActivityManager](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01898) initialization - Returns: - [ITcuActivityManager](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01898) instance - virtual std::shared\_ptr<[IWakeupManager](https://docs.qualcomm.com/doc/80-PF458-2/topic/class_a01914.html#_CPPv4N5telux5power14IWakeupManagerE)> getWakeupManager(telux::common::[InitResponseCb](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00546_1ab92f90010203f914a62cec6bd7af0a1a.html#_CPPv4N5telux6common14InitResponseCbE) callback = nullptr) = 0 - Gets the [IWakeupManager](https://docs.qualcomm.com/doc/80-PF458-2/topic/class_a01914.html#a01914) instance. - Parameters: - **callback** – **[in]** Optional, receives result of the [IWakeupManager](https://docs.qualcomm.com/doc/80-PF458-2/topic/class_a01914.html#a01914) initialization - Returns: - [IWakeupManager](https://docs.qualcomm.com/doc/80-PF458-2/topic/class_a01914.html#a01914) instance - virtual std::shared\_ptr<[ITcuActivityManager](https://docs.qualcomm.com/doc/80-PF458-2/topic/class_a01898.html#_CPPv4N5telux5power19ITcuActivityManagerE)> getTcuActivityManager([ClientType](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1gae6b12b123cc294599f69b9a846baf4b9.html#_CPPv4N5telux5power10ClientTypeE) clientType = [ClientType](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1gae6b12b123cc294599f69b9a846baf4b9.html#_CPPv4N5telux5power10ClientTypeE)::[SLAVE](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1gae6b12b123cc294599f69b9a846baf4b9.html#_CPPv4N5telux5power10ClientType5SLAVEE), common::[ProcType](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1gac0611885856c28dedfac20b47bcd93e2.html#_CPPv4N5telux6common8ProcTypeE) procType = common::[ProcType](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1gac0611885856c28dedfac20b47bcd93e2.html#_CPPv4N5telux6common8ProcTypeE)::[LOCAL\_PROC](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1gac0611885856c28dedfac20b47bcd93e2.html#_CPPv4N5telux6common8ProcType10LOCAL_PROCE), telux::common::[InitResponseCb](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00546_1ab92f90010203f914a62cec6bd7af0a1a.html#_CPPv4N5telux6common14InitResponseCbE) callback = nullptr) = 0 - Gets the [ITcuActivityManager](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01898) instance. Deprecated Use [PowerFactory::getTcuActivityManager](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01886_1a847a4258315253ac21004cbeb0dd597f)([ClientInstanceConfig](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a01890.html#a01890) config, [telux::common::InitResponseCb](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00546_1ab92f90010203f914a62cec6bd7af0a1a.html#a00546_1ab92f90010203f914a62cec6bd7af0a1a) callback) instead. Note This cannot be used on hypervisor based systems. Alternative API [PowerFactory::getTcuActivityManager](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01886_1a847a4258315253ac21004cbeb0dd597f)([ClientInstanceConfig](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a01890.html#a01890) config, [telux::common::InitResponseCb](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00546_1ab92f90010203f914a62cec6bd7af0a1a.html#a00546_1ab92f90010203f914a62cec6bd7af0a1a) callback) should be used. - Parameters: - - **clientType** – **[in]** Defines the role; master or slave - **procType** – **[in]** Processor type on which the operations will be performed [telux::common::ProcType](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1gac0611885856c28dedfac20b47bcd93e2.html#a00500_1gac0611885856c28dedfac20b47bcd93e2). [telux::common::ProcType::REMOTE\_PROC](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1gac0611885856c28dedfac20b47bcd93e2.html#a00500_1ggac0611885856c28dedfac20b47bcd93e2a0b68e165ac41c892539b27076bea0789) is not supported. - **callback** – **[in]** Optional, receives result of the [ITcuActivityManager](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01898) initialization - Returns: - [ITcuActivityManager](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01898) instance Public Static Functions - static [PowerFactory](https://docs.qualcomm.com/doc/80-PF458-2/topic/class_a01886.html#_CPPv4N5telux5power12PowerFactoryE) &getInstance() - Gets the [PowerFactory](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01886) instance. Private Functions - PowerFactory(const [PowerFactory](https://docs.qualcomm.com/doc/80-PF458-2/topic/class_a01886.html#_CPPv4N5telux5power12PowerFactory12PowerFactoryERK12PowerFactory)&) = delete - - [PowerFactory](https://docs.qualcomm.com/doc/80-PF458-2/topic/class_a01886.html#_CPPv4N5telux5power12PowerFactoryE) &operator=(const [PowerFactory](https://docs.qualcomm.com/doc/80-PF458-2/topic/class_a01886.html#_CPPv4N5telux5power12PowerFactoryE)&) = delete - - struct ClientInstanceConfig - [ITcuActivityManager](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01898) configuration. Public Members - [ClientType](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1gae6b12b123cc294599f69b9a846baf4b9.html#_CPPv4N5telux5power10ClientTypeE) clientType = [ClientType](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1gae6b12b123cc294599f69b9a846baf4b9.html#_CPPv4N5telux5power10ClientTypeE)::[SLAVE](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1gae6b12b123cc294599f69b9a846baf4b9.html#_CPPv4N5telux5power10ClientType5SLAVEE) - [ClientType](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1gae6b12b123cc294599f69b9a846baf4b9.html#a00518_1gae6b12b123cc294599f69b9a846baf4b9) (master or slave). - std::string clientName - Uniquely identifies a client. This name is passed back to the client by [ITcuActivityListener::onSlaveAckStatusUpdate](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01894_1ae72a31a385f4855fc355a3f5a8fd22b2). It is mandatory and must be unique. To maintain uniqueness, a tuple of machine name, process name and process ID can be used (machineName\_ProcessName\_ProcessId). - std::string machineName = [LOCAL\_MACHINE](https://docs.qualcomm.com/doc/80-PF458-2/topic/variable_a00518_1gacaa7dbccc13f14fff18617e49e9c3e48.html#_CPPv4N5telux5power13LOCAL_MACHINEE) - For slave clients, specifies machine(s) whose power state change it will listen to. [ALL\_MACHINES](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a00518_1ga6b9b71cb4cc8dbb8e22080d7cfce02af) can be used to listen to all machines. By default, local machine on which the client process is running is listened. For master clients it is unused. - class ITcuActivityListener : public telux::common::[ISDKListener](https://docs.qualcomm.com/doc/80-PF458-2/topic/class_a00710.html#_CPPv4N5telux6common12ISDKListenerE) - Receives notifications when there is a machine’s power state change, machine’s availability change or consolidated acknowledgement from the slave clients. It is recommended that the client should not perform any blocking/sleeping operation from within methods in this class to ensure smooth transitions into different power states. Also the implementation should be thread safe. Public Functions - inline virtual void onTcuActivityStateUpdate([TcuActivityState](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1ga6efe388feb8f1e42a4edf85ec56f1b62.html#_CPPv4N5telux5power16TcuActivityStateE) newState, std::string machineName) - Called when the power state of the machine for which the client registered is about to change. Called only for the slave clients not for the master client. Upon receiving this update, client must acknowledge with the appropriate response StateChangeResponsethrough using [ITcuActivityManager::sendActivityStateAck](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01898_1a03b13d5d4574f585976f7e2dab5cfbbb) so that the platform’s power management framework can take the next appropriate step. When a slave client receives this update for suspend state, it is expected that it should release all wakelocks and either pause or terminate operations that may prevent the given machine from entering into low power state. - Parameters: - - **newState** – **[in]** New power state - **machineName** – **[in]** Machine changing the state; [LOCAL\_MACHINE](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a00518_1gacaa7dbccc13f14fff18617e49e9c3e48) or [ALL\_MACHINES](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a00518_1ga6b9b71cb4cc8dbb8e22080d7cfce02af) - inline virtual void onSlaveAckStatusUpdate(const telux::common::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#_CPPv4N5telux6common6StatusE) status, const std::string machineName, const std::vector<[ClientInfo](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00518_1ga029b9950378692e5ab44093829cf303b.html#_CPPv4N5telux5power10ClientInfoE)> unresponsiveClients, const std::vector<[ClientInfo](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00518_1ga029b9950378692e5ab44093829cf303b.html#_CPPv4N5telux5power10ClientInfoE)> nackResponseClients) - Called only for the master client, provides consolidated responses from the slave clients. This is not called for transitioning to resumed state. On platforms with access control enabled, the client needs to have TELUX\_POWER\_CONTROL\_STATE permission for this listener API to be invoked. Note Recommended for both hypervisor and non-hypervisor based systems. - Parameters: - - **status** – **[in]** [telux::common::Status::SUCCESS](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#a00500_1gga45eeeff7c2860e02ae447d588d3d6e4dad0749aaba8b833466dfcbb0428e4f89c) if all the slaves responded with [StateChangeResponse::ACK](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1ga3a53da8d988dac10e96911f6c5c96b65.html#a00518_1gga3a53da8d988dac10e96911f6c5c96b65a0fc437bc317835cad5faafc12a83fad5), [telux::common::Status::EXPIRED](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#a00500_1gga45eeeff7c2860e02ae447d588d3d6e4da38afd7ae34bd5e3e6fc170d8b09178a3) if at least one slave did not respond within time limit, [telux::common::Status::NOTREADY](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#a00500_1gga45eeeff7c2860e02ae447d588d3d6e4da1186763f6a7d50c27807c9e63744c51f) if at least one slave responded with [StateChangeResponse::NACK](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1ga3a53da8d988dac10e96911f6c5c96b65.html#a00518_1gga3a53da8d988dac10e96911f6c5c96b65aa68c6c77586d4c740ec1b75b65b37946), appropriate status code corresponding to the most number of clients if they responded differently. - **machineName** – **[in]** Machine changing the state; [LOCAL\_MACHINE](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a00518_1gacaa7dbccc13f14fff18617e49e9c3e48) or [ALL\_MACHINES](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a00518_1ga6b9b71cb4cc8dbb8e22080d7cfce02af) - **unresponsiveClients** – **[in]** Slaves that did not respond at all - **nackResponseClients** – **[in]** Slaves with TcuActivityStateChangeResponse::NACK response - inline virtual void onMachineUpdate(const std::string machineName, const [MachineEvent](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1gab37e224585e14d20f72e6ec2ce69d068.html#_CPPv4N5telux5power12MachineEventE) machineEvent) - Called when a machine registers/unregisters with the power management framework to participate in the platform coordinated suspend/resume/shutdown state transitions. Primarily intended for the master client. - Parameters: - - **machineName** – **[in]** Machine (for example, qcom,mdm or qcom,eap, etc.) - **machineEvent** – **[in]** [MachineEvent::AVAILABLE](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1gab37e224585e14d20f72e6ec2ce69d068.html#a00518_1ggab37e224585e14d20f72e6ec2ce69d068a1588118736b5ecdb1ac20c16428d8ea7) if the machine is registered [MachineEvent::UNAVAILABLE](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1gab37e224585e14d20f72e6ec2ce69d068.html#a00518_1ggab37e224585e14d20f72e6ec2ce69d068a084f4ca2c0fe703e46514a144b4d6ead) if the machine is unregistered - inline virtual void onSlaveAckStatusUpdate(telux::common::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#_CPPv4N5telux6common6StatusE) status) - Called only for the master client, provides consolidated responses from the slave clients. On platforms with access control enabled, the client needs to have TELUX\_POWER\_CONTROL\_STATE permission for this listener API to be invoked. Deprecated Use [onSlaveAckStatusUpdate](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01894_1ae72a31a385f4855fc355a3f5a8fd22b2)(const [telux::common::Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#a00500_1ga45eeeff7c2860e02ae447d588d3d6e4d) status, const std::string machineName, const std::vector<std::pair<std::string, std::string>> unresponsiveClients, const std::vector<std::pair<std::string, std::string>> nackResponseClients) instead. Note This API should not be used on virtual machines or on systems with hypervisor. The alternative API [onSlaveAckStatusUpdate](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01894_1ae72a31a385f4855fc355a3f5a8fd22b2)([telux::common::Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#a00500_1ga45eeeff7c2860e02ae447d588d3d6e4d) status, std::string machineName, std::vector<std::string> unresponsiveClients, std::vector<std::string> nackResponseClients) should be used. - Parameters: - **status** – **[in]** Status of the slave client’s acknowledgements - inline virtual void onTcuActivityStateUpdate([TcuActivityState](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1ga6efe388feb8f1e42a4edf85ec56f1b62.html#_CPPv4N5telux5power16TcuActivityStateE) newState) - Called when the power state is going to change. Deprecated Use [onTcuActivityStateUpdate](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01894_1a7e4c3a2b8e312af467553b7c6ce95587)(TcuActivityState newState, bool isGlobalStateChange) instead. - Parameters: - **newState** – **[in]** New power state - inline virtual ~ITcuActivityListener() - Destructor of [ITcuActivityListener](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01894). - class ITcuActivityManager - [ITcuActivityManager](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01898) provides interface to register and de-register listeners to get TCU-activity state updates. And also API to initiate TCU-activity state transition. An application can get the appropriate TCU-activity manager (i.e. [ClientType::SLAVE](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1gae6b12b123cc294599f69b9a846baf4b9.html#a00518_1ggae6b12b123cc294599f69b9a846baf4b9a79e19bc2ac33d6c81272024561992f37) or [ClientType::MASTER](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1gae6b12b123cc294599f69b9a846baf4b9.html#a00518_1ggae6b12b123cc294599f69b9a846baf4b9a89a1533c37ec9254f22b5e0f29c9c0ff)) object from the power factory. The TCU-activity manager configured as the [ClientType::MASTER](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1gae6b12b123cc294599f69b9a846baf4b9.html#a00518_1ggae6b12b123cc294599f69b9a846baf4b9a89a1533c37ec9254f22b5e0f29c9c0ff) is responsible for triggering state transitions. TCU-activity manager configured as a [ClientType::SLAVE](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1gae6b12b123cc294599f69b9a846baf4b9.html#a00518_1ggae6b12b123cc294599f69b9a846baf4b9a79e19bc2ac33d6c81272024561992f37) is responsible for listening to state change indications and acknowledging when it performs necessary tasks and prepares for the state transition. A machine in this power management framework represents an application processor subsystem or a host/guest virtual machine on hypervisor based platforms. - Only one [ClientType::MASTER](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1gae6b12b123cc294599f69b9a846baf4b9.html#a00518_1ggae6b12b123cc294599f69b9a846baf4b9a89a1533c37ec9254f22b5e0f29c9c0ff) is allowed in the system. This master can exist only on the primary/host machine and not on the guest virtual machine or an external application processor (EAP). - It is expected that all processes interested in a TCU-activity state change should register as [ClientType::SLAVE](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1gae6b12b123cc294599f69b9a846baf4b9.html#a00518_1ggae6b12b123cc294599f69b9a846baf4b9a79e19bc2ac33d6c81272024561992f37). - When the [ClientType::MASTER](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1gae6b12b123cc294599f69b9a846baf4b9.html#a00518_1ggae6b12b123cc294599f69b9a846baf4b9a89a1533c37ec9254f22b5e0f29c9c0ff) changes the TCU-activate state, ClientType::SLAVEs connected to the impacted machine are notified. - [ClientType::MASTER](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1gae6b12b123cc294599f69b9a846baf4b9.html#a00518_1ggae6b12b123cc294599f69b9a846baf4b9a89a1533c37ec9254f22b5e0f29c9c0ff) can trigger the TCU-activity state change of a specific machine or all machines at once. - If the [ClientType::SLAVE](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1gae6b12b123cc294599f69b9a846baf4b9.html#a00518_1ggae6b12b123cc294599f69b9a846baf4b9a79e19bc2ac33d6c81272024561992f37) wants to differentiate between a state change indication that is the result of a trigger for all machines or a trigger for its specific machines, it can be detected using the machine name provided in the listener API. - When the [ClientType::MASTER](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1gae6b12b123cc294599f69b9a846baf4b9.html#a00518_1ggae6b12b123cc294599f69b9a846baf4b9a89a1533c37ec9254f22b5e0f29c9c0ff) triggers an all machines TCU-activity state change, only the machines that are not in the desired state will undergo the state transition, and the ClientType::SLAVEs to those machines will be notified. - In the case of - [TcuActivityState::SUSPEND](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1ga6efe388feb8f1e42a4edf85ec56f1b62.html#a00518_1gga6efe388feb8f1e42a4edf85ec56f1b62aee93a0b023cef18b34ebfee347881c14) or [TcuActivityState::SHUTDOWN](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1ga6efe388feb8f1e42a4edf85ec56f1b62.html#a00518_1gga6efe388feb8f1e42a4edf85ec56f1b62ab9984206799a7f9fe4bd1b6c18db8112) trigger: - After becoming ready for state change, all [ClientType::SLAVE](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1gae6b12b123cc294599f69b9a846baf4b9.html#a00518_1ggae6b12b123cc294599f69b9a846baf4b9a79e19bc2ac33d6c81272024561992f37) should acknowledge back. - The [ClientType::MASTER](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1gae6b12b123cc294599f69b9a846baf4b9.html#a00518_1ggae6b12b123cc294599f69b9a846baf4b9a89a1533c37ec9254f22b5e0f29c9c0ff) will get notification about the consolidated acknowledgement status of all ClientType::SLAVEs. - On getting a successful consolidated acknowledgement from all the [ClientType::SLAVE](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1gae6b12b123cc294599f69b9a846baf4b9.html#a00518_1ggae6b12b123cc294599f69b9a846baf4b9a79e19bc2ac33d6c81272024561992f37) for the suspend trigger, the power framework allows the respective machine to suspend. On getting a successful consolidated acknowledgement from all the ClientType::SLAVEs for the shutdown trigger, the power framework triggers the respective machine shutdown without waiting further. - If the [ClientType::SLAVE](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1gae6b12b123cc294599f69b9a846baf4b9.html#a00518_1ggae6b12b123cc294599f69b9a846baf4b9a79e19bc2ac33d6c81272024561992f37) sends a NACK to indicate that it is not ready for state transition or fails to acknowledge before the configured time, then the [ClientType::MASTER](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1gae6b12b123cc294599f69b9a846baf4b9.html#a00518_1ggae6b12b123cc294599f69b9a846baf4b9a89a1533c37ec9254f22b5e0f29c9c0ff) will get to know via a consolidated/slave acknowledgement status notification. - In such failed cases, if the [ClientType::MASTER](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1gae6b12b123cc294599f69b9a846baf4b9.html#a00518_1ggae6b12b123cc294599f69b9a846baf4b9a89a1533c37ec9254f22b5e0f29c9c0ff) wants to stop the state transition considering the information in the consolidated acknowledgement, then the [ClientType::MASTER](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1gae6b12b123cc294599f69b9a846baf4b9.html#a00518_1ggae6b12b123cc294599f69b9a846baf4b9a89a1533c37ec9254f22b5e0f29c9c0ff) is allowed to trigger a new TCU-activity state change, or else the state transition will proceed after the configured timeout. - [TcuActivityState::RESUME](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1ga6efe388feb8f1e42a4edf85ec56f1b62.html#a00518_1gga6efe388feb8f1e42a4edf85ec56f1b62abac2aec3ee8d7d495123dbe5ca2fdac9) trigger: - Power framework will prevent the respective machine from going into suspend. - No acknowledgement will be required from [ClientType::SLAVE](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1gae6b12b123cc294599f69b9a846baf4b9.html#a00518_1ggae6b12b123cc294599f69b9a846baf4b9a79e19bc2ac33d6c81272024561992f37) and the [ClientType::MASTER](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1gae6b12b123cc294599f69b9a846baf4b9.html#a00518_1ggae6b12b123cc294599f69b9a846baf4b9a89a1533c37ec9254f22b5e0f29c9c0ff) will not be getting consolidated/slave acknowledgement as machine will be already resumed. When the application is notified about the service being unavailable, the TCU-activity state notifications will be inactive. After the service becomes available, the existing listener registrations will be maintained. Public Functions - virtual telux::common::[ServiceStatus](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga7063b4a1071b6581022e30b730684e4d.html#_CPPv4N5telux6common13ServiceStatusE) getServiceStatus() = 0 - Gets the power management service’s functional status. - Returns: - [telux::common::ServiceStatus](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga7063b4a1071b6581022e30b730684e4d.html#a00500_1ga7063b4a1071b6581022e30b730684e4d) - virtual telux::common::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#_CPPv4N5telux6common6StatusE) registerListener(std::weak\_ptr<[ITcuActivityListener](https://docs.qualcomm.com/doc/80-PF458-2/topic/class_a01894.html#_CPPv4N5telux5power20ITcuActivityListenerE)> listener) = 0 - Registers the listener to receive power state change, machine availability update and response from the slave clients. - Parameters: - **listener** – **[in]** Receives updates - Returns: - [telux::common::Status::SUCCESS](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#a00500_1gga45eeeff7c2860e02ae447d588d3d6e4dad0749aaba8b833466dfcbb0428e4f89c) if the listener is registered, otherwise, an appropriate error code - virtual telux::common::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#_CPPv4N5telux6common6StatusE) deregisterListener(std::weak\_ptr<[ITcuActivityListener](https://docs.qualcomm.com/doc/80-PF458-2/topic/class_a01894.html#_CPPv4N5telux5power20ITcuActivityListenerE)> listener) = 0 - Deregisters the given listener registered previously with [ITcuActivityManager::registerListener()](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01898_1ae5a25a6ae3e0d6051c60e090860a3686). - Parameters: - **listener** – **[in]** Listener to deregister - Returns: - [telux::common::Status::SUCCESS](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#a00500_1gga45eeeff7c2860e02ae447d588d3d6e4dad0749aaba8b833466dfcbb0428e4f89c) if the listener is deregistered, otherwise, an appropriate error code - virtual telux::common::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#_CPPv4N5telux6common6StatusE) registerServiceStateListener(std::weak\_ptr<telux::common::[IServiceStatusListener](https://docs.qualcomm.com/doc/80-PF458-2/topic/class_a00690.html#_CPPv4N5telux6common22IServiceStatusListenerE)> listener) = 0 - Register the given listener to listen power management service’s functional status change. - Parameters: - **listener** – **[in]** Receives status change updates - Returns: - [telux::common::Status::SUCCESS](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#a00500_1gga45eeeff7c2860e02ae447d588d3d6e4dad0749aaba8b833466dfcbb0428e4f89c) if the listener is registered, otherwise, an appropriate error code - virtual telux::common::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#_CPPv4N5telux6common6StatusE) deregisterServiceStateListener(std::weak\_ptr<telux::common::[IServiceStatusListener](https://docs.qualcomm.com/doc/80-PF458-2/topic/class_a00690.html#_CPPv4N5telux6common22IServiceStatusListenerE)> listener) = 0 - Deregisters the given listener registered previously with [ITcuActivityManager::registerServiceStateListener()](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01898_1ab3d618a166b0278f8d4fd593cd9adeb9). - Parameters: - **listener** – **[in]** Listener to deregister - Returns: - [telux::common::Status::SUCCESS](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#a00500_1gga45eeeff7c2860e02ae447d588d3d6e4dad0749aaba8b833466dfcbb0428e4f89c) if the listener is deregistered, otherwise, an appropriate error code - virtual telux::common::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#_CPPv4N5telux6common6StatusE) getMachineName(std::string &machineName) = 0 - Gets machine’s platform name on which the caller process is running. It can be used to identify the local machine on a platform with multiple machines registered with the platform’s power management framework. - Parameters: - **machineName** – **[out]** Machine name (example, qcom,mdm or qcom,eap, etc.) - Returns: - [telux::common::Status::SUCCESS](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#a00500_1gga45eeeff7c2860e02ae447d588d3d6e4dad0749aaba8b833466dfcbb0428e4f89c) if the machine name is obtained, otherwise, an appropriate error code - virtual telux::common::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#_CPPv4N5telux6common6StatusE) getAllMachineNames(std::vector<std::string> &machineNames) = 0 - Provides name of all the machines currently registered with the platform’s power management framework. A master client can identify a particular machine by its name and then it can alter the state of that particular machine by passing the machine name to the [setActivityState()](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01898_1a495d321e505caa245c4b58d295482199) API. - Parameters: - **machineNames** – **[out]** List of machine names - Returns: - [telux::common::Status::SUCCESS](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#a00500_1gga45eeeff7c2860e02ae447d588d3d6e4dad0749aaba8b833466dfcbb0428e4f89c) if all machine names are obtained, otherwise, an appropriate error code - virtual telux::common::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#_CPPv4N5telux6common6StatusE) setActivityState([TcuActivityState](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1ga6efe388feb8f1e42a4edf85ec56f1b62.html#_CPPv4N5telux5power16TcuActivityStateE) state, std::string machineName, telux::common::[ResponseCallback](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00546_1a8f614f0a0eeca90c94dad1967ca93bcd.html#_CPPv4N5telux6common16ResponseCallbackE) callback = nullptr) = 0 - Initiates transition to the power state specified by [TcuActivityState](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1ga6efe388feb8f1e42a4edf85ec56f1b62.html#a00518_1ga6efe388feb8f1e42a4edf85ec56f1b62). Used by the master client only. On platforms with access control enabled, caller needs to have TELUX\_POWER\_CONTROL\_STATE permission to invoke this API successfully. Guest VM can only be suspended/resumed. It cannot be shut down using this API. - Parameters: - - **state** – **[in]** Power state to which to change - **machineName** – **[in]** [LOCAL\_MACHINE](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a00518_1gacaa7dbccc13f14fff18617e49e9c3e48) if the machine on which client is running should enter this state, [ALL\_MACHINES](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a00518_1ga6b9b71cb4cc8dbb8e22080d7cfce02af) if all the machines should enter this state, else a specific machine (obtained from [getMachineName()](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01898_1af45af719c04d7e3e18f38cb75e9717b3) API) that should enter this state. - **callback** – **[in]** Optional, receives [telux::common::ErrorCode::SUCCESS](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga84acdb74b7d34616b1ca497c7369810d.html#a00500_1gga84acdb74b7d34616b1ca497c7369810dad0749aaba8b833466dfcbb0428e4f89c) if the power management framework confirms that it has received state transition request - Returns: - [telux::common::Status::SUCCESS](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#a00500_1gga45eeeff7c2860e02ae447d588d3d6e4dad0749aaba8b833466dfcbb0428e4f89c) if the state transition is initiated, otherwise, an appropriate error code - virtual telux::common::[ErrorCode](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga84acdb74b7d34616b1ca497c7369810d.html#_CPPv4N5telux6common9ErrorCodeE) getActivityState(std::string machineName, [TcuActivityState](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1ga6efe388feb8f1e42a4edf85ec56f1b62.html#_CPPv4N5telux5power16TcuActivityStateE) &state) = 0 - For the master client, gives the [TcuActivityState](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1ga6efe388feb8f1e42a4edf85ec56f1b62.html#a00518_1ga6efe388feb8f1e42a4edf85ec56f1b62) of the machine specified by machineName. For the slave client, gives the [TcuActivityState](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1ga6efe388feb8f1e42a4edf85ec56f1b62.html#a00518_1ga6efe388feb8f1e42a4edf85ec56f1b62) of the local machine. Note Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility. - Parameters: - - **machineName** – **[in]** Machine’s name for which the [TcuActivityState](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1ga6efe388feb8f1e42a4edf85ec56f1b62.html#a00518_1ga6efe388feb8f1e42a4edf85ec56f1b62) is requested. Machine names can be obtained through getAllMachines(). - **state** – **[out]** Current [TcuActivityState](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1ga6efe388feb8f1e42a4edf85ec56f1b62.html#a00518_1ga6efe388feb8f1e42a4edf85ec56f1b62) for the given machineName specified by [TcuActivityState](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1ga6efe388feb8f1e42a4edf85ec56f1b62.html#a00518_1ga6efe388feb8f1e42a4edf85ec56f1b62). - Returns: - [telux::common::ErrorCode::SUCCESS](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga84acdb74b7d34616b1ca497c7369810d.html#a00500_1gga84acdb74b7d34616b1ca497c7369810dad0749aaba8b833466dfcbb0428e4f89c) if the state is retrieved, [telux::common::ErrorCode::OPERATION\_NOT\_ALLOWED](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga84acdb74b7d34616b1ca497c7369810d.html#a00500_1gga84acdb74b7d34616b1ca497c7369810da144b18204474537760a7fabecb959bb7) if a slave client tries to get state of a machine other than the one they’re running on, an appropriate error code otherwise. - virtual telux::common::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#_CPPv4N5telux6common6StatusE) sendActivityStateAck([StateChangeResponse](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1ga3a53da8d988dac10e96911f6c5c96b65.html#_CPPv4N5telux5power19StateChangeResponseE) ack, [TcuActivityState](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1ga6efe388feb8f1e42a4edf85ec56f1b62.html#_CPPv4N5telux5power16TcuActivityStateE) state) = 0 - When a slave client receives notification in [ITcuActivityListener::onTcuActivityStateUpdate](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01894_1a7e4c3a2b8e312af467553b7c6ce95587), it must acknowledge whether it agrees to enter the new power state or not through this method. Based on this response, platform power management framework takes the next appropriate step. Must be called only once per slave client irrespective of the number of listeners it registered. There is no need to send response for [TcuActivityState::RESUME](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1ga6efe388feb8f1e42a4edf85ec56f1b62.html#a00518_1gga6efe388feb8f1e42a4edf85ec56f1b62abac2aec3ee8d7d495123dbe5ca2fdac9) state. - Parameters: - - **ack** – **[in]** [StateChangeResponse::ACK](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1ga3a53da8d988dac10e96911f6c5c96b65.html#a00518_1gga3a53da8d988dac10e96911f6c5c96b65a0fc437bc317835cad5faafc12a83fad5) to agree to enter the new state, else [StateChangeResponse::NACK](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1ga3a53da8d988dac10e96911f6c5c96b65.html#a00518_1gga3a53da8d988dac10e96911f6c5c96b65aa68c6c77586d4c740ec1b75b65b37946) to deny - **state** – **[in]** State for which this acknowledgement is sent - Returns: - [telux::common::Status::SUCCESS](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#a00500_1gga45eeeff7c2860e02ae447d588d3d6e4dad0749aaba8b833466dfcbb0428e4f89c) if the acknowledgement is sent, otherwise, an appropriate error code - virtual telux::common::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#_CPPv4N5telux6common6StatusE) setModemActivityState([TcuActivityState](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1ga6efe388feb8f1e42a4edf85ec56f1b62.html#_CPPv4N5telux5power16TcuActivityStateE) state) = 0 - Explicitly enables/disables certain behavior in the modem peripheral subsystem (MPSS) to conserve power. For example, specific functionalities like LTE and 5G search or measurement are scaled down. Primarily intended for the master clients, should be used cautiously, as it could affect WWAN functionalities. On platforms with access control enabled, caller needs to have TELUX\_POWER\_CONTROL\_STATE permission to invoke this API successfully. - Parameters: - **state** – **[in]** For [TcuActivityState::SUSPEND](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1ga6efe388feb8f1e42a4edf85ec56f1b62.html#a00518_1gga6efe388feb8f1e42a4edf85ec56f1b62aee93a0b023cef18b34ebfee347881c14) functionalities are throttled, for [TcuActivityState::RESUME](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1ga6efe388feb8f1e42a4edf85ec56f1b62.html#a00518_1gga6efe388feb8f1e42a4edf85ec56f1b62abac2aec3ee8d7d495123dbe5ca2fdac9) functionalities are unthrottled - Returns: - [telux::common::Status::SUCCESS](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#a00500_1gga45eeeff7c2860e02ae447d588d3d6e4dad0749aaba8b833466dfcbb0428e4f89c) if the new state is set, otherwise, an appropriate error code - virtual bool isReady() = 0 - Returns true if the power management service is functionally ready, false otherwise. Deprecated Use [ITcuActivityManager::getServiceStatus()](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01898_1a3ebfa52c2d23326b9db1af4cae50b66b) API. [telux::power::ITcuActivityManager::getServiceStatus](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01898_1a3ebfa52c2d23326b9db1af4cae50b66b) - Returns: - True if service is ready, false otherwise - virtual std::future<bool> onReady() = 0 - Provides a mechanism to wait for the power management service to be functionally ready. Deprecated Use InitResponseCb in [PowerFactory::getTcuActivityManager](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01886_1a847a4258315253ac21004cbeb0dd597f) instead. - Returns: - Future object on which the caller can wait - virtual telux::common::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#_CPPv4N5telux6common6StatusE) setActivityState([TcuActivityState](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1ga6efe388feb8f1e42a4edf85ec56f1b62.html#_CPPv4N5telux5power16TcuActivityStateE) state, telux::common::[ResponseCallback](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00546_1a8f614f0a0eeca90c94dad1967ca93bcd.html#_CPPv4N5telux6common16ResponseCallbackE) callback = nullptr) = 0 - Initiates a TCU-activity state transition. If the platform is configured to change the modem activity state automatically when the TCU activity state is changed, this API initiates the relevant internal operation. This API needs to be used cautiously, as it could change the power-state of the system and may affect other processes. This API should only be invoked by a client that has instantiated the [ITcuActivityManager](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01898) instance using [ClientType::MASTER](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1gae6b12b123cc294599f69b9a846baf4b9.html#a00518_1ggae6b12b123cc294599f69b9a846baf4b9a89a1533c37ec9254f22b5e0f29c9c0ff) On platforms with access control enabled, the caller needs to have TELUX\_POWER\_CONTROL\_STATE permission to invoke this API successfully. Deprecated Use [setActivityState](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01898_1a495d321e505caa245c4b58d295482199)(TcuActivityState state, std::string machineName, [telux::common::ResponseCallback](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00546_1a8f614f0a0eeca90c94dad1967ca93bcd.html#a00546_1a8f614f0a0eeca90c94dad1967ca93bcd)) instead. Note This API should not be used on virtual machines or on systems with hypervisor. The alternative API [setActivityState](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01898_1a495d321e505caa245c4b58d295482199)( TcuActivityState state, std::string machineName = “”,[telux::common::ResponseCallback](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00546_1a8f614f0a0eeca90c94dad1967ca93bcd.html#a00546_1a8f614f0a0eeca90c94dad1967ca93bcd) callback = nullptr) should be used. - Parameters: - - **state** – **[in]** TCU-activity state that the system is intended to enter - **callback** – **[in]** Optional callback to get the response for the TCU-activity state transition command - Returns: - Status of setActivityState i.e. success or suitable status code. - virtual telux::common::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#_CPPv4N5telux6common6StatusE) sendActivityStateAck([TcuActivityStateAck](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1ga81b4daa0c27b91b116f93e2e80d1ec3a.html#_CPPv4N5telux5power19TcuActivityStateAckE) ack) = 0 - When a slave client receives notification in [ITcuActivityListener::onTcuActivityStateUpdate](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01894_1a7e4c3a2b8e312af467553b7c6ce95587), it must acknowledge whether it agrees to enter the new power state or not through this method. Based on this response, power management framework takes the next appropriate step. Must be called only once per slave client irrespective of the number of listeners it registered. Deprecated Use [sendActivityStateAck](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01898_1a03b13d5d4574f585976f7e2dab5cfbbb)( TcuActivityState state, StateChangeResponse ack) instead. - Parameters: - **ack** – **[in]** [StateChangeResponse::ACK](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1ga3a53da8d988dac10e96911f6c5c96b65.html#a00518_1gga3a53da8d988dac10e96911f6c5c96b65a0fc437bc317835cad5faafc12a83fad5) to agree to enter the new state - Returns: - [telux::common::Status::SUCCESS](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00500_1ga45eeeff7c2860e02ae447d588d3d6e4d.html#a00500_1gga45eeeff7c2860e02ae447d588d3d6e4dad0749aaba8b833466dfcbb0428e4f89c) if the acknowledgement is sent, otherwise, an appropriate error code - virtual [TcuActivityState](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1ga6efe388feb8f1e42a4edf85ec56f1b62.html#_CPPv4N5telux5power16TcuActivityStateE) getActivityState() = 0 - Gets the current [TcuActivityState](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00518_1ga6efe388feb8f1e42a4edf85ec56f1b62.html#a00518_1ga6efe388feb8f1e42a4edf85ec56f1b62) of the machine where the client is running on. Deprecated Use [getActivityState](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01898_1a2c3a41e76be591938f024d01c2b4b322)(std::string machineName, TcuActivityState &state) instead. - Returns: - TcuActivityState- the current TcuActivityState of the machine where the client is running on. - inline virtual ~ITcuActivityManager() - Destructor of [ITcuActivityManager](https://docs.qualcomm.com/doc/80-PF458-2/topic/tcu_activity_manager.html#a01898). Last Published: Sep 24, 2026 [Previous Topic Power](https://docs.qualcomm.com/bundle/publicresource/80-PF458-2/topics/power.md) [Next Topic Security](https://docs.qualcomm.com/bundle/publicresource/80-PF458-2/topics/security.md)