erpc icon indicating copy to clipboard operation
erpc copied to clipboard

Multiple Clients Solution

Open yahya010 opened this issue 4 years ago • 2 comments

Hi,

I wanted to know how a multiple client solution for erpc would be implemented and what changes would I need to do. Also, if its not possible, how can I do it using TCP only?

Thanks,

yahya010 avatar Jun 18 '21 15:06 yahya010

Hi eRPC user. Thank you for your interest and welcome. We hope you will enjoy this framework well.

github-actions[bot] avatar Jun 18 '21 15:06 github-actions[bot]

Hi @yahya010 , please take a look to https://github.com/EmbeddedRPC/erpc/issues/174

Hadatko avatar Jun 18 '21 15:06 Hadatko

Hi @Hadatko, I‘m so looking forward to the feature, will it be released to develop branch this month?

vonku avatar Mar 14 '23 09:03 vonku

Hi @vonku , Although supporting multiple client is almost ready, i need to appologize that i didn't focus on it last months. I distracted myself with CI which is also very important to properly test every our change we do. Now CI support build and test erpcgen under Mac, Linux, Windows. This can help us to do less mistakes and better releases. Right now i don't see more important task than this (multiple client support.)

Hadatko avatar Mar 14 '23 09:03 Hadatko

Hi @vonku , Although supporting multiple client is almost ready, i need to appologize that i didn't focus on it last months. I distracted myself with CI which is also very important to properly test every our change we do. Now CI support build and test erpcgen under Mac, Linux, Windows. This can help us to do less mistakes and better releases. Right now i don't see more important task than this (multiple client support.)

Hi @Hadatko , I fetched your pr and tried it out lastday. I found it different that the IDL annotation @types_header(string) did not work, with which I wanted to declare all the typedefs and structs to a specific header file to avoid redefinitions. Now they were generated to xxx_common_erpc.h and xxx_common_standard.h. Is this change on purpose?

vonku avatar Mar 15 '23 01:03 vonku

Hi @vonku , Although supporting multiple client is almost ready, i need to appologize that i didn't focus on it last months. I distracted myself with CI which is also very important to properly test every our change we do. Now CI support build and test erpcgen under Mac, Linux, Windows. This can help us to do less mistakes and better releases. Right now i don't see more important task than this (multiple client support.)

Hi @Hadatko , I fetched your pr and tried it out lastday. I found it different that the IDL annotation @types_header(string) did not work, with which I wanted to declare all the typedefs and structs to a specific header file to avoid redefinitions. Now they were generated to xxx_common_erpc.h and xxx_common_standard.h. Is this change on purpose?

As shown below, I hoped that the structs defined in bt_common.erpc would be generated to bt_erpc_common.h (anotated by types_header), but the fact is that no bt_erpc_common.h file was generated.

@output_dir("bt_source")
@types_header("bt_erpc_common.h")
program bt_erpc

import "bt_common.erpc"

vonku avatar Mar 15 '23 02:03 vonku

Hi @vonku, i think i removed it intentionally as the type definitions are now generated into their own files by default. So i can add two bullets to my work: -> Type definition should be generated only into one file. They may not depend on interface (like in IDL they are not depending on interface). -> Keep option for renaming the file (Do you think it is necessary?).

Hadatko avatar Mar 15 '23 08:03 Hadatko

Another issue, if I define the ERPC_ALLOCATION_POLICY as below, the shim code would compile failed. #define ERPC_ALLOCATION_POLICY (ERPC_ALLOCATION_POLICY_STATIC)

Because the erpc_port.h file would not be included in xxx_client.cpp file but it still uses erpc_malloc() and erpc_free()

#if ERPC_ALLOCATION_POLICY == ERPC_ALLOCATION_POLICY_DYNAMIC
#include "erpc_port.h"
#endif

vonku avatar Mar 15 '23 14:03 vonku

Sounds like the malloc issue @diagano had at #349

amgross avatar Mar 15 '23 14:03 amgross

Hi @Hadatko, is there any update plan for this feature?

vonku avatar Apr 08 '23 09:04 vonku

Hi @vonku , same as last time. In eRPC is this my main issue right now (finish this task). But eRPC is not my only project. So i couldn't work on it last months.

Hadatko avatar Apr 08 '23 09:04 Hadatko