BALTECH SDK wrapper functions reference

§ brp_ioiter_next()

BRP_LIB brp_errcode brp_ioiter_next ( brp_ioiter  iter,
brp_protocol protocol 
)

Retrieves the next device from the iterator.

Each call advances the iterator and creates a new brp_protocol for the next available device. The caller is responsible for destroying each protocol using brp_destroy() when done.

The protocol's id field contains the device serial number, and the friendly_name field contains the product name (accessible via brp_get_friendly_name()).

Parameters
iterIterator handle created by brp_ioiter_create()
protocolOutput parameter for the protocol handle. Set to NULL when no more devices are available.
Returns
BRP_OK on success (check protocol for NULL to detect end), BRP_ERR_INVALID_API_CALL if iter is NULL, BRP_ERR_OUT_OF_MEMORY on allocation failure