Here's the code at the beginning of the vxiCreateDeviceLink routine. As you can see, the lockDevice parameter is always set to 0.
static BOOL vxiCreateDeviceLink(vxiPort * pvxiPort,
char *devName,Device_Link *pDevice_Link)
{
enum clnt_stat clntStat;
Create_LinkParms crLinkP;
Create_LinkResp crLinkR;
BOOL rtnVal = FALSE;
asynUser *pasynUser = pvxiPort->pasynUser;
crLinkP.clientId = (long) pvxiPort->rpcClient;
crLinkP.lockDevice = 0; /* do not try to lock the device */
crLinkP.lock_timeout = 0;/* if device is locked, forget it */
crLinkP.device = devName;
.
.
.
You could try setting lockDevice to 1 and see if this gets you the effect that you want.
I don't have my VXI-11 documents handy right now to see what happens if a client disappears suddenly (from a power-fail or such) without explicitly releasing the lock.
On Dec 2, 2010, at 9:10 AM, William Lu wrote:
Hello,
I am using asyn records with the vxi-11 driver in a soft ioc to control the HP3458A GPIB devices through an ICS 8065 Ethernet-GPIB Controller. I want to lock the devices using the vxi-11 locking so that the ioc has an exclusive access to the devices. Does asyn vxi-11 driver or asyn record already provide the vxi-11 locking function for users to lock and unlock GPIB devices and if they do, how do I use them?
Best regards,
William Lu
--
Weiwei Lu
757-269-7476
[email protected]