54 #include <libusb-1.0/libusb.h> Have the LabPro store all the datapoints in RAM and wait for a "get" command to transfer them...
LabPro_Battery_Level
Battery levels reported by the LabPro.
Return distance, velocity, and acceleration in m, m/s, and m/(s^2), plus delta t. If used with non-re...
Used when e.g. resetting all channels at once.
The LabPro is currently collecting data.
LabPro_System_Status
LabPro system status.
The LabPro is waiting for a command.
Measure the signal frequency on a ±10 V signal. Channel 1 only.
unsigned int timeout
How long libusb waits before timing out on a transfer. Default is 5000.
unsigned short num
Number of available LabPros. Max is 5.
Return distance in meters and change in time since last measurement Fun fact: the manual states that ...
Higher-precision voltage measurement I assume this is just like the ±10 V measurement, but more precise due to the smaller range.
void LabPro_exit(LabPro_Context *context)
De-initialize liblabpro.
int LabPro_init(LabPro_Context *context)
Initialize liblabpro. Currently just a wrapper around libusb_init().
bool is_collecting_data
Whether data is currently being collected. This doesn't determine whether we should be sending comman...
void LabPro_handle_device_disconnect(LabPro *labpro)
libusb_device_handle * device_handle
Count signal transitions on a ±10 V signal. Channel 1 only.
LabPro_Sonic_Chan_Operations
Operations for sonic channels.
The LabPro is watching for a trigger condition to start collecting data.
Set data collection rate and time, etc.
The underlying libusb_device is not open.
Struct acting as an array of LabPros.
Clear RAM and reset the LabPro.
Get a single point of data outside of active data collection.
void LabPro_close_labpro(LabPro *labpro)
Close the LabPro.
Have the LabPro send datapoints as they're collected without storing them.
LabPro_Errors
Errors related to the "front-end" These errors are specific to use of the LabPro and are positive int...
LabPro_USB_Errors
Some errorcodes from libusb These are error codes that might be returned by LabPro_read_raw() or LabP...
LabPro_List LabPro_list_labpros(LabPro_Context *context)
Obtain a list connected LabPro devices.
Set up a manual conversion equation rather than one obtained by Auto-ID.
The LabPro is initializing.
bool is_busy
Whether there is a pending transfer request. Some commands do not return data so it's OK to send them...
LabPro_Channels
Channel ports on the LabPro interface.
Calculate d/dt and d^2/dt^2. Only allowed in non-real-time mode.
Return distance in meters, velocity in m/s, and delta t. If used with non-real-time mode sampling...
Range from -10 V to +10 V.
See LABPRO_DISTANCE_VELOCITY_ACCEL_AND_DT_METERS.
LabPro_Analog_Chan_Operations
Operations for analog channels.
Measure temperature (Fahrenheit) from the TI Temperature probe This is for measuring temperature in F...
The post-processing was set to a nonzero value on a realtime capture. This is not allowed...
The LabPro is waiting for a "get" command to fetch the collected data.
bool use_sonic_temp_compensation
The LabPro's self-test is running.
Measure temperature (Celsius) from the TI Temperature probe This is for measuring temperature in Cels...
The LabPro is transferring data, so we cannot send a command that requires a response from the LabPro...
int LabPro_trim_response(char *string)
Trim trailing junk that the LabPro sent Since the LabPro always returns data in multiples of 64 bytes...
Select channels and units for data collection.
int LabPro_reset(LabPro *labpro, bool force)
Send a reset command to the specified LabPro.
Calculate d/dt. Only allowed in non-real-time mode.
Measure the signal period on a ±10 V signal. Channel 1 only.
Presumably 0 Amps to 10 Amps.
liblabpro couldn't allocate memory.
Struct representing a LabPro device.
int LabPro_send_raw(LabPro *labpro, char *command, int *length_transferred)
Send a raw command to the LabPro.
Get a data point during non-realtime collection.
Measure light from the TI Light Sensor This is for the Texas Instruments light sensor. (I think) it causes the LabPro to return units of milliwatts per square centimeter, since that is what the CBL2 technical manual says its units are. However, it also states that this sensor Auto-IDs, so I'm not sure this is necessary.
LabPro_Analog_PostProc
Post-processing performed on analog data. As with data collection from sonic channels, please calculate the derivatives in your application rather than making the LabPro compute them. The extra computations will raise the temperature of the LabPro and make its readings less accurate.
Thin wrapper around libusb_context.
char * sonic_temp_compensation_equation
Set parameters for what data points will be returned.
unsigned char out_endpt_addr
The USB "out" endpoint address.
int LabPro_check_data_session(LabPro_Data_Session *session, int **errors)
Check a data session for problems before running it on the LabPro.
Return distance in feet and change in time since last measurement.
bool is_open
Whether the underlying USB device handle is open.
Auto-ID the sensor; units can be fetched from the sensor's description.
Struct representing a "data session" Data sessions are an abstraction over the LabPro's command-orien...
libusb_context * usb_link
bool is_fastmode_running
In FastMode (20µs between samples), we cannot send any commands or we will interrupt the sampling...
Set various settings for the LabPro itself.
See LABPRO_DISTANCE_VELOCITY_AND_DT_METERS.
LabPro_Sampling_Modes
Sampling modes.
char * onboard_conversion_equation
unsigned char in_endpt_addr
The USB "in" endpoint address.
The post-processing was set to a nonzero value for a sonic data capture. For sonic data like from mot...
int LabPro_read_raw(LabPro *labpro, char **string, int *length)
Read raw bytes from the LabPro.
Perform no post-processing. This is the only acceptable value in real-time mode.
LabPro_Commands
Commands that can be sent to the LabPro.