DSRemoteConnect C++ Library 1.1.3.24 Remote connection library for Dewesoft measurement applications

Loading...
Searching...
No Matches
Macros | Typedefs | Functions | Variables
DSRemoteConnect_Documented.h File Reference
`#include "DSXInstance.h"`
`#include "DSXDCOMInstance.h"`
`#include "DSXNETInstance.h"`

Go to the source code of this file.

## Macros
#define | DSREMOTECONNECT_API __declspec(dllimport)

## Typedefs
typedef DSXInstance * | DSXInstanceHandle
| Handle to a DSX instance for connection management.
typedef ChannelInstance * | ChannelInstanceHandle
| Handle to a measurement channel instance.

## Functions
DSREMOTECONNECT_API int | dsconGetVersion (char *version, size_t len)
| Get the library version string.
DSREMOTECONNECT_API int | dsconCreateInstance (DSXInstanceHandle *handle, int connectionType)
| Create a new DSX instance.
DSREMOTECONNECT_API int | dsconConnect (DSXInstanceHandle handle, char *connectionString)
| Connect to a Dewesoft application.
DSREMOTECONNECT_API int | dsconDestroyInstance (DSXInstanceHandle handle)
| Destroy a DSX instance.
DSREMOTECONNECT_API int | dsconDisconnect (DSXInstanceHandle handle)
| Disconnect from Dewesoft application.
DSREMOTECONNECT_API int | dsconLoadSetup (DSXInstanceHandle handle, char *fileName)
| Load a Dewesoft setup file.
DSREMOTECONNECT_API int | dsconSetAppWindowVisible (DSXInstanceHandle handle, bool visible)
| Set Dewesoft application window visibility.
DSREMOTECONNECT_API int | dsconSetBufferSize (DSXInstanceHandle handle, int bufferSize)
| Set buffer size for data acquisition.
DSREMOTECONNECT_API int | dsconGetChannelCount (DSXInstanceHandle handle, size_t *count)
| Get the total number of available channels.
DSREMOTECONNECT_API int | dsconEnumerateChannels (DSXInstanceHandle handle, ChannelIdList *channelIdList, size_t *count)
| Enumerate all available channels.
DSREMOTECONNECT_API int | dsconFreeEnumerateChannels (DSXInstanceHandle handle, ChannelIdList *channelIdList)
| Free memory allocated by channel enumeration.
DSREMOTECONNECT_API int | dsconInitChannelIdEnum (DSXInstanceHandle handle)
| Initialize channel ID enumeration iterator.
DSREMOTECONNECT_API int | dsconGetNextChannelId (DSXInstanceHandle handle, ChannelID id)
| Get next channel ID in enumeration.
DSREMOTECONNECT_API int | dsconGetNextChannelIdSize (DSXInstanceHandle handle, int *size)
| Get size of next channel ID.
DSREMOTECONNECT_API int | dsconCreateChannelInstance (DSXInstanceHandle handle, ChannelID id, ChannelInstanceHandle *chInstance)
| Create a channel instance by ID.
DSREMOTECONNECT_API int | dsconCreateChannelInstanceByName (DSXInstanceHandle handle, char *chName, ChannelInstanceHandle *chInstance)
| Create a channel instance by name.
DSREMOTECONNECT_API int | dsconFreeChannelInstance (ChannelInstanceHandle chInstance)
| Free a channel instance.
DSREMOTECONNECT_API int | dsconChannelGetName (ChannelInstanceHandle channel, char *name, size_t len)
| Get channel display name.
DSREMOTECONNECT_API int | dsconGetSampleRate (ChannelInstanceHandle handle, double *sampleRate)
| Get channel sample rate.
DSREMOTECONNECT_API int | dsconGetChannelType (ChannelInstanceHandle handle, int *chType)
| Get channel type.
DSREMOTECONNECT_API int | dsconIsChannelControl (ChannelInstanceHandle handle, bool *result)
| Check if channel is a control channel.
DSREMOTECONNECT_API int | dsconGetChUnit (ChannelInstanceHandle handle, char *resultUnit, size_t len)
| Get channel measurement unit.
DSREMOTECONNECT_API int | dsconChannelSetTransferred (ChannelInstanceHandle handle, bool transferred)
| Set channel transfer state.
DSREMOTECONNECT_API int | dsconIsInAqusition (DSXInstanceHandle handle, bool *value)
| Check if measurement is active.
DSREMOTECONNECT_API int | dsconStartMeasurement (DSXInstanceHandle handle)
| Start measurement.
DSREMOTECONNECT_API int | dsconStopMeasurement (DSXInstanceHandle handle)
| Stop measurement.
DSREMOTECONNECT_API int | dsconBeginRead (DSXInstanceHandle handle, double *startTime, double *endTime)
| Begin data reading session.
DSREMOTECONNECT_API int | dsconChannelReadScalarData (ChannelInstanceHandle handle, double **data, double **timestamps, size_t *count)
| Read scalar data from channel (legacy version)
DSREMOTECONNECT_API int | dsconChannelReadScalarData_2 (ChannelInstanceHandle handle, double *data, double *timestamps, size_t *count)
| Read scalar data from channel (recommended version)
DSREMOTECONNECT_API int | dsconChannelReadScalarData_2abs (ChannelInstanceHandle handle, double *data, double *timestamps, size_t *count)
| Read scalar data with absolute timestamps.
DSREMOTECONNECT_API int | dsconControlChannelWriteData (ChannelInstanceHandle handle, double data)
| Write data to control channel.
DSREMOTECONNECT_API int | dsconEndRead (DSXInstanceHandle handle)
| End data reading session.

## Variables
const std::string | VER_DSREMOTE = "1.1.3.24"
| DSRemoteConnect library version string.

## Macro Definition Documentation

## ◆ DSREMOTECONNECT_API

#define DSREMOTECONNECT_API __declspec(dllimport)

Definition at line 125 of file DSRemoteConnect_Documented.h.

## Typedef Documentation

## ◆ ChannelInstanceHandle

ChannelInstanceHandle

Handle to a measurement channel instance.

This handle represents a specific measurement channel and provides access to channel data, properties, and control capabilities.

Definition at line 159 of file DSRemoteConnect_Documented.h.

## ◆ DSXInstanceHandle

DSXInstanceHandle

Handle to a DSX instance for connection management.

This handle represents a connection to a Dewesoft application instance. It encapsulates either a DCOM or NET connection type.

Definition at line 150 of file DSRemoteConnect_Documented.h.

## Function Documentation

## ◆ dsconBeginRead()

DSREMOTECONNECT_API int dsconBeginRead | ( | DSXInstanceHandle | handle,
|  | double * | startTime,
|  | double * | endTime )

Begin data reading session.

Prepares the system for data reading and optionally sets time bounds.

Parameters

  [in] | handle | DSX instance handle
  [in,out] | startTime | Pointer to start time (can be NULL for current time)
  [in,out] | endTime | Pointer to end time (can be NULL for current time)

Returns
  DX_ERROR_CODE

Return values

  DSX_NO_ERROR | Success
  DSX_NULL_HANDLER | Invalid handle

Note
  Always call dsconEndRead() when finished reading data

See also
  dsconEndRead(), dsconChannelReadScalarData_2()

## ◆ dsconChannelGetName()

DSREMOTECONNECT_API int dsconChannelGetName | ( | ChannelInstanceHandle | channel,
|  | char * | name,
|  | size_t | len )

Get channel display name.

Retrieves the human-readable name of the channel.

Parameters

  [in] | channel | Channel instance handle
  [out] | name | Buffer to store channel name
  [in] | len | Buffer length

Returns
  DX_ERROR_CODE

Return values

  DSX_NO_ERROR | Success
  DSX_NULL_HANDLER | Invalid handle
  DSX_COUNT_OUT_OF_BOUNDS | Buffer too small

## ◆ dsconChannelReadScalarData()

DSREMOTECONNECT_API int dsconChannelReadScalarData | ( | ChannelInstanceHandle | handle,
|  | double ** | data,
|  | double ** | timestamps,
|  | size_t * | count )

Read scalar data from channel (legacy version)

Reads measurement data and timestamps from a channel. Memory is allocated internally and must be managed carefully.

Parameters

  [in] | handle | Channel instance handle
  [out] | data | Pointer to store data array pointer
  [out] | timestamps | Pointer to store timestamp array pointer
  [out] | count | Pointer to store number of samples read

Returns
  DX_ERROR_CODE

Return values

  DSX_NO_ERROR | Success
  DSX_NULL_HANDLER | Invalid handle
  DSX_DCOM_NO_DATA | No data available
  DSX_TOO_MANY_SAMPLES_AVAILABLE | More data available than requested

Deprecated
  Use dsconChannelReadScalarData_2() instead for better memory management

See also
  dsconChannelReadScalarData_2()

## ◆ dsconChannelReadScalarData_2()

DSREMOTECONNECT_API int dsconChannelReadScalarData_2 | ( | ChannelInstanceHandle | handle,
|  | double * | data,
|  | double * | timestamps,
|  | size_t * | count )

Read scalar data from channel (recommended version)

Reads measurement data and timestamps into user-provided buffers. This is the recommended function for data reading.

Parameters

  [in] | handle | Channel instance handle
  [out] | data | Pre-allocated array to store data values
  [out] | timestamps | Pre-allocated array to store timestamp values
  [in,out] | count | Input: buffer size, Output: actual samples read

Returns
  DX_ERROR_CODE

Return values

  DSX_NO_ERROR | Success
  DSX_NULL_HANDLER | Invalid handle
  DSX_DCOM_NO_DATA | No data available
  DSX_TOO_MANY_SAMPLES_AVAILABLE | More data available than buffer size

Note
  Timestamps are relative to measurement start time

See also
  dsconBeginRead(), dsconEndRead()

double data[1000];
double timestamps[1000];
size_t count = 1000;
if (dsconChannelReadScalarData_2(channel, data, timestamps, &count) == DSX_NO_ERROR) {
for (size_t i = 0; i < count; i++) {
printf("Time: %f, Value: %f\n", timestamps[i], data[i]);
}
}
DSX_NO_ERROR
@ DSX_NO_ERROR
No error - operation successful.
Definition ConstsAndTypeDefs_Documented.h:25
dsconChannelReadScalarData_2
DSREMOTECONNECT_API int dsconChannelReadScalarData_2(ChannelInstanceHandle handle, double *data, double *timestamps, size_t *count)
Read scalar data from channel (recommended version)

## ◆ dsconChannelReadScalarData_2abs()

DSREMOTECONNECT_API int dsconChannelReadScalarData_2abs | ( | ChannelInstanceHandle | handle,
|  | double * | data,
|  | double * | timestamps,
|  | size_t * | count )

Read scalar data with absolute timestamps.

Similar to dsconChannelReadScalarData_2() but returns absolute timestamps instead of relative ones.

Parameters

  [in] | handle | Channel instance handle
  [out] | data | Pre-allocated array to store data values
  [out] | timestamps | Pre-allocated array to store absolute timestamp values
  [in,out] | count | Input: buffer size, Output: actual samples read

Returns
  DX_ERROR_CODE

Return values

  DSX_NO_ERROR | Success
  DSX_NULL_HANDLER | Invalid handle
  DSX_DCOM_NO_DATA | No data available

Note
  Timestamps are absolute system time values

See also
  dsconChannelReadScalarData_2()

## ◆ dsconChannelSetTransferred()

DSREMOTECONNECT_API int dsconChannelSetTransferred | ( | ChannelInstanceHandle | handle,
|  | bool | transferred )

Set channel transfer state.

Enables or disables data transfer for the channel.

Parameters

  [in] | handle | Channel instance handle
  [in] | transferred | true to enable transfer, false to disable

Returns
  DX_ERROR_CODE

Return values

  DSX_NO_ERROR | Success
  DSX_NULL_HANDLER | Invalid handle

## ◆ dsconConnect()

DSREMOTECONNECT_API int dsconConnect | ( | DSXInstanceHandle | handle,
|  | char * | connectionString )

Connect to a Dewesoft application.

Establishes connection to a Dewesoft application using the specified connection string.

Parameters

  [in] | handle | DSX instance handle
  [in] | connectionString | Connection-specific string: DCOM: Empty string "" for local connection NET: "hostname:telnet_port:data_port" (e.g., "localhost:8999:8001")

Returns
  DX_ERROR_CODE

Return values

  DSX_NO_ERROR | Success
  DSX_NULL_HANDLER | Invalid handle
  DSX_INVALID_CONNECTION_STRING | Invalid connection string format
  DSX_DCOM_COULD_NOT_CONNECT | Failed to connect via DCOM
  DSX_NET_UNABLE_TO_CONNECT | Failed to connect via NET

Note
  For NET connections, ensure Dewesoft is running with NET server enabled

See also
  dsconDisconnect()

## ◆ dsconControlChannelWriteData()

DSREMOTECONNECT_API int dsconControlChannelWriteData | ( | ChannelInstanceHandle | handle,
|  | double | data )

Write data to control channel.

Writes a control value to a control channel. The channel must be configured as a control channel in the Dewesoft setup.

Parameters

  [in] | handle | Channel instance handle (must be control channel)
  [in] | data | Value to write to the control channel

Returns
  DX_ERROR_CODE

Return values

  DSX_NO_ERROR | Success
  DSX_NULL_HANDLER | Invalid handle
  DSX_CH_IS_NOT_CONTROL | Channel is not a control channel

Note
  Verify channel is a control channel using dsconIsChannelControl()

See also
  dsconIsChannelControl()

bool isControl;
dsconIsChannelControl(channel, &isControl);
if (isControl) {
dsconControlChannelWriteData(channel, 5.0);
}
dsconControlChannelWriteData
DSREMOTECONNECT_API int dsconControlChannelWriteData(ChannelInstanceHandle handle, double data)
Write data to control channel.
dsconIsChannelControl
DSREMOTECONNECT_API int dsconIsChannelControl(ChannelInstanceHandle handle, bool *result)
Check if channel is a control channel.

## ◆ dsconCreateChannelInstance()

DSREMOTECONNECT_API int dsconCreateChannelInstance | ( | DSXInstanceHandle | handle,
|  | ChannelID | id,
|  | ChannelInstanceHandle * | chInstance )

Create a channel instance by ID.

Creates a channel instance handle for accessing a specific channel. The channel ID should be obtained from enumeration functions.

Parameters

  [in] | handle | DSX instance handle
  [in] | id | Channel ID string
  [out] | chInstance | Pointer to store created channel instance handle

Returns
  DX_ERROR_CODE

Return values

  DSX_NO_ERROR | Success
  DSX_NULL_HANDLER | Invalid handle
  DSX_DCOM_CHANNEL_ID_NOT_FOUND | Channel ID not found
  DSX_CANNOT_MAKE_CH_INSTANCE | Failed to create channel instance

Note
  Always call dsconFreeChannelInstance() when done

See also
  dsconFreeChannelInstance(), dsconCreateChannelInstanceByName()

## ◆ dsconCreateChannelInstanceByName()

DSREMOTECONNECT_API int dsconCreateChannelInstanceByName | ( | DSXInstanceHandle | handle,
|  | char * | chName,
|  | ChannelInstanceHandle * | chInstance )

Create a channel instance by name.

Creates a channel instance handle using the channel's display name.

Parameters

  [in] | handle | DSX instance handle
  [in] | chName | Channel display name
  [out] | chInstance | Pointer to store created channel instance handle

Returns
  DX_ERROR_CODE

Return values

  DSX_NO_ERROR | Success
  DSX_NULL_HANDLER | Invalid handle
  DSX_DCOM_CHANNEL_ID_NOT_FOUND | Channel name not found
  DSX_CANNOT_MAKE_CH_INSTANCE | Failed to create channel instance

Note
  Always call dsconFreeChannelInstance() when done

See also
  dsconFreeChannelInstance(), dsconCreateChannelInstance()

ChannelInstanceHandle channel;
dsconCreateChannelInstanceByName(instance, "AI 1", &channel);
ChannelInstanceHandle
ChannelInstance * ChannelInstanceHandle
Handle to a measurement channel instance.
Definition DSRemoteConnect_Documented.h:159
dsconCreateChannelInstanceByName
DSREMOTECONNECT_API int dsconCreateChannelInstanceByName(DSXInstanceHandle handle, char *chName, ChannelInstanceHandle *chInstance)
Create a channel instance by name.

## ◆ dsconCreateInstance()

DSREMOTECONNECT_API int dsconCreateInstance | ( | DSXInstanceHandle * | handle,
|  | int | connectionType )

Create a new DSX instance.

Creates a new and bla bla bla instance for connecting to Dewesoft applications. The connection type determines the communication protocol used.

Parameters

  [out] | handle | Pointer to store the created instance handle
  [in] | connectionType | Connection type (DSX_CONNECTION_TYPE_DCOM or DSX_CONNECTION_TYPE_NET)

Returns
  DX_ERROR_CODE

Return values

  DSX_NO_ERROR | Success
  DSX_NULL_HANDLER | Invalid handle pointer
  DSX_UNKNOWN_ERROR | Failed to create instance

Note
  Always call dsconDestroyInstance() when done with the instance

See also
  dsconDestroyInstance(), DSX_CONNECTION_TYPE

## ◆ dsconDestroyInstance()

DSREMOTECONNECT_API int dsconDestroyInstance | ( | DSXInstanceHandle | handle | ) |

Destroy a DSX instance.

Cleans up and destroys the DSX instance. This should be called for every instance created with dsconCreateInstance().

Parameters

  [in] | handle | DSX instance handle to destroy

Returns
  DX_ERROR_CODE

Return values

  DSX_NO_ERROR | Success
  DSX_NULL_HANDLER | Invalid handle

Note
  Automatically disconnects if still connected

See also
  dsconCreateInstance()

## ◆ dsconDisconnect()

DSREMOTECONNECT_API int dsconDisconnect | ( | DSXInstanceHandle | handle | ) |

Disconnect from Dewesoft application.

Closes the connection to the Dewesoft application while keeping the instance alive.

Parameters

  [in] | handle | DSX instance handle

Returns
  DX_ERROR_CODE

Return values

  DSX_NO_ERROR | Success
  DSX_NULL_HANDLER | Invalid handle
  DSX_DCOM_NOT_CONNECTED | Not connected via DCOM

See also
  dsconConnect()

## ◆ dsconEndRead()

DSREMOTECONNECT_API int dsconEndRead | ( | DSXInstanceHandle | handle | ) |

End data reading session.

Finalizes the data reading session started with dsconBeginRead().

Parameters

  [in] | handle | DSX instance handle

Returns
  DX_ERROR_CODE

Return values

  DSX_NO_ERROR | Success
  DSX_NULL_HANDLER | Invalid handle

See also
  dsconBeginRead()

## ◆ dsconEnumerateChannels()

DSREMOTECONNECT_API int dsconEnumerateChannels | ( | DSXInstanceHandle | handle,
|  | ChannelIdList * | channelIdList,
|  | size_t * | count )

Enumerate all available channels.

Gets a list of all channel IDs in the current setup. The returned list must be freed using dsconFreeEnumerateChannels().

Parameters

  [in] | handle | DSX instance handle
  [out] | channelIdList | Pointer to store array of channel ID strings
  [in,out] | count | Input: expected count, Output: actual count

Returns
  DX_ERROR_CODE

Return values

  DSX_NO_ERROR | Success
  DSX_NULL_HANDLER | Invalid handle
  DSX_DCOM_NOT_CONNECTED | Not connected
  DSX_DCOM_NO_CHANNELS_TO_ENUMERATE | No channels available

Note
  Always call dsconFreeEnumerateChannels() to free memory

See also
  dsconFreeEnumerateChannels(), dsconGetChannelCount()

size_t count;
dsconGetChannelCount(instance, &count);
ChannelIdList channelList;
dsconEnumerateChannels(instance, &channelList, &count);
// Use channel list...
dsconFreeEnumerateChannels(instance, &channelList);
dsconEnumerateChannels
DSREMOTECONNECT_API int dsconEnumerateChannels(DSXInstanceHandle handle, ChannelIdList *channelIdList, size_t *count)
Enumerate all available channels.
dsconFreeEnumerateChannels
DSREMOTECONNECT_API int dsconFreeEnumerateChannels(DSXInstanceHandle handle, ChannelIdList *channelIdList)
Free memory allocated by channel enumeration.
dsconGetChannelCount
DSREMOTECONNECT_API int dsconGetChannelCount(DSXInstanceHandle handle, size_t *count)
Get the total number of available channels.

## ◆ dsconFreeChannelInstance()

DSREMOTECONNECT_API int dsconFreeChannelInstance | ( | ChannelInstanceHandle | chInstance | ) |

Free a channel instance.

Frees the memory and resources associated with a channel instance.

Parameters

  [in] | chInstance | Channel instance handle to free

Returns
  DX_ERROR_CODE

Return values

  DSX_NO_ERROR | Success
  DSX_NULL_HANDLER | Invalid handle

See also
  dsconCreateChannelInstance(), dsconCreateChannelInstanceByName()

## ◆ dsconFreeEnumerateChannels()

DSREMOTECONNECT_API int dsconFreeEnumerateChannels | ( | DSXInstanceHandle | handle,
|  | ChannelIdList * | channelIdList )

Free memory allocated by channel enumeration.

Frees the memory allocated by dsconEnumerateChannels().

Parameters

  [in] | handle | DSX instance handle
  [in] | channelIdList | Channel ID list to free

Returns
  DX_ERROR_CODE

Return values

  DSX_NO_ERROR | Success
  DSX_NULL_HANDLER | Invalid handle

See also
  dsconEnumerateChannels()

## ◆ dsconGetChannelCount()

DSREMOTECONNECT_API int dsconGetChannelCount | ( | DSXInstanceHandle | handle,
|  | size_t * | count )

Get the total number of available channels.

Returns the number of channels available in the current setup.

Parameters

  [in] | handle | DSX instance handle
  [out] | count | Pointer to store channel count

Returns
  DX_ERROR_CODE

Return values

  DSX_NO_ERROR | Success
  DSX_NULL_HANDLER | Invalid handle
  DSX_DCOM_NOT_CONNECTED | Not connected

See also
  dsconEnumerateChannels()

## ◆ dsconGetChannelType()

DSREMOTECONNECT_API int dsconGetChannelType | ( | ChannelInstanceHandle | handle,
|  | int * | chType )

Get channel type.

Returns the channel type (async, sync, or single value).

Parameters

  [in] | handle | Channel instance handle
  [out] | chType | Pointer to store channel type (DSX_CH_TYPE)

Returns
  DX_ERROR_CODE

Return values

  DSX_NO_ERROR | Success
  DSX_NULL_HANDLER | Invalid handle

See also
  DSX_CH_TYPE

## ◆ dsconGetChUnit()

DSREMOTECONNECT_API int dsconGetChUnit | ( | ChannelInstanceHandle | handle,
|  | char * | resultUnit,
|  | size_t | len )

Get channel measurement unit.

Returns the physical unit of measurement for the channel (e.g., "V", "A", "°C").

Parameters

  [in] | handle | Channel instance handle
  [out] | resultUnit | Buffer to store unit string
  [in] | len | Buffer length

Returns
  DX_ERROR_CODE

Return values

  DSX_NO_ERROR | Success
  DSX_NULL_HANDLER | Invalid handle
  DSX_COUNT_OUT_OF_BOUNDS | Buffer too small

## ◆ dsconGetNextChannelId()

DSREMOTECONNECT_API int dsconGetNextChannelId | ( | DSXInstanceHandle | handle,
|  | ChannelID | id )

Get next channel ID in enumeration.

Retrieves the next channel ID in the enumeration sequence.

Parameters

  [in] | handle | DSX instance handle
  [out] | id | Buffer to store channel ID (must be pre-allocated)

Returns
  DX_ERROR_CODE

Return values

  DSX_NO_ERROR | Success - channel ID retrieved
  DSX_END_OF_ENUM | No more channels
  DSX_NULL_HANDLER | Invalid handle

Note
  Use dsconGetNextChannelIdSize() to determine required buffer size

See also
  dsconInitChannelIdEnum(), dsconGetNextChannelIdSize()

## ◆ dsconGetNextChannelIdSize()

DSREMOTECONNECT_API int dsconGetNextChannelIdSize | ( | DSXInstanceHandle | handle,
|  | int * | size )

Get size of next channel ID.

Returns the buffer size needed for the next channel ID in enumeration.

Parameters

  [in] | handle | DSX instance handle
  [out] | size | Pointer to store required buffer size

Returns
  DX_ERROR_CODE

Return values

  DSX_NO_ERROR | Success
  DSX_END_OF_ENUM | No more channels
  DSX_NULL_HANDLER | Invalid handle

See also
  dsconGetNextChannelId(), dsconInitChannelIdEnum()

## ◆ dsconGetSampleRate()

DSREMOTECONNECT_API int dsconGetSampleRate | ( | ChannelInstanceHandle | handle,
|  | double * | sampleRate )

Get channel sample rate.

Returns the sample rate of the channel in Hz.

Parameters

  [in] | handle | Channel instance handle
  [out] | sampleRate | Pointer to store sample rate value

Returns
  DX_ERROR_CODE

Return values

  DSX_NO_ERROR | Success
  DSX_NULL_HANDLER | Invalid handle

## ◆ dsconGetVersion()

DSREMOTECONNECT_API int dsconGetVersion | ( | char * | version,
|  | size_t | len )

Get the library version string.

Parameters

  [out] | version | Buffer to store version string
  [in] | len | Length of the buffer

Returns
  DX_ERROR_CODE

Return values

  DSX_NO_ERROR | Success
  DSX_COUNT_OUT_OF_BOUNDS | Buffer too small

char version[50];
dsconGetVersion(version, sizeof(version));
printf("DSRemoteConnect version: %s\n", version);
dsconGetVersion
DSREMOTECONNECT_API int dsconGetVersion(char *version, size_t len)
Get the library version string.

## ◆ dsconInitChannelIdEnum()

DSREMOTECONNECT_API int dsconInitChannelIdEnum | ( | DSXInstanceHandle | handle | ) |

Initialize channel ID enumeration iterator.

Initializes an iterator for sequential channel enumeration. Use with dsconGetNextChannelId() and dsconGetNextChannelIdSize().

Parameters

  [in] | handle | DSX instance handle

Returns
  DX_ERROR_CODE

Return values

  DSX_NO_ERROR | Success
  DSX_NULL_HANDLER | Invalid handle

See also
  dsconGetNextChannelId(), dsconGetNextChannelIdSize()

## ◆ dsconIsChannelControl()

DSREMOTECONNECT_API int dsconIsChannelControl | ( | ChannelInstanceHandle | handle,
|  | bool * | result )

Check if channel is a control channel.

Determines whether the channel can be used for writing control data.

Parameters

  [in] | handle | Channel instance handle
  [out] | result | Pointer to store result (true if control channel)

Returns
  DX_ERROR_CODE

Return values

  DSX_NO_ERROR | Success
  DSX_NULL_HANDLER | Invalid handle

See also
  dsconControlChannelWriteData()

## ◆ dsconIsInAqusition()

DSREMOTECONNECT_API int dsconIsInAqusition | ( | DSXInstanceHandle | handle,
|  | bool * | value )

Check if measurement is active.

Determines whether a measurement is currently running.

Parameters

  [in] | handle | DSX instance handle
  [out] | value | Pointer to store result (true if measuring)

Returns
  DX_ERROR_CODE

Return values

  DSX_NO_ERROR | Success
  DSX_NULL_HANDLER | Invalid handle
  DSX_DCOM_NOT_CONNECTED | Not connected

## ◆ dsconLoadSetup()

DSREMOTECONNECT_API int dsconLoadSetup | ( | DSXInstanceHandle | handle,
|  | char * | fileName )

Load a Dewesoft setup file.

Loads a .dxs setup file into the connected Dewesoft application. This configures channels, sample rates, and other measurement parameters.

Parameters

  [in] | handle | DSX instance handle
  [in] | fileName | Full path to the .dxs setup file

Returns
  DX_ERROR_CODE

Return values

  DSX_NO_ERROR | Success
  DSX_NULL_HANDLER | Invalid handle
  DSX_DCOM_NOT_CONNECTED | Not connected
  DSX_NET_SETUP_NOT_FOUND | Setup file not found (NET connection)

Note
  The setup file must be accessible by the Dewesoft application

dsconLoadSetup(instance, "C:\\Measurements\\MySetup.dxs");
dsconLoadSetup
DSREMOTECONNECT_API int dsconLoadSetup(DSXInstanceHandle handle, char *fileName)
Load a Dewesoft setup file.

## ◆ dsconSetAppWindowVisible()

DSREMOTECONNECT_API int dsconSetAppWindowVisible | ( | DSXInstanceHandle | handle,
|  | bool | visible )

Set Dewesoft application window visibility.

Shows or hides the Dewesoft application window.

Parameters

  [in] | handle | DSX instance handle
  [in] | visible | true to show window, false to hide

Returns
  DX_ERROR_CODE

Return values

  DSX_NO_ERROR | Success
  DSX_NULL_HANDLER | Invalid handle
  DSX_DCOM_NOT_CONNECTED | Not connected

## ◆ dsconSetBufferSize()

DSREMOTECONNECT_API int dsconSetBufferSize | ( | DSXInstanceHandle | handle,
|  | int | bufferSize )

Set buffer size for data acquisition.

Configures the internal buffer size used for data acquisition. Larger buffers can handle higher data rates but use more memory.

Parameters

  [in] | handle | DSX instance handle
  [in] | bufferSize | Buffer size in samples

Returns
  DX_ERROR_CODE

Return values

  DSX_NO_ERROR | Success
  DSX_NULL_HANDLER | Invalid handle

Note
  Call before starting measurement for best results

## ◆ dsconStartMeasurement()

DSREMOTECONNECT_API int dsconStartMeasurement | ( | DSXInstanceHandle | handle | ) |

Start measurement.

Begins data acquisition on all configured channels.

Parameters

  [in] | handle | DSX instance handle

Returns
  DX_ERROR_CODE

Return values

  DSX_NO_ERROR | Success
  DSX_NULL_HANDLER | Invalid handle
  DSX_DCOM_NOT_CONNECTED | Not connected
  DSX_NET_STARTACQ_FAILED | Failed to start acquisition (NET)

Note
  Ensure setup is loaded and channels are configured before starting

See also
  dsconStopMeasurement(), dsconLoadSetup()

## ◆ dsconStopMeasurement()

DSREMOTECONNECT_API int dsconStopMeasurement | ( | DSXInstanceHandle | handle | ) |

Stop measurement.

Stops the current measurement session.

Parameters

  [in] | handle | DSX instance handle

Returns
  DX_ERROR_CODE

Return values

  DSX_NO_ERROR | Success
  DSX_NULL_HANDLER | Invalid handle
  DSX_DCOM_NOT_CONNECTED | Not connected
  DSX_NET_STOPPING_ACQ_FAILED | Failed to stop acquisition (NET)

See also
  dsconStartMeasurement()

## Variable Documentation

## ◆ VER_DSREMOTE

const std::string VER_DSREMOTE = "1.1.3.24"

DSRemoteConnect library version string.

Definition at line 141 of file DSRemoteConnect_Documented.h.