How do I detect and handle disconnects?

If the neoVI is removed from the computer or stops responding, most API calls will generate a disconnect error. If you receive a return value from an API call that indicates an error occurred, you must call the GetLastAPIError method. If the error is NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE then the neoVI has either been unplugged or is not responding. 

To recover from this condition follow these steps:

The following API functions will generate the NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE error:

GetMessages
TxMessages
WaitForRxMessagesWithTimeOut
GetTimeStampForMsg
EnableNetworkCom
GetConfiguration
SendConfiguration
GetFireSettings
SetFireSettings
GetVCAN3Settings
SetVCAN3Settings
SetBitRate
GetDeviceParameters
SetDeviceParameters
ScriptLoad
ScriptStart
ScriptStop
ScriptClear
ScriptStartFBlock
ScriptStopFBlock
ScriptGetFBlockStatus
ScriptGetScriptStatus
ScriptReadAppSignal
ScriptWriteAppSignal
ScriptReadRxMessage
ScriptReadTxMessage
ScriptWriteRxMessage
ScriptWriteTxMessage
ScriptReadISO15765_2_TxMessage
ScriptWriteISO15765_2_TxMessage

 

intrepidcs API Documentation - (C) Copyright 2000-2012 Intrepid Control Systems, Inc.  (www.intrepidcs.com)

Last Updated : Tuesday, November 18, 2008