erpc icon indicating copy to clipboard operation
erpc copied to clipboard

[QUESTION] Is eRPC just support 256 functions?

Open thewon86 opened this issue 3 years ago • 8 comments

Hi All,

I create a interface with more than 300 functions , a request id with 342(0x156) become 86(0x86) in server side. I find the code uint32_t header = (kBasicCodecVersion << 24u) | ((service & 0xffu) << 16u) | ((request & 0xffu) << 8u) | ((uint32_t)type & 0xffu); , that make the request value (0-255)

So, how could i add more than 256 functions? Adding more interfaces(services)? or modify the code upside?

Thanks.

thewon86 avatar Aug 24 '22 07:08 thewon86

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

github-actions[bot] avatar Aug 24 '22 07:08 github-actions[bot]

Hi @thewon86 , yes currently it is 256 function types per interface. https://github.com/EmbeddedRPC/erpc/blob/d8f6a20d7ca4379d1f0ea437714a96b135a7057b/erpc_c/infra/erpc_basic_codec.cpp#L32 You would have to split functions into more interfaces, or write own basic codec with supporting more functions. Anyway we should add some asserts to catch this type of errors in debug mode.

Hadatko avatar Aug 28 '22 10:08 Hadatko

I see . Thank you.

thewon86 avatar Sep 01 '22 08:09 thewon86