DSRemoteConnect is a C++ library that provides remote connectivity to Dewesoft measurement applications. It supports two connection types:
#include "DSRemoteConnect.h"
int main() {
size_t channelCount;
ChannelIdList channelList;
double* data = new double[1000];
double* timestamps = new double[1000];
size_t dataCount = 1000;
while (measurement_active) {
}
}
delete[] data;
delete[] timestamps;
return 0;
}
@ DSX_NO_ERROR
No error - operation successful.
@ DSX_CONNECTION_TYPE_NET
Network connection using TCP/IP protocols.
DSREMOTECONNECT_API int dsconFreeChannelInstance(ChannelInstanceHandle chInstance)
Free a channel instance.
DSREMOTECONNECT_API int dsconDestroyInstance(DSXInstanceHandle handle)
Destroy a DSX instance.
DSREMOTECONNECT_API int dsconLoadSetup(DSXInstanceHandle handle, char *fileName)
Load a Dewesoft setup file.
DSXInstance * DSXInstanceHandle
Handle to a DSX instance for connection management.
DSREMOTECONNECT_API int dsconStopMeasurement(DSXInstanceHandle handle)
Stop measurement.
DSREMOTECONNECT_API int dsconCreateChannelInstance(DSXInstanceHandle handle, ChannelID id, ChannelInstanceHandle *chInstance)
Create a channel instance by ID.
DSREMOTECONNECT_API int dsconChannelReadScalarData_2(ChannelInstanceHandle handle, double *data, double *timestamps, size_t *count)
Read scalar data from channel (recommended version)
DSREMOTECONNECT_API int dsconEnumerateChannels(DSXInstanceHandle handle, ChannelIdList *channelIdList, size_t *count)
Enumerate all available channels.
ChannelInstance * ChannelInstanceHandle
Handle to a measurement channel instance.
DSREMOTECONNECT_API int dsconFreeEnumerateChannels(DSXInstanceHandle handle, ChannelIdList *channelIdList)
Free memory allocated by channel enumeration.
DSREMOTECONNECT_API int dsconCreateInstance(DSXInstanceHandle *handle, int connectionType)
Create a new DSX instance.
DSREMOTECONNECT_API int dsconStartMeasurement(DSXInstanceHandle handle)
Start measurement.
DSREMOTECONNECT_API int dsconDisconnect(DSXInstanceHandle handle)
Disconnect from Dewesoft application.
DSREMOTECONNECT_API int dsconGetChannelCount(DSXInstanceHandle handle, size_t *count)
Get the total number of available channels.
DSREMOTECONNECT_API int dsconConnect(DSXInstanceHandle handle, char *connectionString)
Connect to a Dewesoft application.
All functions return DX_ERROR_CODE values. Always check return codes: