liblabpro
Portable C library for data collection from Vernier LabPro devices

Struct representing a LabPro device. More...

#include <liblabpro.h>

Data Fields

libusb_device_handle * device_handle
 
bool is_open
 Whether the underlying USB device handle is open. More...
 
bool is_busy
 Whether there is a pending transfer request. Some commands do not return data so it's OK to send them even if another thread is collecting data. Others require waiting. More...
 
bool is_fastmode_running
 In FastMode (20µs between samples), we cannot send any commands or we will interrupt the sampling. This shouldn't cause any problems because FastMode can only run for a fraction of a second before LabPro's RAM is filled up. More...
 
bool is_collecting_data
 Whether data is currently being collected. This doesn't determine whether we should be sending commands, but allows sanity checks on e.g. LabPro_reset(). More...
 
unsigned char in_endpt_addr
 The USB "in" endpoint address. More...
 
unsigned char out_endpt_addr
 The USB "out" endpoint address. More...
 
unsigned int timeout
 How long libusb waits before timing out on a transfer. Default is 5000. More...
 
char software_id [7]
 Current firmware version From the LabPro Technical Reference Manual, the format is X.MMmms (Product Code.Major.Minor.Step) More...
 
int errorcode
 
enum LabPro_Battery_Level battery_level
 

Detailed Description

Struct representing a LabPro device.

Definition at line 317 of file liblabpro.h.

Field Documentation

◆ battery_level

enum LabPro_Battery_Level LabPro::battery_level

Definition at line 358 of file liblabpro.h.

◆ device_handle

libusb_device_handle* LabPro::device_handle

Definition at line 318 of file liblabpro.h.

◆ errorcode

int LabPro::errorcode

Definition at line 357 of file liblabpro.h.

◆ in_endpt_addr

unsigned char LabPro::in_endpt_addr

The USB "in" endpoint address.

Definition at line 344 of file liblabpro.h.

◆ is_busy

bool LabPro::is_busy

Whether there is a pending transfer request. Some commands do not return data so it's OK to send them even if another thread is collecting data. Others require waiting.

Definition at line 328 of file liblabpro.h.

◆ is_collecting_data

bool LabPro::is_collecting_data

Whether data is currently being collected. This doesn't determine whether we should be sending commands, but allows sanity checks on e.g. LabPro_reset().

Definition at line 341 of file liblabpro.h.

◆ is_fastmode_running

bool LabPro::is_fastmode_running

In FastMode (20µs between samples), we cannot send any commands or we will interrupt the sampling. This shouldn't cause any problems because FastMode can only run for a fraction of a second before LabPro's RAM is filled up.

Definition at line 335 of file liblabpro.h.

◆ is_open

bool LabPro::is_open

Whether the underlying USB device handle is open.

Definition at line 321 of file liblabpro.h.

◆ out_endpt_addr

unsigned char LabPro::out_endpt_addr

The USB "out" endpoint address.

Definition at line 347 of file liblabpro.h.

◆ software_id

char LabPro::software_id[7]

Current firmware version From the LabPro Technical Reference Manual, the format is X.MMmms (Product Code.Major.Minor.Step)

Definition at line 356 of file liblabpro.h.

◆ timeout

unsigned int LabPro::timeout

How long libusb waits before timing out on a transfer. Default is 5000.

Definition at line 350 of file liblabpro.h.


The documentation for this struct was generated from the following file: