From d12ef314dfcd9bafd370669fc47e5ee443767b28 Mon Sep 17 00:00:00 2001 From: Robert Gustafsson Date: Sat, 14 Oct 2017 11:18:03 +0200 Subject: Rename midbropasad -> midbro in C impl.. * files in script/ are not changed --- broccoli/src/midbropasad.c | 47 ---------------------------------------------- 1 file changed, 47 deletions(-) delete mode 100644 broccoli/src/midbropasad.c (limited to 'broccoli/src/midbropasad.c') diff --git a/broccoli/src/midbropasad.c b/broccoli/src/midbropasad.c deleted file mode 100644 index a745091..0000000 --- a/broccoli/src/midbropasad.c +++ /dev/null @@ -1,47 +0,0 @@ -#include -#include -#include "fifoqueue.h" -#include "broevent.h" -#ifdef BROCCOLI -#include -#endif - -Fifo_q * queue; - - void -request_n_values(int number, int arrayOfValues[]) -{ - int i; - Sensor_t * sensor; - for(i=0; ivalue; - free(sensor); - } - printf("Release %d sensor data values\n", number); -} - int -request_value() -{ - int value; - Sensor_t * sensor; - sensor = pop_from_queue(queue); - value = sensor->value; - free(sensor); - printf("Release 1 sensor data value\n"); - return value; -} - - void -start_data_capture() -{ - int res; - queue = init_queue(500000); /* Initiate queue with fixed size */ - pthread_t event_listener; - /* Create producer thread that listen for bro events */ - res = pthread_create(&event_listener, NULL, bro_event_listener, queue); - if(res){ - perror("Unable to create thread"); - exit(-1); - } -} -- cgit v1.2.3