|
DSRemoteConnect C++ Library 1.1.3.31
Remote connection library for Dewesoft measurement applications
|
#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 |
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, const char *fileName) |
| Load a Dewesoft setup file. | |
| DSREMOTECONNECT_API int | dsconSetAppWindowVisible (DSXInstanceHandle handle, bool visible) |
| Set Dewesoft application window visibility. | |
| DSREMOTECONNECT_API int | dsconSetAppWindowState (DSXInstanceHandle handle, int state) |
| Minimize, maximize or restore the Dewesoft application window. | |
| 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 | dsconCreateChannelInstanceByNameUtf8 (DSXInstanceHandle handle, const char *utf8Name, ChannelInstanceHandle *chInstance) |
| Create a channel instance by UTF-8 channel 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 | dsconChannelGetNameUtf8 (ChannelInstanceHandle channel, char *name, size_t len, size_t *required) |
| Get channel display name as UTF-8, with a safe buffer contract. | |
| 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 | dsconGetState (DSXInstanceHandle handle, int *state) |
| Get the current DewesoftX application state. | |
| DSREMOTECONNECT_API int | dsconStartMeasurement (DSXInstanceHandle handle) |
| Start measurement. | |
| DSREMOTECONNECT_API int | dsconStartStoring (DSXInstanceHandle handle, const char *utf8FileName) |
| Start storing to a named data file. | |
| DSREMOTECONNECT_API int | dsconStopStoring (DSXInstanceHandle handle) |
| Stop storing to the data file. | |
| DSREMOTECONNECT_API int | dsconStopStoringEx (DSXInstanceHandle handle, int *stateAfterStop) |
| Stop storing and report whether acquisition survived. | |
| 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.31" |
| DSRemoteConnect library version string. | |
| #define DSREMOTECONNECT_API __declspec(dllimport) |
Definition at line 125 of file DSRemoteConnect_Documented.h.
| typedef ChannelInstance* 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.
| typedef DSXInstance* 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.
| 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.
| [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) |
| DSX_NO_ERROR | Success |
| DSX_NULL_HANDLER | Invalid handle |
| DSREMOTECONNECT_API int dsconChannelGetName | ( | ChannelInstanceHandle | channel, |
| char * | name, | ||
| size_t | len ) |
Get channel display name.
Retrieves the human-readable name of the channel.
| [in] | channel | Channel instance handle |
| [out] | name | Buffer to store channel name |
| [in] | len | Buffer length |
| DSX_NO_ERROR | Success |
| DSX_NULL_HANDLER | Invalid handle |
| DSX_COUNT_OUT_OF_BOUNDS | Buffer too small |
| DSREMOTECONNECT_API int dsconChannelGetNameUtf8 | ( | ChannelInstanceHandle | channel, |
| char * | name, | ||
| size_t | len, | ||
| size_t * | required ) |
Get channel display name as UTF-8, with a safe buffer contract.
Retrieves the channel name as UTF-8 encoded bytes. Unlike dsconChannelGetName() this never overruns and never aborts: if the name does not fit it writes as much as will fit, truncating on a UTF-8 character boundary so the result is always valid UTF-8, and always NUL terminates.
Pass required to learn the buffer size the full name needs, including the terminator. That value is filled in even when the call returns DSX_COUNT_OUT_OF_BOUNDS, so a caller can size a buffer and retry, or query the size up front by passing name = NULL and len = 0.
| [in] | channel | Channel instance handle |
| [out] | name | Buffer to store the UTF-8 name; may be NULL to query the size |
| [in] | len | Buffer length in BYTES, not characters |
| [out] | required | Optional; receives the byte count needed including the NUL terminator. May be NULL. |
| DSX_NO_ERROR | Whole name was written |
| DSX_NULL_HANDLER | Invalid handle |
| DSX_DCOM_NOT_CONNECTED | Not connected |
| DSX_COUNT_OUT_OF_BOUNDS | Name was truncated; see required |
| 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.
| [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 |
| 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 |
| 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.
| [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 |
| 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 |
| 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.
| [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 |
| DSX_NO_ERROR | Success |
| DSX_NULL_HANDLER | Invalid handle |
| DSX_DCOM_NO_DATA | No data available |
| DSREMOTECONNECT_API int dsconChannelSetTransferred | ( | ChannelInstanceHandle | handle, |
| bool | transferred ) |
Set channel transfer state.
Enables or disables data transfer for the channel.
| [in] | handle | Channel instance handle |
| [in] | transferred | true to enable transfer, false to disable |
| DSX_NO_ERROR | Success |
| DSX_NULL_HANDLER | Invalid handle |
| DSREMOTECONNECT_API int dsconConnect | ( | DSXInstanceHandle | handle, |
| char * | connectionString ) |
Connect to a Dewesoft application.
Establishes connection to a Dewesoft application using the specified connection string.
| [in] | handle | DSX instance handle |
| [in] | connectionString | Connection-specific string:
|
| 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 |
| DSX_NET_INTERFACE_VERSION_NOT_SUPPORTED | DewesoftX reports a newer NET interface version (GETINTFVERSION) than this DLL supports; the session is closed |
| 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.
| [in] | handle | Channel instance handle (must be control channel) |
| [in] | data | Value to write to the control channel |
| DSX_NO_ERROR | Success |
| DSX_NULL_HANDLER | Invalid handle |
| DSX_CH_IS_NOT_CONTROL | Channel is not a control channel |
| 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.
| [in] | handle | DSX instance handle |
| [in] | id | Channel ID string |
| [out] | chInstance | Pointer to store created channel instance handle |
| 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 |
| 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.
| [in] | handle | DSX instance handle |
| [in] | chName | Channel display name |
| [out] | chInstance | Pointer to store created channel instance handle |
| 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 |
chInstance. Use dsconCreateChannelInstanceByNameUtf8().| DSREMOTECONNECT_API int dsconCreateChannelInstanceByNameUtf8 | ( | DSXInstanceHandle | handle, |
| const char * | utf8Name, | ||
| ChannelInstanceHandle * | chInstance ) |
Create a channel instance by UTF-8 channel name.
Creates a channel instance handle from the channel's display name, where the name is supplied as UTF-8 encoded bytes. Use this instead of dsconCreateChannelInstanceByName() for any name containing non-ASCII characters - degree signs, umlauts, accented or CJK characters.
The match is an exact byte comparison, so it is case sensitive and does not apply Unicode normalisation: pass the name exactly as dsconChannelGetName() reports it.
Connection type differences:
| [in] | handle | DSX instance handle |
| [in] | utf8Name | Channel display name, UTF-8 encoded, NUL terminated |
| [out] | chInstance | Pointer to store created channel instance handle; set to NULL when the channel is not found |
| DSX_NO_ERROR | Success |
| DSX_NULL_HANDLER | handle, utf8Name or chInstance is NULL |
| DSX_DCOM_NOT_CONNECTED | Not connected |
| DSX_DCOM_CHANNEL_ID_NOT_FOUND | No channel with that name |
| DSX_DCOM_UNKNOWN_ERROR | Lookup failed |
| 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.
| [out] | handle | Pointer to store the created instance handle |
| [in] | connectionType | Connection type (DSX_CONNECTION_TYPE_DCOM or DSX_CONNECTION_TYPE_NET) |
| DSX_NO_ERROR | Success |
| DSX_NULL_HANDLER | Invalid handle pointer |
| DSX_UNKNOWN_ERROR | Failed to create instance |
| 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().
| [in] | handle | DSX instance handle to destroy |
| DSX_NO_ERROR | Success |
| DSX_NULL_HANDLER | Invalid handle |
| DSREMOTECONNECT_API int dsconDisconnect | ( | DSXInstanceHandle | handle | ) |
Disconnect from Dewesoft application.
Closes the connection to the Dewesoft application while keeping the instance alive.
| [in] | handle | DSX instance handle |
| DSX_NO_ERROR | Success |
| DSX_NULL_HANDLER | Invalid handle |
| DSX_DCOM_NOT_CONNECTED | Not connected via DCOM |
| DSREMOTECONNECT_API int dsconEndRead | ( | DSXInstanceHandle | handle | ) |
End data reading session.
Finalizes the data reading session started with dsconBeginRead().
| [in] | handle | DSX instance handle |
| DSX_NO_ERROR | Success |
| DSX_NULL_HANDLER | Invalid handle |
| 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().
| [in] | handle | DSX instance handle |
| [out] | channelIdList | Pointer to store array of channel ID strings |
| [in,out] | count | Input: expected count, Output: actual count |
| DSX_NO_ERROR | Success |
| DSX_NULL_HANDLER | Invalid handle |
| DSX_DCOM_NOT_CONNECTED | Not connected |
| DSX_DCOM_NO_CHANNELS_TO_ENUMERATE | No channels available |
| DSREMOTECONNECT_API int dsconFreeChannelInstance | ( | ChannelInstanceHandle | chInstance | ) |
Free a channel instance.
Frees the memory and resources associated with a channel instance.
| [in] | chInstance | Channel instance handle to free |
| DSX_NO_ERROR | Success |
| DSX_NULL_HANDLER | Invalid handle |
| DSREMOTECONNECT_API int dsconFreeEnumerateChannels | ( | DSXInstanceHandle | handle, |
| ChannelIdList * | channelIdList ) |
Free memory allocated by channel enumeration.
Frees the memory allocated by dsconEnumerateChannels().
| [in] | handle | DSX instance handle |
| [in] | channelIdList | Channel ID list to free |
| DSX_NO_ERROR | Success |
| DSX_NULL_HANDLER | Invalid handle |
| 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.
| [in] | handle | DSX instance handle |
| [out] | count | Pointer to store channel count |
| DSX_NO_ERROR | Success |
| DSX_NULL_HANDLER | Invalid handle |
| DSX_DCOM_NOT_CONNECTED | Not connected |
| DSREMOTECONNECT_API int dsconGetChannelType | ( | ChannelInstanceHandle | handle, |
| int * | chType ) |
Get channel type.
Returns the channel type (async, sync, or single value).
| [in] | handle | Channel instance handle |
| [out] | chType | Pointer to store channel type (DSX_CH_TYPE) |
| DSX_NO_ERROR | Success |
| DSX_NULL_HANDLER | Invalid handle |
| 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").
| [in] | handle | Channel instance handle |
| [out] | resultUnit | Buffer to store unit string |
| [in] | len | Buffer length |
| DSX_NO_ERROR | Success |
| DSX_NULL_HANDLER | Invalid handle |
| DSX_COUNT_OUT_OF_BOUNDS | Buffer too small |
| DSREMOTECONNECT_API int dsconGetNextChannelId | ( | DSXInstanceHandle | handle, |
| ChannelID | id ) |
Get next channel ID in enumeration.
Retrieves the next channel ID in the enumeration sequence.
| [in] | handle | DSX instance handle |
| [out] | id | Buffer to store channel ID (must be pre-allocated) |
| DSX_NO_ERROR | Success - channel ID retrieved |
| DSX_END_OF_ENUM | No more channels |
| DSX_NULL_HANDLER | Invalid handle |
| 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.
| [in] | handle | DSX instance handle |
| [out] | size | Pointer to store required buffer size |
| DSX_NO_ERROR | Success |
| DSX_END_OF_ENUM | No more channels |
| DSX_NULL_HANDLER | Invalid handle |
| DSREMOTECONNECT_API int dsconGetSampleRate | ( | ChannelInstanceHandle | handle, |
| double * | sampleRate ) |
Get channel sample rate.
Returns the sample rate of the channel in Hz.
| [in] | handle | Channel instance handle |
| [out] | sampleRate | Pointer to store sample rate value |
| DSX_NO_ERROR | Success |
| DSX_NULL_HANDLER | Invalid handle |
| DSREMOTECONNECT_API int dsconGetState | ( | DSXInstanceHandle | handle, |
| int * | state ) |
Get the current DewesoftX application state.
Reports which screen DewesoftX is currently on: Channel setup, a running acquisition, an acquisition that has been stopped, or Analysis.
While acquisition runs and DewesoftX stores to a data file, the state is DSX_STATE_STORING instead of DSX_STATE_ACQUISITION. A running acquisition is therefore either of these two values. With a storing trigger, the state is DSX_STATE_STORING as soon as storing is armed, before data is written.
Connection type differences:
| [in] | handle | DSX instance handle |
| [out] | state | Pointer to store the state, a DSX_STATE value |
| DSX_NO_ERROR | Success |
| DSX_NULL_HANDLER | Invalid handle |
| DSX_DCOM_NOT_CONNECTED | Not connected |
| DSX_DCOM_UNKNOWN_ERROR | Failed to query the state |
| DSREMOTECONNECT_API int dsconGetVersion | ( | char * | version, |
| size_t | len ) |
Get the library version string.
| [out] | version | Buffer to store version string |
| [in] | len | Length of the buffer |
| DSX_NO_ERROR | Success |
| DSX_COUNT_OUT_OF_BOUNDS | Buffer too small |
| DSREMOTECONNECT_API int dsconInitChannelIdEnum | ( | DSXInstanceHandle | handle | ) |
Initialize channel ID enumeration iterator.
Initializes an iterator for sequential channel enumeration. Use with dsconGetNextChannelId() and dsconGetNextChannelIdSize().
| [in] | handle | DSX instance handle |
| DSX_NO_ERROR | Success |
| DSX_NULL_HANDLER | Invalid handle |
| 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.
| [in] | handle | Channel instance handle |
| [out] | result | Pointer to store result (true if control channel) |
| DSX_NO_ERROR | Success |
| DSX_NULL_HANDLER | Invalid handle |
| DSREMOTECONNECT_API int dsconIsInAqusition | ( | DSXInstanceHandle | handle, |
| bool * | value ) |
Check if measurement is active.
Determines whether a measurement is currently running.
| [in] | handle | DSX instance handle |
| [out] | value | Pointer to store result (true if measuring) |
| DSX_NO_ERROR | Success |
| DSX_NULL_HANDLER | Invalid handle |
| DSX_DCOM_NOT_CONNECTED | Not connected |
| DSREMOTECONNECT_API int dsconLoadSetup | ( | DSXInstanceHandle | handle, |
| const 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.
| [in] | handle | DSX instance handle |
| [in] | fileName | Path to the .dxs setup file, UTF-8 encoded. Text that is not valid UTF-8 is read in the system ANSI code page. |
| DSX_NO_ERROR | Success |
| DSX_NULL_HANDLER | Invalid handle |
| DSX_DCOM_NOT_CONNECTED | Not connected |
| DSX_DCOM_UNKNOWN_ERROR | DewesoftX could not load the file (DCOM), for example the file does not exist or acquisition is running |
| DSX_NET_SETUP_NOT_FOUND | Setup file not found (NET connection) |
| DSREMOTECONNECT_API int dsconSetAppWindowState | ( | DSXInstanceHandle | handle, |
| int | state ) |
Minimize, maximize or restore the Dewesoft application window.
| [in] | handle | DSX instance handle |
| [in] | state | A DSX_WINDOW_STATE value |
| DSX_NO_ERROR | Success |
| DSX_NULL_HANDLER | Invalid handle |
| DSX_DCOM_NOT_CONNECTED | Not connected |
| DSX_COUNT_OUT_OF_BOUNDS | state is not a DSX_WINDOW_STATE value |
| DSX_DCOM_UNKNOWN_ERROR | DewesoftX did not return its window handle |
| DSX_NET_COMMAND_NOT_SUPPORTED | Not available on a NET connection |
| DSREMOTECONNECT_API int dsconSetAppWindowVisible | ( | DSXInstanceHandle | handle, |
| bool | visible ) |
Set Dewesoft application window visibility.
Shows or hides the Dewesoft application window.
| [in] | handle | DSX instance handle |
| [in] | visible | true to show window, false to hide |
| DSX_NO_ERROR | Success |
| DSX_NULL_HANDLER | Invalid handle |
| DSX_DCOM_NOT_CONNECTED | Not connected |
| 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.
| [in] | handle | DSX instance handle |
| [in] | bufferSize | Buffer size in samples |
| DSX_NO_ERROR | Success |
| DSX_NULL_HANDLER | Invalid handle |
| DSREMOTECONNECT_API int dsconStartMeasurement | ( | DSXInstanceHandle | handle | ) |
Start measurement.
Begins data acquisition on all configured channels.
| [in] | handle | DSX instance handle |
| DSX_NO_ERROR | Success |
| DSX_NULL_HANDLER | Invalid handle |
| DSX_DCOM_NOT_CONNECTED | Not connected |
| DSX_NET_STARTACQ_FAILED | Failed to start acquisition (NET) |
| DSREMOTECONNECT_API int dsconStartStoring | ( | DSXInstanceHandle | handle, |
| const char * | utf8FileName ) |
Start storing to a named data file.
Starts storing measurement data to utf8FileName. DewesoftX starts acquisition itself if it is not already running, so this can be called either before or after dsconStartMeasurement().
A bare file name is resolved against DewesoftX's own data directory. Pass an empty string to let DewesoftX apply its configured file-name settings instead.
Connection type differences:
| [in] | handle | DSX instance handle |
| [in] | utf8FileName | Data file name, UTF-8 encoded, NUL terminated |
| DSX_NO_ERROR | Storing started |
| DSX_NULL_HANDLER | handle or utf8FileName is NULL |
| DSX_DCOM_NOT_CONNECTED | Not connected |
| DSX_START_STORING_FAILED | DewesoftX refused to start storing - it is in Analysis mode, already storing, out of disk space, could not start acquisition, or the name contained '|' |
| DSREMOTECONNECT_API int dsconStopMeasurement | ( | DSXInstanceHandle | handle | ) |
Stop measurement.
Stops the current measurement session.
| [in] | handle | DSX instance handle |
| 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) |
| DSREMOTECONNECT_API int dsconStopStoring | ( | DSXInstanceHandle | handle | ) |
Stop storing to the data file.
Closes the data file that dsconStartStoring() opened. Acquisition normally keeps running, so storing can be started again into a new file without restarting the measurement.
Connection type differences:
| [in] | handle | DSX instance handle |
| DSX_NO_ERROR | Storing stopped |
| DSX_NULL_HANDLER | Invalid handle |
| DSX_DCOM_NOT_CONNECTED | Not connected |
| DSX_STOP_STORING_FAILED | DewesoftX refused to stop storing - it is in Analysis mode, nothing was being stored, or cameras are active and acquisition must be stopped instead |
| DSREMOTECONNECT_API int dsconStopStoringEx | ( | DSXInstanceHandle | handle, |
| int * | stateAfterStop ) |
Stop storing and report whether acquisition survived.
Same as dsconStopStoring(), but additionally reports the state DewesoftX ended up in, so the caller can tell whether acquisition is still running or the measurement stopped outright.
This exists because DewesoftX, not the caller, decides that outcome. Its StopAcqAfterStopStore setting turns stop-storing into a full stop, and so do active cameras. Neither is exposed over DCOM or NET, so there is nothing to query or configure ahead of time - the state afterwards is the only reliable answer.
Interpret stateAfterStop as:
| [in] | handle | DSX instance handle |
| [out] | stateAfterStop | Optional; receives a DSX_STATE value sampled after the stop. May be NULL. Set even when the stop itself failed. |
| DSX_NO_ERROR | Storing stopped |
| DSX_NULL_HANDLER | Invalid handle |
| DSX_DCOM_NOT_CONNECTED | Not connected |
| DSX_STOP_STORING_FAILED | DewesoftX refused to stop storing |
| const std::string VER_DSREMOTE = "1.1.3.31" |
DSRemoteConnect library version string.
Definition at line 141 of file DSRemoteConnect_Documented.h.