<< Click to Display Table of Contents >> Navigation: NmxDLL Reference Guide > API (programming interface) > Sampling LowLevel (Time-Triggered Realtime Measurement) > NMX_Sampling_GetStatus_1 |
This function is used to read the current sampling status.
See also the HowTo-Guide.
Definition
NMX_STATUS NMX_Sampling_GetStatus_1(
NMX_PHANDLE pHandle,
unsigned char* pucStatus,
unsigned long* pulNSamplingElements,
unsigned long long* pudSamplesReceived,
unsigned long long* pudMaxSamples);
Parameter
pHandle
pucStatus
Current sampling status. See definition below.
pulNSamplingElements
Number of sampling elements used.
pudSamplesReceived
Provide the number of samples, which have been received by the DLL from the device.
pudMaxSamples
Provide the maximum number of samples, that will be recorded.
If you started endless sampling, this value will be 0xFFFFFFFFFFFFFFFF = 18446744073709551615.
Typical function call (C example)
Assuming aslSamples is defined as: signed long aslSamples[64];
NMX_Sampling_ReadRow32_1(pHandle, aslSamples, 64, &ulSamplesCopied, &udNoSample);
Sampling Status
The sampling status is defined as follows:
Status |
Hex value |
Description |
---|---|---|
EMS_INACTIVE |
0x00 |
No sampling active. |
EMS_PREPARED |
0x01 |
Sampling has been prepared, but not yet started. |
EMS_ACTIVE |
0x02 |
Sampling is active. |
EMS_DATA_TRANSFER |
0x03 |
Sampling has ended or has been stopped, but data transfer is still active. |
EMS_FINISHED |
0x04 |
Sampling is finished. |
EMS_ERROR_CONFIG |
0xF0 |
Error during configuration / preparation of sampling. |
EMS_ERROR_START |
0xF1 |
Error during start of sampling. |
EMS_ERROR_NOTPREP |
0xF2 |
Error: start not possible, sampling has not been prepared. |
EMS_ERROR_RUN |
0xF8 |
Error occurred while sampling was active. |
By definition, all values > 0xF0 are error states.
.Net DLL specific implementation
NMX_MSTATUS Sampling_GetStatus_1(
System::IntPtr pHandle,
System::Byte %pucStatus,
System::UInt32 %pulNSamplingElements,
System::UInt64 %pudSamplesReceived,
System::UInt64 %pudMaxSamples);
Comments
It is possible to get informed about various sampling events via notfications.