Skip to main content
Header: ar_osal/api/ar_osal_servreg.h

Structures

ar_osal_servreg_entry_type

Struct representing the name of the service or domain and the instance id. Members
char_t
Name of the service or domain.
uint32_t

ar_osal_servreg_state_notify_payload

servreg service state notify callback payload. Members
ar_osal_servreg_entry_type
ar_osal_servreg_entry_type
ar_osal_service_state_type

Functions

ar_osal_servreg_init

ar_osal_servreg_init Initialize servreg interface.
Returns 0 Success Nonzero Failure

ar_osal_servreg_deinit

ar_osal_servreg_deinit Uninitialize servreg interface.
Returns 0 Success Nonzero Failure

ar_osal_servreg_get_domainlist

ar_osal_servreg_get_domainlist Client to call this API to get a list of domains(msm/domain/subdomain) on which a given service(provider/service) is supported.
Parameters
ar_osal_servreg_entry_type *
service(provider/service) for which domain(s) list is required.
ar_osal_servreg_entry_type *
service supported in domain(s), client to provide . payload buffer pointer.
uint32_t *
Client to provide the num_domains to get the domain list. . If num_domains is zero and domain_list is NULL, API will return . the number of domains for the given service if available.
Returns 0 Success Nonzero Failure AR_ENOMEMORY- Failed due to insufficient memory, client to call the API again with required size as returned in num_domains.

ar_osal_servreg_register

ar_osal_servreg_register Service client(s) to register for the domain service state change notifications.
Parameters
ar_osal_client_type
indicates registering client is a listener or service provider.
opt] cb_func: callback function pointer to get notifications on. . This is parameter is optional to Service provider registration.
opt] cb_context: callback function payload/context provided by client. . This is parameter is optional to Service provider registration.
ar_osal_servreg_entry_type *
domain of the service(msm/domain/subdomain) for which the . state change notifications to be provided.
ar_osal_servreg_entry_type *
service(provider/service) for which the . state change notifications to be provided.
Returns servreg_handle on success. null on failure.

ar_osal_servreg_deregister

ar_osal_servreg_deregister Service client(s) to deregister for the service state change notifications.
Parameters
ar_osal_servreg_t
interface handle returned by ar_osal_servreg_register().
Returns 0 Success Nonzero Failure

ar_osal_servreg_set_state

ar_osal_servreg_set_state Service provider to call this API to register its service states(UP/DOWN). This API to be used only by the service provider(msm/domain/subdomain/provider/service) and not by service client(s).
Parameters
ar_osal_servreg_t
interface handle returned by ar_osal_servreg_register().
ar_osal_service_state_type
new service state for service registered using ar_osal_servreg_register().
Returns 0 Success Nonzero Failure

ar_osal_servreg_restart_service

ar_osal_servreg_restart_service HLOS calls this API to trigger a restart (PDR or SSR) on a given processor
Parameters
ar_osal_servreg_t
interface handle returned by ar_osal_servreg_register() which identifies the desired processor
Returns 0 Success Nonzero Failure

ar_osal_panic

induce panic to crash the system

Type Definitions

ar_osal_servreg_t

ar osal servreg type object.

ar_osal_service_state_type

Service state up/down indicator.

ar_osal_client_type

Servreg client type: listener or service provider.

ar_osal_servreg_cb_event_type

Servreg callback notify events.

ar_osal_servreg_state_notify_payload_type

servreg service state notify callback payload.

ar_osal_servreg_callback

ar_osal_servreg_callback Callback function to notify clients for any changes in service state(up/down).

Enumerations

ar_osal_service_state

Service state up/down indicator.

Values

ar_osal_client

Servreg client type: listener or service provider.

Values

ar_osal_servreg_cb_event

Servreg callback notify events.

Values

Macros

AR_OSAL_SERVREG_NAME_LENGTH_MAX

Max length of the domain name i.e “soc/domain/subdomain” or service name i.e “provider/service” is 64 bytes e.g.