Display signal from subthread..

Hi All,
Thanks for the previous replies. I am able to successfully implement the multithreading and
display signals by using GUI in main thread and then using the static points and changing
signals from the sub-thread by processing some data.
I am having one more requirement to complete my application. Though i am not sure how to
acheive it..
I have created the data boxes in main thread and attached idle function to it in begninig in main itself.
Now i want to display signals from the other thread for different objects... Treat objects
as some parameter (Sensors or machanical devices ) Now the problem i am facing is
at run time i need to create the the SignalX and SignalY as described in lissajous.c
gtkdatabox example. To acheive this i have created a array of pointer to the structure
as follows -

typedef struct dispSig
 gint moteid;
 GdkColor color;
 GtkDataboxGraph *graph;
 gfloat signalX_acc[POINTS];
 gfloat signalY_acc[POINTS];
 gfloat signalZ_acc[POINTS];
 gfloat signalX_gyro[POINTS];
 gfloat signalY_gyro[POINTS];

disSig *p[20] = {NULL};

Now i am trying to create the sturcture instance dynamically i am not able to allocate memory to

p[i] = malloc(sizeof(disSig));

also i am not able to do so for example for color when i tried

referring it as follows i get many compile time errors

p[i].color.red = some value;


Is it possible to pack the widgets into a strucutre as they themselves are classes

as per my understanding......

Please does some one has any mutithreaded application source code for gtkdatabox please

let me know if i can get some reference from it?






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]