Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of ELEC351_Group_T by
DATA.hpp@38:8d86e0d8a816, 2018-01-07 (annotated)
- Committer:
- thomasmorris
- Date:
- Sun Jan 07 21:08:34 2018 +0000
- Revision:
- 38:8d86e0d8a816
- Parent:
- 15:c1592fc1a501
- Child:
- 51:47f5db68500b
FIFO work in progress
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| thomasmorris | 8:0e4481b64353 | 1 | #ifndef _DATA_HPP_ |
| thomasmorris | 8:0e4481b64353 | 2 | #define _DATA_HPP_ |
| thomasmorris | 8:0e4481b64353 | 3 | |
| thomasmorris | 8:0e4481b64353 | 4 | class DATA |
| thomasmorris | 8:0e4481b64353 | 5 | { |
| thomasmorris | 8:0e4481b64353 | 6 | |
| thomasmorris | 8:0e4481b64353 | 7 | public: |
| thomasmorris | 8:0e4481b64353 | 8 | |
| thomasmorris | 8:0e4481b64353 | 9 | DATA(); |
| thomasmorris | 8:0e4481b64353 | 10 | |
| thomasmorris | 8:0e4481b64353 | 11 | //Setters |
| chills | 15:c1592fc1a501 | 12 | void set_time(int time); |
| chills | 10:46946784326d | 13 | void set_temperature(double temp); |
| chills | 10:46946784326d | 14 | void set_pressure(double pressure); |
| chills | 10:46946784326d | 15 | void set_light(double light); |
| thomasmorris | 38:8d86e0d8a816 | 16 | void set_all_zero(); |
| thomasmorris | 8:0e4481b64353 | 17 | //Getters |
| chills | 15:c1592fc1a501 | 18 | int get_time(); |
| chills | 10:46946784326d | 19 | double get_temperature(); |
| chills | 10:46946784326d | 20 | double get_pressure(); |
| chills | 10:46946784326d | 21 | double get_light(); |
| thomasmorris | 8:0e4481b64353 | 22 | |
| thomasmorris | 8:0e4481b64353 | 23 | private: |
| thomasmorris | 8:0e4481b64353 | 24 | //Private member variables |
| chills | 15:c1592fc1a501 | 25 | int _Time; |
| chills | 10:46946784326d | 26 | double _Temperature; |
| chills | 10:46946784326d | 27 | double _Pressure; |
| chills | 10:46946784326d | 28 | double _Light; |
| thomasmorris | 8:0e4481b64353 | 29 | }; |
| thomasmorris | 8:0e4481b64353 | 30 | |
| thomasmorris | 8:0e4481b64353 | 31 | |
| thomasmorris | 8:0e4481b64353 | 32 | #endif |
