These APIs allows user to invoke functions or services on remote cores by abstracting the low level IPC details.
These APIs are meant to be used for control like functions and not to execute real-time algorithms.
Also service commands are executed in a single thread so multiple requests to the same CPU get serialized. Also once a service commands executes it runs to completion and only then moves on to another service commands.
The focus of these APIs is simplicity rather than low latency, efficiency.
◆ APP_REMOTE_SERVICE_FLAG_NO_WAIT_ACK
#define APP_REMOTE_SERVICE_FLAG_NO_WAIT_ACK (0x00000001u) |
Flag to indicate that this service command does not need a ACK.
◆ app_remote_service_handler_t
typedef int32_t(* app_remote_service_handler_t) (char *service_name, uint32_t cmd, void *prm, uint32_t prm_size, uint32_t flags) |
Remote service handler.
- Parameters
-
service_name | [in] service name for which this handler is invoked. |
cmd | [in] service command |
prm | [in/out] service command parameters |
prm_size | [in] service command parameter size |
flags | [in] service command flags |
- Returns
- 0 on success, else failure
◆ appRemoteServiceInitSetDefault()
Init prm with default parameters.
Users are recommended to call this API before calling appRemoteServiceInit
- Parameters
-
prm | [in] Initialization parameters |
◆ appRemoteServiceInit()
Init remote service task.
- Parameters
-
prm | [in] Initialization parameters |
- Returns
- 0 on success, else failure
◆ appRemoteServiceRegister()
Remote service register.
- Parameters
-
service_name | [in] service name |
handler | [in] handler to invoke when a command is received for 'service_name' service |
- Returns
- 0 on success, else failure
◆ appRemoteServiceUnRegister()
int32_t appRemoteServiceUnRegister |
( |
const char * |
service_name | ) |
|
Remote service unregister.
- Parameters
-
service_name | [in] service name |
- Returns
- 0 on success, else failure
◆ appRemoteServiceRun()
int32_t appRemoteServiceRun |
( |
uint32_t |
dst_app_cpu_id, |
|
|
const char * |
service_name, |
|
|
uint32_t |
cmd, |
|
|
void * |
prm, |
|
|
uint32_t |
prm_size, |
|
|
uint32_t |
flags |
|
) |
| |
Run a remote service.
- Parameters
-
dst_app_cpu_id | [in] CPU on which to execute the service command |
service_name | [in] Service handler to execute |
cmd | [in] service command to pass to the handler |
prm | [in] service command parameter to pass to the handler |
prm_size | [in] service command parameter size in bytes |
flags | [in] Service execution flags |
- Returns
- 0 on success, else failure
◆ appRemoteServiceDeInit()
int32_t appRemoteServiceDeInit |
( |
| ) |
|
DeInit remote service task.
- Returns
- 0 on success, else failure