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) {
case DSX_NO_ERROR:
printf("Measurement started successfully\n");
break;
case DSX_DCOM_NOT_CONNECTED:
printf("Error: Not connected to Dewesoft\n");
break;
case DSX_NET_STARTACQ_FAILED:
printf("Error: Failed to start network acquisition\n");
break;
default:
printf("Error: Unknown error code %d\n", result);
break;
}
DSX_NET_STARTACQ_FAILED
@ DSX_NET_STARTACQ_FAILED
NET: Failed to start acquisition.
Definition ConstsAndTypeDefs_Documented.h:109
DSX_DCOM_NOT_CONNECTED
@ DSX_DCOM_NOT_CONNECTED
DCOM: Not connected to Dewesoft application.
Definition ConstsAndTypeDefs_Documented.h:37
DSX_NO_ERROR
@ DSX_NO_ERROR
No error - operation successful.
Definition ConstsAndTypeDefs_Documented.h:25
dsconStartMeasurement
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