I am building a Multi-Up test system where several applications will have to make GPIB calls at the same time. I am trying to provide sychronization mechanisms to protect data and logic. I was wondering if the GPIB handle could be held in a shared segment and passed on to another application for use.
1) App A,B,C loads a shared dll
2) App A open GPIB(0,1) and the handle is held in a shared segment in the dll
3) App B opens GPIB(0,1) through shareddllAPI. Shared dll gives AppB the same handle opened by App A
will this work? I want to avoid client server model and IPC because of the heavy use of GPIB communication. Also i want to avoid the cost of opening and closing the port for each read/write/query.
Will i face problems if i try to keep the GPIB handle in a shared data segment? If not, is there a way to avoid the client server model and aviod the cost of context switch for each gpib opeartion?