Hi
I have strange problem with getting data from FSUIPC in C#.
My situation:
- application with two threads
- first thread is reading data with 50ms interval
- second thread is writing data when needed
- each thread is using its own fsuipc class object from SDK (UIPC_SDK_CSHARP Revision 1.13)
Sometimes, after writing data (sending control (offset 0x3110) COM_RADIO_FRACT_INC), FSUIPC_Get(...) method in reading thread returns false (after debugging it, I've found, that it returns false because data I want to read is not ready (IPCdr[Token] == false).
This problem has really bothered me, so I moved to test example (in C#) which is added to SDK. I've added button which writes to FSUIPC (the same offset as above) but using other fsuipc class object then the rest of application. Started application, started loop which is reading data and pressed that button many times - zero errors (added some flags to see it). But this example application is not using extra thread. Reading loop is placed in main thread with call to Application.DoEvents() function. So I've added thread and reading loop in it. Again test and - voile - errors in getting data. So, it seems that reading data from FSUIPC should be placed in main thread of Windows application, not in extra thread specified to doing it. Am I right ? If so, I will try to repair my app, otherwise what can be wrong ?
PS. Sorry for my English.