• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef MATLAB_LOADLIBRARY
2 #define MATLAB_LOADLIBRARY
3 #include <iio.h>
4 
5 #ifndef __api
6 #define __api
7 #endif
8 
9 struct iio_scan_block;
10 
11 /** @brief Create a scan block
12 * @param backend A NULL-terminated string containing the backend to use for
13 * scanning. If NULL, all the available backends are used.
14 * @param flags Unused for now. Set to 0.
15 * @return on success, a pointer to a iio_scan_block structure
16 * @return On failure, NULL is returned and errno is set appropriately */
17 __api struct iio_scan_block * iio_create_scan_block(
18 		const char *backend, unsigned int flags);
19 
20 
21 /** @brief Destroy the given scan block
22 * @param ctx A pointer to an iio_scan_block structure
23 *
24 * <b>NOTE:</b> After that function, the iio_scan_block pointer shall be invalid. */
25 __api void iio_scan_block_destroy(struct iio_scan_block *blk);
26 
27 
28 /** @brief Enumerate available contexts via scan block
29 * @param blk A pointer to a iio_scan_block structure.
30 * @returns On success, the number of contexts found.
31 * @returns On failure, a negative error number.
32 */
33 __api ssize_t iio_scan_block_scan(struct iio_scan_block *blk);
34 
35 
36 /** @brief Get the iio_context_info for a particular context
37 * @param blk A pointer to an iio_scan_block structure
38 * @param index The index corresponding to the context.
39 * @return A pointer to the iio_context_info for the context
40 * @returns On success, a pointer to the specified iio_context_info
41 * @returns On failure, NULL is returned and errno is set appropriately
42 */
43 __api struct iio_context_info *iio_scan_block_get_info(
44 		struct iio_scan_block *blk, unsigned int index);
45 
46 #endif
47