nScopeAPI
v0.8
|
contains function headers for making requests to nScope More...
Functions | |
NSCOPE_API ErrorType | nScope_request_data (ScopeHandle nScope, Request *newRequest_p, int numSamples, bool antiAliased) |
Request data from nScope. More... | |
NSCOPE_API ErrorType | nScope_request_data_stream (ScopeHandle nScope, Request *newRequest_p) |
Request an infinite stream of data from nScope. More... | |
NSCOPE_API ErrorType | nScope_stop_request (ScopeHandle nScope, Request reqHandle) |
stop a request that is in progress More... | |
NSCOPE_API ErrorType | nScope_release_request (ScopeHandle nScope, Request *reqHandle_p) |
release a request that is finished or stopped More... | |
NSCOPE_API ErrorType | nScope_wait_for_request_finish (ScopeHandle nScope, Request reqHandle) |
wait for a request to finish More... | |
NSCOPE_API ErrorType | nScope_request_xfer_has_completed (ScopeHandle nScope, Request reqHandle, bool *hasCompleted) |
determine if a request has completed the transfer More... | |
NSCOPE_API ErrorType | nScope_request_xfer_samples_remaining (ScopeHandle nScope, Request reqHandle) |
query the number of samples remaining in the request transfer More... | |
NSCOPE_API ErrorType | nScope_stop_data_stream (ScopeHandle nScope, Request reqHandle) |
Stop an infinite stream of data from nScope. More... | |
NSCOPE_API ErrorType | nScope_read_data (ScopeHandle nScope, Request reqHandle, int channel, double *data) |
Read data from the request. More... | |
NSCOPE_API ErrorType | nScope_request_has_data (ScopeHandle nScope, Request reqHandle, bool *hasData) |
determine if a request has unread data still stored in it More... | |
contains function headers for making requests to nScope
NSCOPE_API ErrorType nScope_read_data | ( | ScopeHandle | nScope, |
Request | reqHandle, | ||
int | channel, | ||
double * | data | ||
) |
Read data from the request.
reads data from a specific channel on a request, and stores the result in data
[in] | nScope | ScopeHandle object |
[in] | reqHandle | Request object to query |
[in] | channel | channel to read |
[out] | data | pointer to double to store the read value on the request |
NSCOPE_API ErrorType nScope_release_request | ( | ScopeHandle | nScope, |
Request * | reqHandle_p | ||
) |
release a request that is finished or stopped
Frees the memory for the request.
To prevent memory leaks, the developer must call this function after the request has finished an all data has been read.
On success, the Request handle will be a null pointer
[in] | nScope | ScopeHandle object |
[out] | reqHandle_p | pointer to Request object to release |
NSCOPE_API ErrorType nScope_request_data | ( | ScopeHandle | nScope, |
Request * | newRequest_p, | ||
int | numSamples, | ||
bool | antiAliased | ||
) |
Request data from nScope.
Creates a request for data from nScope. Anti-aliasing algorithm is used for nScope GUI, not recommended for data acquisition
[in] | nScope | ScopeHandle object |
[out] | newRequest_p | pointer to a Request object to store the request handle |
[in] | numSamples | number of data samples (per channel) to request |
[in] | antiAliased | true: turn on anti-aliasing, false: turn it off. |
NSCOPE_API ErrorType nScope_request_data_stream | ( | ScopeHandle | nScope, |
Request * | newRequest_p | ||
) |
Request an infinite stream of data from nScope.
NSCOPE_API ErrorType nScope_request_has_data | ( | ScopeHandle | nScope, |
Request | reqHandle, | ||
bool * | hasData | ||
) |
determine if a request has unread data still stored in it
Queries a request to see if there is still data to be read, stores the result in hasData
[in] | nScope | ScopeHandle object |
[in] | reqHandle | Request object to query |
[out] | hasData | pointer to bool to store the result of the query |
NSCOPE_API ErrorType nScope_request_xfer_has_completed | ( | ScopeHandle | nScope, |
Request | reqHandle, | ||
bool * | hasCompleted | ||
) |
determine if a request has completed the transfer
Queries a request to see if the data has finished transferring, stores the result in hasCompleted
[in] | nScope | ScopeHandle object |
[in] | reqHandle | Request object to query |
[out] | hasCompleted | pointer to bool to store the result of the query |
NSCOPE_API ErrorType nScope_request_xfer_samples_remaining | ( | ScopeHandle | nScope, |
Request | reqHandle | ||
) |
query the number of samples remaining in the request transfer
NSCOPE_API ErrorType nScope_stop_data_stream | ( | ScopeHandle | nScope, |
Request | reqHandle | ||
) |
Stop an infinite stream of data from nScope.
NSCOPE_API ErrorType nScope_stop_request | ( | ScopeHandle | nScope, |
Request | reqHandle | ||
) |
stop a request that is in progress
interrupts a current request from completing
[in] | nScope | ScopeHandle object |
[in] | reqHandle | Request object to stop |
NSCOPE_API ErrorType nScope_wait_for_request_finish | ( | ScopeHandle | nScope, |
Request | reqHandle | ||
) |
wait for a request to finish
Blocks program execution until a request has finished transferring data from nScope
[in] | nScope | ScopeHandle object |
[in] | reqHandle | Request object on which to wait |