Vision Apps User Guide
Remote Service APIs (RTOS only)

Introduction

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.

Data Structures

struct  app_remote_service_init_prms_t
 Remote service init params. More...
 

Functions

void appRemoteServiceInitSetDefault (app_remote_service_init_prms_t *prm)
 Init prm with default parameters. More...
 
int32_t appRemoteServiceInit (app_remote_service_init_prms_t *prm)
 Init remote service task. More...
 
int32_t appRemoteServiceRegister (const char *service_name, app_remote_service_handler_t handler)
 Remote service register. More...
 
int32_t appRemoteServiceUnRegister (const char *service_name)
 Remote service unregister. More...
 
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. More...
 
int32_t appRemoteServiceDeInit ()
 DeInit remote service task. More...
 

Typedefs

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. More...
 

Macros

#define APP_REMOTE_SERVICE_FLAG_NO_WAIT_ACK   (0x00000001u)
 Flag to indicate that this service command does not need a ACK. More...
 

Macro Definition Documentation

◆ 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.

Typedef Documentation

◆ 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

Function Documentation

◆ appRemoteServiceInitSetDefault()

void appRemoteServiceInitSetDefault ( app_remote_service_init_prms_t prm)

Init prm with default parameters.

Users are recommended to call this API before calling appRemoteServiceInit

Parameters
prm[in] Initialization parameters

◆ appRemoteServiceInit()

int32_t appRemoteServiceInit ( app_remote_service_init_prms_t prm)

Init remote service task.

Parameters
prm[in] Initialization parameters
Returns
0 on success, else failure

◆ appRemoteServiceRegister()

int32_t appRemoteServiceRegister ( const char *  service_name,
app_remote_service_handler_t  handler 
)

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