IPC Module - Power Service
This page contains documentation of the Power API.
Messages
- message power_request_req
- Parameters:
user (
string
) – User identifier, max 15 characters long.- Return message:
Requests power for user ‘user’.
- message power_request_rsp
- Parameters:
result (
enum power_result
) – Result of the operation
Power request result.
- message power_release_req_norsp
- Parameters:
user (
string
) – User identifier, max 15 characters long.
Release power for given user user.
- message power_suspend_register_req
- Parameters:
user (
string
) – User identifier, max 15 characters long.- Return message:
Registers an “suspend interest” with the power manager. This means that the ‘client’ has some activites to perform before the system can enter a suspend state.
When a client has registered a suspend interest it is expected to send and ‘ack’ message in response to the ‘suspend_ind’ message when its pre-suspend activites have completed.
- message power_suspend_register_rsp
- Parameters:
result (
enum power_result
) – Result of the operation
Respons message to the ‘power_suspend_register_req’ message.
- message power_suspend_unregister_req_norsp
- Parameters:
user (
string
) – User identifier, max 15 characters long.
Un-registers a ‘suspend interest’ with the power manager.
- message power_suspend_publish_ind
Power suspend indication, sent by the power manager when we are about to enter sleep mode.
- message power_suspend_subscribe_req
Subscribe to power_suspend_publish_ind messages
- message power_suspend_subscribe_rsp
- Parameters:
result (
enum ipc_subscribe_result
)
Result from power_suspend_subscribe_req
- message power_suspend_unsubscribe_req_norsp
Unsubscribe from power_suspend_publish_ind messages
- message power_suspend_ack_req_norsp
- Parameters:
user (
string
) – User identifier, max 15 characters long.
Sent by subscribers of the suspend message to acknowledge that their pre-suspend activities have completed.
- message power_shutdown_register_req
- Parameters:
user (
string
) – User identifier, max 15 characters long.- Return message:
Registers an “shutdown interest” with the power manager. This means that the ‘client’ has some activites to perform before the system can shutdown.
When a client has registered a shutdown interest it is expected to send and ‘ack’ message in response to the ‘shutdown_ind’ message when its pre-suspend activites have completed.
- message power_shutdown_register_rsp
- Parameters:
result (
enum power_result
) – Result of the operation
Respons message to the ‘power_shutdown_register_req’ message.
- message power_shutdown_unregister_req_norsp
- Parameters:
user (
string
) – User identifier, max 15 characters long.
Un-registers a ‘shutdown interest’ with the power manager.
- message power_shutdown_publish_ind
Power shutdown indication, sent by the power manager when we are about to shutdown.
- message power_shutdown_subscribe_req
Subscribe to power_shutdown_publish_ind messages
- message power_shutdown_subscribe_rsp
- Parameters:
result (
enum ipc_subscribe_result
)
Result from power_shutdown_subscribe_req
- message power_shutdown_unsubscribe_req_norsp
Unsubscribe from power_shutdown_publish_ind messages
- message power_shutdown_ack_req_norsp
- Parameters:
user (
string
) – User identifier, max 15 characters long.
Sent by subscribers of the shutdown message to acknowledge that their pre-shutdown activities have completed.
- message power_shutdown_shutdown_req_norsp
Shutdown the system as soon as possible.
- message power_shutdown_reboot_req_norsp
- Parameters:
delay_s (
uint32
) – Wait ‘delay_s’ seconds before rebooting
Reboot the system as soon as possible.
- message power_reboot_pending_publish_ind
A reboot is pending and if no voluntary reboot is made, the system will after some time perform a forced reboot. Direction: server to client
- message power_reboot_pending_subscribe_req
Subscribe to power_reboot_pending_publish_ind messages
- message power_reboot_pending_subscribe_rsp
- Parameters:
result (
enum ipc_subscribe_result
)
Result from power_reboot_pending_subscribe_req
- message power_reboot_pending_unsubscribe_req_norsp
Unsubscribe from power_reboot_pending_publish_ind messages
- message power_wakeup_publish_ind
Power wakeup indication, sent by the power manager when services should wake up from their sleep state.
- message power_wakeup_subscribe_req
Subscribe to power_wakeup_publish_ind messages
- message power_wakeup_subscribe_rsp
- Parameters:
result (
enum ipc_subscribe_result
)
Result from power_wakeup_subscribe_req
- message power_wakeup_unsubscribe_req_norsp
Unsubscribe from power_wakeup_publish_ind messages
- message power_get_no_of_requestors_req
- Return message:
Requests the number of ‘clients’ requesting the system to be powered on.
- message power_get_no_of_requestors_rsp
- Parameters:
no_of_clients (
uint32
) – Number of ‘clients’ requesting the system to be powered onresult (
enum power_result
) – Result of the operation
Response message to the ‘power_get_no_of_requestors’ message.
- message power_get_requestor_info_req
- Parameters:
requestor_index (
uint32
) – Index of the requestor we are interested in- Return message:
Get a string representation of a perticular requestor.
- message power_get_requestor_info_rsp
- Parameters:
requestor_id (
string
) – Id of the requestorresult (
enum power_result
) – Result of the operation
Response message to ‘power_get_requestor_info_req’.
Enums
- enum power_result
Result codes.
Constant
Value
Description
OK
0
OK
ERROR
1
Error