Skip to content

NI DAQMX Array Size Parameters

Greg Stoll edited this page Sep 20, 2021 · 1 revision

Array Size Parameters

Many functions in the C API that take in arrays also take in the array size. For example, the C prototype of DAQmxCfgAnlgMultiEdgeStartTrig is :

int32 DAQmxCfgAnlgMultiEdgeStartTrig (TaskHandle taskHandle, const char triggerSources[], int32 triggerSlopeArray[], float64 triggerLevelArray[], uInt32 arraySize);

Here arraySize is just the size of the triggerSlopeArray and triggerLevelArray parameters.

In the gRPC API, the arraySize parameter is not present; the gRPC layer automatically determines the correct value to pass in.

This is also true for most output arrays. For example, the C prototype of DAQmxGetErrorString is:

int32 DAQmxGetErrorString (int32 errorCode, char errorString[], uInt32 bufferSize);

When calling this in C, the convention is to pass in 0 for the bufferSize, and the return value is the required size of the errorString array. Then the caller needs to allocate an array of that size and pass that in in a second call.

In the gRPC API, the gRPC layer will automatically determine the size of most output arrays, so the bufferSize parameter is not present.

Table of Contents

Internal Development

Creating and Setting Up a gRPC Server

Server Security Support

Creating a gRPC Client

gRPC Client Examples

Session Utilities API Reference

Driver Documentation

gRPC API Differences From C API

Sharing Driver Sessions Between Clients

C API Docs
NI-DAQmx
NI-DCPOWER
NI-DIGITAL PATTERN DRIVER
NI-DMM
NI-FGEN
NI-FPGA
NI-RFmx Bluetooth
NI-RFmx NR
NI-RFmx WCDMA
NI-RFmx GSM
NI-RFmx CDMA2k
NI-RFmx Instr
NI-RFmx LTE
NI-RFmx SpecAn
NI-RFmx TD-SCDMA
NI-RFmx WLAN
NI-RFSA
NI-RFSG
NI-SCOPE
NI-SWITCH
NI-TCLK
NI-XNET
Clone this wiki locally