Open Storm
Macros | Functions | Variables
autosampler.h File Reference

Declares functions for ISCO autosampler. More...

#include <project.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Include dependency graph for autosampler.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define AUTOSAMPLER_STATE_OFF   0
 
#define AUTOSAMPLER_STATE_IDLE   1
 
#define AUTOSAMPLER_STATE_BUSY   3
 
#define MAX_BOTTLE_COUNT   24
 
#define PULSE_COUNT   20
 

Functions

uint8 autosampler_start ()
 Starts the autosampler UART. More...
 
uint8 autosampler_stop ()
 Stops the autosampler UART. More...
 
uint8 autosampler_power_on ()
 Powers on the autosampler. More...
 
uint8 autosampler_power_off ()
 Powers off the autosampler. More...
 
uint8 autosampler_take_sample (uint8 *count)
 Takes a sample with the autosampler and writes current bottle count to count. More...
 
uint8 zip_autosampler (char *labels[], float readings[], uint8 *array_ix, int *autosampler_trigger, uint8 *bottle_count, uint8 max_size)
 Inserts current values of autosampler_trigger and bottle_count into labels and readings arrays. More...
 

Variables

uint8 autosampler_state
 
uint8 SampleCount
 

Detailed Description

Declares functions for ISCO autosampler.

Author
Brandon Wong and Matt Bartos
Version
TODO
Date
2017-06-19

Function Documentation

uint8 autosampler_power_off ( )

Powers off the autosampler.

Returns
1u on success

Here is the caller graph for this function:

uint8 autosampler_power_on ( )

Powers on the autosampler.

Returns
1u on success

Here is the caller graph for this function:

uint8 autosampler_start ( )

Starts the autosampler UART.

Returns
1u on success

Here is the caller graph for this function:

uint8 autosampler_stop ( )

Stops the autosampler UART.

Returns
1u on success

Here is the caller graph for this function:

uint8 autosampler_take_sample ( uint8 *  count)

Takes a sample with the autosampler and writes current bottle count to count.

Parameters
countThe current bottle count to be updated
Returns
1u on success

Here is the caller graph for this function:

uint8 zip_autosampler ( char *  labels[],
float  readings[],
uint8 *  array_ix,
int *  autosampler_trigger,
uint8 *  bottle_count,
uint8  max_size 
)

Inserts current values of autosampler_trigger and bottle_count into labels and readings arrays.

Parameters
labelsArray to store labels corresponding to each trigger result
readingsArray to store trigger results as floating point values
array_ixArray index to label and readings
autosampler_triggerCurrent value of autosampler trigger
bottle_countCurrent bottle count
max_sizeMaximum size of label and reading arrays (number of entries)
Returns
(*array_ix) + number of entries filled

Here is the call graph for this function:

Here is the caller graph for this function: