EmbeddedRPC/erpc

[QUESTION] Struct member Client side free function

Opened this issue · 0 comments

Hi,

We have client side output parameters that are allocated by erpc_alloc() in the client side read function.
In one case its a list and in another its a string member in a struct.
Server side does generate static free functions for these as expected.
On the other hand on client side these would have to be free by caller at some point but our interface does not provide means to do so. That is I would expect non static versions matching those generated on the server side.

For example for a struct of this kind:

struct ps_attr_t
{
    string              name;
    ...
    ...
}

PS_GetAttr(in ...., out ps_attr_t attributes)

When the above is used as an out argument the client\server side read functions uses erpc_alloc()
Server side generates a matching (static) free_ps_attr_t_struct()
There is noting simular on the client side.
Is there a better way to declare this function, maybe some attribues we are missing?