erpc icon indicating copy to clipboard operation
erpc copied to clipboard

cannot use namespace and scope resolution operator in .erpc file

Open jaggi opened this issue 5 years ago • 5 comments

Hi, I am trying to include namespaces and to use scope resolution operator in .erpc file. But i m getting error while compiling.Can anyone give a solution to include these two in my IDL file.

Thank you...!

jaggi avatar Jun 25 '19 12:06 jaggi

As for including namespaces, try to do it via including a dedicated header file, use the @include("include_file.h") annotation. As for scope resolution operator in .erpc, I am afraid this is not supported.

MichalPrincNXP avatar Jun 26 '19 07:06 MichalPrincNXP

Hi MichalPrincNXP, Thanks for your reply. In my case i have the callback function needed to be implemented in the client side but the callback function and its parameters should be there under my defined namespace. Can you suggest me how to implement this because i am facing issues while i m using scope resolution operator in .erpc file as callback function to be defined in .erpc file.

Thank you...!

jaggi avatar Jun 26 '19 09:06 jaggi

I am afraid I am not able to help you much, @Hadatko could you please advice?

MichalPrincNXP avatar Jun 26 '19 09:06 MichalPrincNXP

Hi, the issue here is that until now the priority was supporting C use cases. I think you want C++ specific feature. C++ specific features are not yet supported.

Hadatko avatar Jun 26 '19 20:06 Hadatko

Hi, i am preparing version where C++ related files will be generated erpc namespace. Is that enough for you or do you need your custom namespace?

Hadatko avatar Jun 10 '22 08:06 Hadatko

i think we understand this issue wrongly. Solution should be implement callback generated by erpc where you can call your callback inside. We will see if we want support more in future, but i think this will be no priority soon.

Hadatko avatar Sep 27 '23 12:09 Hadatko