Pacemaker code Implementation for SFWRENG 3K04
Dependencies: FXOS8700Q Queue mbed-rtos mbed
Fork of Pacemaker by
dataStruct.h@16:08d5e5a3ee74, 2016-11-17 (annotated)
- Committer:
- noahzwiep
- Date:
- Thu Nov 17 04:03:25 2016 +0000
- Revision:
- 16:08d5e5a3ee74
- Child:
- 30:0cb4890910cd
- Made change to hardware class that provides sensing pin; - Made dataStruct class in which there is multiple threading for grabbing queue data; - Made queue in datastruct to allow storage of data
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
noahzwiep | 16:08d5e5a3ee74 | 1 | #pragma once |
noahzwiep | 16:08d5e5a3ee74 | 2 | #include "mbed.h" |
noahzwiep | 16:08d5e5a3ee74 | 3 | #include "hardware.h" |
noahzwiep | 16:08d5e5a3ee74 | 4 | #include "rtos.h" |
noahzwiep | 16:08d5e5a3ee74 | 5 | #include "queue.h" |
noahzwiep | 16:08d5e5a3ee74 | 6 | |
noahzwiep | 16:08d5e5a3ee74 | 7 | #define START_THREAD 1 |
noahzwiep | 16:08d5e5a3ee74 | 8 | |
noahzwiep | 16:08d5e5a3ee74 | 9 | class dataStruct{ |
noahzwiep | 16:08d5e5a3ee74 | 10 | public: |
noahzwiep | 16:08d5e5a3ee74 | 11 | dataStruct(hardware*); |
noahzwiep | 16:08d5e5a3ee74 | 12 | ~dataStruct(); |
noahzwiep | 16:08d5e5a3ee74 | 13 | queue getData(); |
noahzwiep | 16:08d5e5a3ee74 | 14 | |
noahzwiep | 16:08d5e5a3ee74 | 15 | private: |
noahzwiep | 16:08d5e5a3ee74 | 16 | static const int N = 13; |
noahzwiep | 16:08d5e5a3ee74 | 17 | double k_streamPeriod; |
noahzwiep | 16:08d5e5a3ee74 | 18 | hardware* myHardware; |
noahzwiep | 16:08d5e5a3ee74 | 19 | double streamValue; |
noahzwiep | 16:08d5e5a3ee74 | 20 | queue myQueue; |
noahzwiep | 16:08d5e5a3ee74 | 21 | static void threadStarter(void const *p); |
noahzwiep | 16:08d5e5a3ee74 | 22 | void storeData(); |
noahzwiep | 16:08d5e5a3ee74 | 23 | Thread thread; |
noahzwiep | 16:08d5e5a3ee74 | 24 | |
noahzwiep | 16:08d5e5a3ee74 | 25 | }; |