nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches

◆ event_manager_proxy_subscribe()

int event_manager_proxy_subscribe ( const struct device * instance,
const struct event_type * local_event_id )

#include <include/event_manager_proxy.h>

Subscribe for the remote event.

This function registers the local event proxy to remote event proxy to listen selected event.

Note
This function may wait for the IPC endpoint to bond. To be sure that it will be available to bond write the code this way that all the remotes are added first by event_manager_proxy_add_remote and then start to add listeners. In other case if the other core adds more than one remote, we run into risk that we will wait for the endpoint to bond while the remote core waits for other endpoint to bond and never configures the requested endpoint.
Parameters
instanceRemote IPC instance.
local_event_idThe id of the event we wish to receive for the event on the remote core.
Return values
0On success.
-EACCESFunction called after event_manager_proxy_start.
-EPIPEThe remote core did not bond in during timeout period. No communication.
-ETIMETimeout while waiting for the response from the other core.
othererrno code.