Within Qt Designer each widget has a property "ToolTip" and "WhatsThis". These 2 Strings are available in the sourcecode of your masks. If "WhatsThis" starts with '#' additional code will be generated by ui2pvc.
In the following example 2 whatsThis have been input with a starting '#'. In "generatedShowData(PARAM *p, DATA *d)" 2 calls to "static int getAndShow(PARAM *p, int id, DATA *d);" have been generated.
Within "getAndShow()" there is a simple example howto get and show modbus variables.
We can't know which physical interface you are using. You may use one of our supported interfaces or an additional one. The syntax of the whatsThis string is up to you. Choose a syntax that makes it easy for you to implement your "getAndShow()".
//<snip> // our mask contains the following objects enum { ID_MAIN_WIDGET = 0, textLabel2, textLabel1, pushButton1, ID_END_OF_WIDGETS }; static const char *toolTip[] = { "", "", "", "", ""}; static const char *whatsThis[] = { "", "#0 2", "#0 1", "", ""}; //<snip> static int getAndShow(PARAM *p, int id, DATA *d); static int generatedShowData(PARAM *p, DATA *d) { if(p == NULL) return 1; if(d == NULL) return 1; getAndShow(p,textLabel2,d); getAndShow(p,textLabel1,d); return 0; } // _end_of_generated_area_ (do not edit -> use ui2pvc) --------------------- //<snip> static int getAndShow(PARAM *p, int id, DATA *d) { if(p == NULL) return 1; if(id < 0) return 1; if(d == NULL) return 1; // todo: add your code here // simple Modbus example following) int val,offset,number; sscanf(whatsThis[id],"#%d %d",&offset,&number); val = modbus.readBit(offset,number); pvPrintf(p,id,"%d",val); return 0; } static int showData(PARAM *p, DATA *d) { if(p == NULL) return 1; if(d == NULL) return 1; generatedShowData(p,d); // (todo: add your code here) //int val; //float fval; return 0; } //<snip>