NMX_Sampling_ReadRow32_1

<< Click to Display Table of Contents >>

Navigation:  NmxDLL Reference Guide > API (programming interface) > Sampling LowLevel (Time-Triggered Realtime Measurement) >

NMX_Sampling_ReadRow32_1

Read sampled values row-wise. Row-wise means, that all sampling elements of a single sampling point are read-out. Each time this function is called, the oldest sample data is read-out and deleted afterwards.

See also the HowTo-Guide.

 

Definition


NMX_STATUS NMX_Sampling_ReadRow32_1(

 NMX_PHANDLE pHandle,

 signed long aslSamples[],

 unsigned long ulMaxSamples,

 unsigned long* pulSamplesCopied,

 unsigned long long* pudSampleNo);

 

Parameter


pHandle

Connection Handle.

aslSamples

The measurement samples will be written into this array. For simplicity, all sampled values are provided with data type signed long. See chapter "data types" for more information.

ulMaxSamples

Maximum number of samples to read-out. This value must be ≤ the total number of elements of aslSamples.
Example: aslSamples is defined as "signed long aslSamples[64]". Then ulMaxSamples must be ≤ 64.

pulSamplesCopied

Number of samples copied into aslSamples. This value will be ≤ ulMaxSamples.

pudSampleNo

Number of the this sample, counted from the beginning of sampling, starting at 0.
Example:
The 1. time after the start of sampling, this function is called, pudSampleNo = 0 will be returned.
The 2. time this function is called, pudSampleNo = 1 will be returned.
The 3. time this function is called, pudSampleNo = 2 will be returned.

 

Typical function call (C example)


Assuming aslSamples is defined as: signed long aslSamples[64];

NMX_Sampling_ReadRow32_1(pHandle, aslSamples, 64, &ulSamplesCopied, &udNoSample);

 

.Net DLL specific implementation


NMX_MSTATUS Sampling_ReadRow32_1(

                 System::IntPtr pHandle,

                 array<System::Int32>^aslSamples,

                 System::UInt32 %pulSamplesCopied,

                 System::UInt64 %pudSampleNo);

 

The array aslSamples will not be resized within the function call for performance reasons. This means it should be large enough to store all the data.

If for example 23 sampling elements have been assigned with NMX_Sampling_Add..., the the minimum array size should be 23.
If it is smaller, it won't crash but not all data will be available to your application.

 

Comments


It is possible to get informed about new data by the notification NMXNOTIFY_SAMPLING_NEW_DATA.

Using NMX_Sampling_ReadRow32_1 it is not possible, reading the same data twice.