DSRemoteConnect C++ Library 1.1.3.24
Remote connection library for Dewesoft measurement applications
Loading...
Searching...
No Matches
Error Handling Guide

Checking Return Values

All DSRemoteConnect functions return a DX_ERROR_CODE value. Always check these values:

int result = dsconStartMeasurement(instance);
switch(result) {
printf("Measurement started successfully\n");
break;
printf("Error: Not connected to Dewesoft\n");
break;
printf("Error: Failed to start network acquisition\n");
break;
default:
printf("Error: Unknown error code %d\n", result);
break;
}
@ DSX_NET_STARTACQ_FAILED
NET: Failed to start acquisition.
@ DSX_DCOM_NOT_CONNECTED
DCOM: Not connected to Dewesoft application.
@ DSX_NO_ERROR
No error - operation successful.
DSREMOTECONNECT_API int dsconStartMeasurement(DSXInstanceHandle handle)
Start measurement.

Error Categories

  • Connection Errors: DSX_*_NOT_CONNECTED, DSX_*_UNABLE_TO_CONNECT
  • Data Errors: DSX_*_NO_DATA, DSX_TOO_MANY_SAMPLES_AVAILABLE
  • Parameter Errors: DSX_NULL_HANDLER, DSX_COUNT_OUT_OF_BOUNDS
  • Channel Errors: DSX_*_CHANNEL_ID_NOT_FOUND, DSX_CANNOT_MAKE_CH_INSTANCE
  • Network Specific: DSX_NET_* errors
  • DCOM Specific: DSX_DCOM_* errors

Recovery Strategies

  • Connection Lost: Attempt reconnection with dsconConnect()
  • No Data Available: Retry reading after short delay
  • Buffer Too Small: Increase buffer size or read in smaller chunks
  • Channel Not Found: Verify setup is loaded and channel exists