Hi, first time posting so apologies if this is a duplicate. I couldn't see anything similar.
Is there a way to display function parameters for struct member functions? Parameters are included in the member function declaration within the struct but when writing function calls to the member function, hitting ctrl-space the suggestions are blank and ctrl-shift-space does not work.
Struct declaration is below.
Many thanks.
typedef struct _protobufBuffer
{
// Pointer to self
struct _protobufBuffer *self;
// Member variables
uint8_t data[BUFFER_SIZE];
uint8_t *dataLocation;
// Member functions
void (*resetData)(void);
uint32_t (*getAvailableSpace)(void *pBufferLocation);
} protobufBuffer_t;
Hi Alice, thanks for the reply but that's not what I'm asking. I didn't do a very good job of explaining myself!
What I would like to see is the parameter list for a member function. When I define a function I can hit ctrl+shift+space to bring up the parameters that the function is expecting to receive as in the screenshot below.
When I use a function pointer within a type to point to this function so i can access it through dot notation I can see the function pointer definition showing me that it returns a uint32_t and accepts a void pointer as in the below image but it doesn't show me the parameter name as declared in the function declaration.
My question is, is there a way to get the same function parameter list as when you call the function directly, when you access it as a member function of a struct? Pressing ctrl+shift+space at the point shown below does not show the functions expected parameters or give any other assistance. Hopefully that makes it a little clearer?
Thanks for the assistance!
Hello @Annodizer
Thanks for your detail description. I know your meaning know. While sorry for the function pointer, can not show the parameter. Because the pointer just points to the address of function, does not include the parameter information.
BR
Alice
Hello @Annodizer
I'm not sure understand your meaning. If you want show the member of structure, please use "." or '->' as below, members will be showed automatically.
Please describe more detail is this is not your need. Thanks.
BR
Alice