Adrian Mitevski / Mbed 2 deprecated mDot_LoRa_Sensornode

Dependencies:   mDot_LoRa_Sensornode_Flowmeter_impl mbed-rtos mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers TaskProximity.h Source File

TaskProximity.h

Go to the documentation of this file.
00001 /**
00002  * @file TaskProximity.h
00003  *
00004  * @author Adrian
00005  * @date 03.06.2016
00006  *
00007  */
00008 #include "SI1143.h "
00009 #include "SI1143ProximityMessage.h "
00010 #include "main.h"
00011 #include "Task.h"
00012 
00013 #ifndef TASKPROXIMITY_H_
00014 #define TASKPROXIMITY_H_
00015 
00016 /**
00017  * @class TaskProximity
00018  * @brief This TaskProximity Class handles the proximity measurement using the SI1143.
00019  * Starting the task using the start() starts the measurement.
00020  * It can be used alongside with other measurement Tasks inside the mbed::rtos
00021  * environment. The Task Class basically wraps mbeds Thread functionality.
00022  */
00023 class TaskProximity : public Task {
00024 public:
00025     TaskProximity(SI1143*,Mutex*,Queue<SI1143ProximityMessage,PROXIMITY_QUEUE_LENGHT>*);
00026     TaskProximity(SI1143*,Mutex*,Queue<SI1143ProximityMessage,PROXIMITY_QUEUE_LENGHT>*,
00027             osPriority, uint32_t, unsigned char*);
00028     virtual ~TaskProximity();
00029 
00030 private:
00031     rtos::Queue<SI1143ProximityMessage,PROXIMITY_QUEUE_LENGHT>* queue;
00032 
00033     SI1143* si1143;
00034 
00035     /**
00036      * @brief A thread safe method that acquires data from the gyroscope. After acquiring data from the
00037      * it stores the data inside a SI1143ProximityMessage
00038      */
00039     void measure();
00040 
00041     /**
00042      * @brief Sets the message Queue of the Task where the measured values will be stored
00043      * after the measurement
00044      * @param queueProximity the queue where the SI1143ProximityMessage will be stored
00045      */
00046     void setQueue(Queue<SI1143ProximityMessage,PROXIMITY_QUEUE_LENGHT>* queueProximity);
00047 
00048 };
00049 
00050 #endif /* TASKPROXIMITY_H_ */