Bidirectional IPC between apps

is there any way to have bidirectional communication between apps?
APP1 is communicating with APP2 using APP2.API, but then I want APP2 to directly communicate with APP1 using APP1.API, is there any way to achieve this?
It seems that when I cross the binding between apps, then both of them hang waiting for each other to start.

Does this help?

yes, it does help, but I want to pass more data through the handler and I was wondering what is the best way to do so.
Should I create a REFERENCE and then to pass this as IN of the handler?
Not sure what is the best course of actions in legato.

how about using STRUCT with array:

yeah, I have seen that post, but I am wondering if is easier to define the struct on the .api file, or to use the REFERENCE and then to declare the struct in the .h file.

I still get an error for:
/home/claudio/swi-telemation-development/Apps/Applications/IPC_step4/loggerClient/loggerClient.c:80:26: error: parameter 1 (‘percentUsedSpace’) has incomplete type
struct logger4_Params_t percentUsedSpace,

were I have modified as follow:
STRUCT Params
{
uint32 command;
//uint32 port1;
};

HANDLER MsgFromServerHandler
(
Params value IN // IN: view from client point of view
);

// For events from server

// Event callback

static void MsgFromServerHandler

(

struct logger4_Params_t percentUsedSpace,

void* contextPtr

)

{

//LE_INFO( PREFIX_LOG_MSG “async msg received from server; percent of buffer messages used = %u %%”, percentUsedSpace );

}

I used STRUCT in api file and I remember it is working fine.

you have used the struct to pass over to the handler? because also in another couple of posts was mentioned that the api do no support struct so we were wondering if this is the proper way of doing it.

only tried client to server in swi-wp76_4.7.0 , not for server to client callback function.
You might give a try.

we are just trying to replace the uint32_t feedback on the handler with a struct, so we can pass back a more comprehensive information.
It all compile fine, but it seems that the message event is not sent properly:
logger_server.c AsyncResponse_logger_AddMsgFromServerHandler() 446 | Assert Failed: ‘le_pack_PackReference( &_msgBufPtr, value )’

is it ok for passing STRUCT information from client to server

I have simplified the sample you have sent through and used a reference instead, would you be able to run it your end?
IPC_step4.zip (237.5 KB)

Are you running in swi-wp76_4.7.0

Btw, is it ok to run in STRUCT with array

I have got it to work with the struct, but I am running it on WP77xx legato 19.11

OK, then that is great, I also remember STRUCT is working fine with swi-wp76_4.7.0
i.e. WP76 (Release 13.3 + Legato 20.04.0)