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

Loading...
Searching...
No Matches
DSRemoteConnect_Documented.h
Go to the documentation of this file.
1
120#pragma once
121
122#ifdef DSREMOTECONNECT_EXPORTS
123#define DSREMOTECONNECT_API __declspec(dllexport)
124#else
125#define DSREMOTECONNECT_API __declspec(dllimport)
126#endif
127
128#include "DSXInstance.h"
129#ifdef __clang__
130 #include "DSXNETInstance.h"
131#endif
132
133#ifndef __clang__
134 #include "DSXDCOMInstance.h"
135 #include "DSXNETInstance.h"
136#endif
137
141 const std::string VER_DSREMOTE = "1.1.3.24";
142
150 typedef DSXInstance* DSXInstanceHandle;
151
159 typedef ChannelInstance* ChannelInstanceHandle;
160
161// ============================================================================
162// @defgroup core_functions Core Instance Management
163// @brief Functions for creating, connecting, and managing DSX instances
164// @{
165// ============================================================================
166
182 extern "C" DSREMOTECONNECT_API int dsconGetVersion(char* version, size_t len);
183
201 extern "C" DSREMOTECONNECT_API int dsconCreateInstance(DSXInstanceHandle* handle, int connectionType);
202
223 extern "C" DSREMOTECONNECT_API int dsconConnect(DSXInstanceHandle handle, char* connectionString);
224
240 extern "C" DSREMOTECONNECT_API int dsconDestroyInstance(DSXInstanceHandle handle);
241
255 extern "C" DSREMOTECONNECT_API int dsconDisconnect(DSXInstanceHandle handle);
256
257 // end of core_functions group
258
259// ============================================================================
260// @defgroup setup_functions Setup and Configuration Management
261// @brief Functions for loading setups and configuring the measurement environment
262// @{
263// ============================================================================
264
285 extern "C" DSREMOTECONNECT_API int dsconLoadSetup(DSXInstanceHandle handle, char* fileName);
286
299 extern "C" DSREMOTECONNECT_API int dsconSetAppWindowVisible(DSXInstanceHandle handle, bool visible);
300
315 extern "C" DSREMOTECONNECT_API int dsconSetBufferSize(DSXInstanceHandle handle, int bufferSize);
316
317 // end of setup_functions group
318
319// ============================================================================
320// @defgroup channel_discovery Channel Discovery and Enumeration
321// @brief Functions for discovering and enumerating available measurement channels
322// @{
323// ============================================================================
324
339 extern "C" DSREMOTECONNECT_API int dsconGetChannelCount(DSXInstanceHandle handle, size_t* count);
340
369 extern "C" DSREMOTECONNECT_API int dsconEnumerateChannels(DSXInstanceHandle handle, ChannelIdList* channelIdList, size_t* count);
370
384 extern "C" DSREMOTECONNECT_API int dsconFreeEnumerateChannels(DSXInstanceHandle handle, ChannelIdList* channelIdList);
385
399 extern "C" DSREMOTECONNECT_API int dsconInitChannelIdEnum(DSXInstanceHandle handle);
400
417 extern "C" DSREMOTECONNECT_API int dsconGetNextChannelId(DSXInstanceHandle handle, ChannelID id);
418
433 extern "C" DSREMOTECONNECT_API int dsconGetNextChannelIdSize(DSXInstanceHandle handle, int* size);
434
435 // end of channel_discovery group
436
437// ============================================================================
438// @defgroup channel_management Channel Instance Management
439// @brief Functions for creating and managing channel instances
440// @{
441// ============================================================================
442
462 extern "C" DSREMOTECONNECT_API int dsconCreateChannelInstance(DSXInstanceHandle handle, ChannelID id, ChannelInstanceHandle* chInstance);
463
487 extern "C" DSREMOTECONNECT_API int dsconCreateChannelInstanceByName(DSXInstanceHandle handle, char* chName, ChannelInstanceHandle* chInstance);
488
501 extern "C" DSREMOTECONNECT_API int dsconFreeChannelInstance(ChannelInstanceHandle chInstance);
502
503 // end of channel_management group
504
505// ============================================================================
506// @defgroup channel_properties Channel Properties and Information
507// @brief Functions for querying channel properties and metadata
508// @{
509// ============================================================================
510
524 extern "C" DSREMOTECONNECT_API int dsconChannelGetName(ChannelInstanceHandle channel, char* name, size_t len);
525
537 extern "C" DSREMOTECONNECT_API int dsconGetSampleRate(ChannelInstanceHandle handle, double* sampleRate);
538
552 extern "C" DSREMOTECONNECT_API int dsconGetChannelType(ChannelInstanceHandle handle, int* chType);
553
567 extern "C" DSREMOTECONNECT_API int dsconIsChannelControl(ChannelInstanceHandle handle, bool* result);
568
582 extern "C" DSREMOTECONNECT_API int dsconGetChUnit(ChannelInstanceHandle handle, char* resultUnit, size_t len);
583
595 extern "C" DSREMOTECONNECT_API int dsconChannelSetTransferred(ChannelInstanceHandle handle, bool transferred);
596
597 // end of channel_properties group
598
599// ============================================================================
600// @defgroup measurement_control Measurement Control
601// @brief Functions for controlling measurement sessions
602// @{
603// ============================================================================
604
617 extern "C" DSREMOTECONNECT_API int dsconIsInAqusition(DSXInstanceHandle handle, bool* value);
618
635 extern "C" DSREMOTECONNECT_API int dsconStartMeasurement(DSXInstanceHandle handle);
636
651 extern "C" DSREMOTECONNECT_API int dsconStopMeasurement(DSXInstanceHandle handle);
652
653 // end of measurement_control group
654
655// ============================================================================
656// @defgroup data_acquisition Data Reading and Writing
657// @brief Functions for reading measurement data and writing control values
658// @{
659// ============================================================================
660
677 extern "C" DSREMOTECONNECT_API int dsconBeginRead(DSXInstanceHandle handle, double* startTime, double* endTime);
678
699 extern "C" DSREMOTECONNECT_API int dsconChannelReadScalarData(ChannelInstanceHandle handle, double** data, double** timestamps, size_t* count);
700
733 extern "C" DSREMOTECONNECT_API int dsconChannelReadScalarData_2(ChannelInstanceHandle handle, double* data, double* timestamps, size_t* count);
734
754 extern "C" DSREMOTECONNECT_API int dsconChannelReadScalarData_2abs(ChannelInstanceHandle handle, double* data, double* timestamps, size_t* count);
755
781 extern "C" DSREMOTECONNECT_API int dsconControlChannelWriteData(ChannelInstanceHandle handle, double data);
782
795 extern "C" DSREMOTECONNECT_API int dsconEndRead(DSXInstanceHandle handle);
796
797 // end of data_acquisition group
dsconChannelReadScalarData_2abs
DSREMOTECONNECT_API int dsconChannelReadScalarData_2abs(ChannelInstanceHandle handle, double *data, double *timestamps, size_t *count)
Read scalar data with absolute timestamps.
dsconGetSampleRate
DSREMOTECONNECT_API int dsconGetSampleRate(ChannelInstanceHandle handle, double *sampleRate)
Get channel sample rate.
dsconFreeChannelInstance
DSREMOTECONNECT_API int dsconFreeChannelInstance(ChannelInstanceHandle chInstance)
Free a channel instance.
dsconBeginRead
DSREMOTECONNECT_API int dsconBeginRead(DSXInstanceHandle handle, double *startTime, double *endTime)
Begin data reading session.
dsconDestroyInstance
DSREMOTECONNECT_API int dsconDestroyInstance(DSXInstanceHandle handle)
Destroy a DSX instance.
dsconLoadSetup
DSREMOTECONNECT_API int dsconLoadSetup(DSXInstanceHandle handle, char *fileName)
Load a Dewesoft setup file.
dsconChannelReadScalarData
DSREMOTECONNECT_API int dsconChannelReadScalarData(ChannelInstanceHandle handle, double **data, double **timestamps, size_t *count)
Read scalar data from channel (legacy version)
dsconEndRead
DSREMOTECONNECT_API int dsconEndRead(DSXInstanceHandle handle)
End data reading session.
DSXInstanceHandle
DSXInstance * DSXInstanceHandle
Handle to a DSX instance for connection management.
Definition DSRemoteConnect_Documented.h:150
dsconStopMeasurement
DSREMOTECONNECT_API int dsconStopMeasurement(DSXInstanceHandle handle)
Stop measurement.
dsconControlChannelWriteData
DSREMOTECONNECT_API int dsconControlChannelWriteData(ChannelInstanceHandle handle, double data)
Write data to control channel.
dsconChannelSetTransferred
DSREMOTECONNECT_API int dsconChannelSetTransferred(ChannelInstanceHandle handle, bool transferred)
Set channel transfer state.
dsconGetVersion
DSREMOTECONNECT_API int dsconGetVersion(char *version, size_t len)
Get the library version string.
dsconChannelGetName
DSREMOTECONNECT_API int dsconChannelGetName(ChannelInstanceHandle channel, char *name, size_t len)
Get channel display name.
dsconCreateChannelInstance
DSREMOTECONNECT_API int dsconCreateChannelInstance(DSXInstanceHandle handle, ChannelID id, ChannelInstanceHandle *chInstance)
Create a channel instance by ID.
dsconChannelReadScalarData_2
DSREMOTECONNECT_API int dsconChannelReadScalarData_2(ChannelInstanceHandle handle, double *data, double *timestamps, size_t *count)
Read scalar data from channel (recommended version)
dsconEnumerateChannels
DSREMOTECONNECT_API int dsconEnumerateChannels(DSXInstanceHandle handle, ChannelIdList *channelIdList, size_t *count)
Enumerate all available channels.
dsconGetChUnit
DSREMOTECONNECT_API int dsconGetChUnit(ChannelInstanceHandle handle, char *resultUnit, size_t len)
Get channel measurement unit.
ChannelInstanceHandle
ChannelInstance * ChannelInstanceHandle
Handle to a measurement channel instance.
Definition DSRemoteConnect_Documented.h:159
dsconGetNextChannelId
DSREMOTECONNECT_API int dsconGetNextChannelId(DSXInstanceHandle handle, ChannelID id)
Get next channel ID in enumeration.
dsconInitChannelIdEnum
DSREMOTECONNECT_API int dsconInitChannelIdEnum(DSXInstanceHandle handle)
Initialize channel ID enumeration iterator.
dsconFreeEnumerateChannels
DSREMOTECONNECT_API int dsconFreeEnumerateChannels(DSXInstanceHandle handle, ChannelIdList *channelIdList)
Free memory allocated by channel enumeration.
dsconCreateInstance
DSREMOTECONNECT_API int dsconCreateInstance(DSXInstanceHandle *handle, int connectionType)
Create a new DSX instance.
VER_DSREMOTE
const std::string VER_DSREMOTE
DSRemoteConnect library version string.
Definition DSRemoteConnect_Documented.h:141
dsconStartMeasurement
DSREMOTECONNECT_API int dsconStartMeasurement(DSXInstanceHandle handle)
Start measurement.
dsconDisconnect
DSREMOTECONNECT_API int dsconDisconnect(DSXInstanceHandle handle)
Disconnect from Dewesoft application.
dsconIsInAqusition
DSREMOTECONNECT_API int dsconIsInAqusition(DSXInstanceHandle handle, bool *value)
Check if measurement is active.
dsconSetAppWindowVisible
DSREMOTECONNECT_API int dsconSetAppWindowVisible(DSXInstanceHandle handle, bool visible)
Set Dewesoft application window visibility.
dsconGetChannelCount
DSREMOTECONNECT_API int dsconGetChannelCount(DSXInstanceHandle handle, size_t *count)
Get the total number of available channels.
dsconCreateChannelInstanceByName
DSREMOTECONNECT_API int dsconCreateChannelInstanceByName(DSXInstanceHandle handle, char *chName, ChannelInstanceHandle *chInstance)
Create a channel instance by name.
dsconSetBufferSize
DSREMOTECONNECT_API int dsconSetBufferSize(DSXInstanceHandle handle, int bufferSize)
Set buffer size for data acquisition.
dsconGetNextChannelIdSize
DSREMOTECONNECT_API int dsconGetNextChannelIdSize(DSXInstanceHandle handle, int *size)
Get size of next channel ID.
dsconConnect
DSREMOTECONNECT_API int dsconConnect(DSXInstanceHandle handle, char *connectionString)
Connect to a Dewesoft application.
dsconIsChannelControl
DSREMOTECONNECT_API int dsconIsChannelControl(ChannelInstanceHandle handle, bool *result)
Check if channel is a control channel.
dsconGetChannelType
DSREMOTECONNECT_API int dsconGetChannelType(ChannelInstanceHandle handle, int *chType)
Get channel type.
DSREMOTECONNECT_API
#define DSREMOTECONNECT_API
Definition DSRemoteConnect_Documented.h:125