As I try to access data points dynamicly, e.g. by calling http://192.168.1.151/read?DP=0x2000&Type=TempL, you recently suggested to just instantiate a data point locally.
Turns out, that may not be such a great idea, because if I did, that DP exists within that function only. If the function exits, the DP is gone.
The callback function, however, kicks in later ( or not at all ? ) but the DP is gone. Potentially even crashing the system.
Having a global DP solves that issue, however, it turned out that all the crucial data is const so I only set it up once and then thats it.
My suggestion: remove const for everything that is required to re-use a DP. Name is irrelevant, I guess.
As I try to access data points dynamicly, e.g. by calling http://192.168.1.151/read?DP=0x2000&Type=TempL, you recently suggested to just instantiate a data point locally.
Turns out, that may not be such a great idea, because if I did, that DP exists within that function only. If the function exits, the DP is gone.
The callback function, however, kicks in later ( or not at all ? ) but the DP is gone. Potentially even crashing the system.
Having a global DP solves that issue, however, it turned out that all the crucial data is const so I only set it up once and then thats it.
My suggestion: remove const for everything that is required to re-use a DP. Name is irrelevant, I guess.