hi,
i have written a program which connects to a socket, and receives data to
visualize. I then store those data in a file, and pass it to the DXLinput of my
network. I receive multiple data files that i want to visualize. The problem is
that the data aren't refreshed when i execute DXLExecuteOnce(conn). In the
Visual Program Editor, you have to reset the server. But when i do this with
DXlink with the function uiDXLResetServer(conn), my screen is most of the time
black, with sometimes a flash of a visualisation.
I can't use the sleep function, because that would cause synchronisation errors
from my server program. If I give the files i read a different name, then it
works, but that means i have too much files i don't need.
This is a code snippet:
cerr << msg << endl;
char stream[msgsize];
memset(stream, 'x', msgsize);
dxfile.open(tempdx,ios::out);
while ( strcmp(stream,"END_SER") )
{
if ((numbytes=recv(sockfd, stream, msgsize-1, 0)) == -1)
{
cerr << "recv\n";
exit(1);
}
stream[numbytes]='\0';
dxfile << stream;
}
dxfile.close();
// Set the location of the source file
DXLSetValue(conn,"dxl_inputfile","\"/tmp/temp.dx\"");
// Execute changes
DXLExecuteOnce(conn);
Anybody has an idea?