liblabpro
Portable C library for data collection from Vernier LabPro devices
|
#include <stdbool.h>
#include <libusb-1.0/libusb.h>
Go to the source code of this file.
Data Structures | |
struct | LabPro_Context |
Thin wrapper around libusb_context. More... | |
struct | LabPro |
Struct representing a LabPro device. More... | |
struct | LabPro_List |
Struct acting as an array of LabPros. More... | |
struct | LabPro_Data_Session |
Struct representing a "data session" Data sessions are an abstraction over the LabPro's command-oriented data collection system. You create a data session for each channel (running LabPro_check_data_session() every time the user modifies a value), then you "stage" the data sessions with LabPro_stage_data_session(), then run a final check for conflicts with LabPro_check_sessions_for_conflicts() before submitting the sessions to the LabPro with LabPro_start_data_collection(). More... | |
Functions | |
int | LabPro_init (LabPro_Context *context) |
Initialize liblabpro. Currently just a wrapper around libusb_init(). More... | |
void | LabPro_exit (LabPro_Context *context) |
De-initialize liblabpro. More... | |
LabPro_List | LabPro_list_labpros (LabPro_Context *context) |
Obtain a list connected LabPro devices. More... | |
void | LabPro_close_labpro (LabPro *labpro) |
Close the LabPro. More... | |
int | LabPro_reset (LabPro *labpro, bool force) |
Send a reset command to the specified LabPro. More... | |
int | LabPro_check_data_session (LabPro_Data_Session *session, int **errors) |
Check a data session for problems before running it on the LabPro. More... | |
int | LabPro_send_raw (LabPro *labpro, char *command, int *length_transferred) |
Send a raw command to the LabPro. More... | |
int | LabPro_read_raw (LabPro *labpro, char **string, int *length) |
Read raw bytes from the LabPro. More... | |
int | LabPro_trim_response (char *string) |
Trim trailing junk that the LabPro sent Since the LabPro always returns data in multiples of 64 bytes, the last packet is likely to contain junk following the actual data. This replaces the trailing carriage return character with a NULL character. More... | |
void | LabPro_handle_device_disconnect (LabPro *labpro) |
void LabPro_handle_device_disconnect | ( | LabPro * | labpro | ) |
Definition at line 359 of file liblabpro.c.