diff options
Diffstat (limited to 'broccoli/includes')
-rw-r--r-- | broccoli/includes/broevent.h | 4 | ||||
-rw-r--r-- | broccoli/includes/fifoqueue.h | 18 | ||||
-rw-r--r-- | broccoli/includes/midbro.h | 6 | ||||
-rw-r--r-- | broccoli/includes/types.h | 37 |
4 files changed, 0 insertions, 65 deletions
diff --git a/broccoli/includes/broevent.h b/broccoli/includes/broevent.h deleted file mode 100644 index 5e34f5c..0000000 --- a/broccoli/includes/broevent.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef BROEVENT_H -#define BROEVENT_H -void * bro_event_listener(void * args); -#endif diff --git a/broccoli/includes/fifoqueue.h b/broccoli/includes/fifoqueue.h deleted file mode 100644 index 75b09c4..0000000 --- a/broccoli/includes/fifoqueue.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef FIFOQUEUE_H -#define FIFOQUEUE_H -#include "types.h" - -Fifo_q * init_queue(int size); - -Sensor_t * create_sensor_object(int value, int uid); - -boolean is_full(Fifo_q * q); - -boolean is_empty(Fifo_q * q); - -int add_to_queue(Fifo_q * q, Sensor_t * sensor); - -Sensor_t * pop_from_queue(Fifo_q * q); - -void print_queue(Fifo_q * q); -#endif diff --git a/broccoli/includes/midbro.h b/broccoli/includes/midbro.h deleted file mode 100644 index e7143a3..0000000 --- a/broccoli/includes/midbro.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef MIDBRO_H -#define MIDBRO_H -void start_data_capture(); -int request_value(); -void request_n_values(int n, int dest[]); -#endif diff --git a/broccoli/includes/types.h b/broccoli/includes/types.h deleted file mode 100644 index 149415e..0000000 --- a/broccoli/includes/types.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef TYPES_H -#define TYPES_H -#include <semaphore.h> - -#define true 1 -#define false 0 - -typedef int boolean; -typedef struct sensor_t Sensor_t; -typedef struct queue_t Queue_t; -typedef struct fifo_q Fifo_q; - -struct sensor_t{ - int uid; - int value; -}; - -struct queue_t{ - Sensor_t * sensor; - Queue_t * next; -}; - -struct fifo_q{ - Queue_t * head; - Queue_t * tail; - int maxSize; - int currentSize; - int droppedValues; - int largestBufferSize; - int valuesReceived; - int valuesReleased; - sem_t bufferEmptyBlock; - sem_t bufferFullBlock; - sem_t lock; -}; - -#endif |