Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION] Struct member Client side free function #414

Open
Diagano opened this issue Mar 5, 2024 · 0 comments
Open

[QUESTION] Struct member Client side free function #414

Diagano opened this issue Mar 5, 2024 · 0 comments
Labels

Comments

@Diagano
Copy link

Diagano commented Mar 5, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant