Hi all,
I need to get several strings, written by operator, in a DataAritm.
I used GetData to Get string value stored in Sv obj,and then a DataCollector connected to the DArithm.
Browsing the forum I found some ideas to access the string, but I miss something.
Code in the DataArithm:
classdef Da3 DataCollect;
classdef Da4 DpCollect;
pwr_sClass_Sv * Buf;
Buf = ((pwr_sClass_Sv *)(Da3->DataP[2].Ptr))->ActualValue;
...
fprintf(MyFile,"ID:%s;%d;%d;%d;%d\n",Buf,I5,Da4->Dp[0],Da4->Dp[1],Da4->Dp[2]);
This generate the following warning:
warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘struct pwr_sClass_Sv *’ [-Wformat]
What kind of class should I use for Buf?
Thanks in advance