Page 1 of 1

How to handle variable numbers of BaseDataVariable?

Posted: 25 Jul 2018, 09:42
by AnnieFYWu
Hi,

I have to add variable numbers of variable in the custom provider. How to handle the values?
Because I don't know the total numbers of variable in advance, I can't use the ua_memorystore.
Does the ua_valuestore use in this situation?
If I use ua_valuestore, do I need to assign my own function to ctx->read or ctx->write to handle the read/write request?
Thanks.

Re: How to handle variable numbers of BaseDataVariable?

Posted: 30 Aug 2018, 12:24
by Support Team
all of this is possible:

1) memory store: initialize it with the maximum possible variable count
2) Write your one valuestore, which can dynamically reallocate the internal memory.
In embedded systems people usually want to avoid this.
3) Handle read/write/subscription yourself in the provider