Tamas Titusz Ban
/
ELEC1620_ExamTemplate_2019
Template for the ELEC1620 End of year exam
StreamOut/Message.h@0:54721f063ac8, 2019-03-22 (annotated)
- Committer:
- el16ttb
- Date:
- Fri Mar 22 13:11:07 2019 +0000
- Revision:
- 0:54721f063ac8
Initial commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
el16ttb | 0:54721f063ac8 | 1 | #ifndef LIB_MESSAGE_H_ |
el16ttb | 0:54721f063ac8 | 2 | #define LIB_MESSAGE_H_ |
el16ttb | 0:54721f063ac8 | 3 | |
el16ttb | 0:54721f063ac8 | 4 | #include <mbed.h> |
el16ttb | 0:54721f063ac8 | 5 | |
el16ttb | 0:54721f063ac8 | 6 | class Message{ |
el16ttb | 0:54721f063ac8 | 7 | public: |
el16ttb | 0:54721f063ac8 | 8 | Message(char code, unsigned int data); |
el16ttb | 0:54721f063ac8 | 9 | Message(); |
el16ttb | 0:54721f063ac8 | 10 | ~Message(); |
el16ttb | 0:54721f063ac8 | 11 | void set(char code, unsigned int data); |
el16ttb | 0:54721f063ac8 | 12 | char get_code(); |
el16ttb | 0:54721f063ac8 | 13 | unsigned int get_data(); |
el16ttb | 0:54721f063ac8 | 14 | private: |
el16ttb | 0:54721f063ac8 | 15 | char _code; |
el16ttb | 0:54721f063ac8 | 16 | unsigned int _data; |
el16ttb | 0:54721f063ac8 | 17 | }; |
el16ttb | 0:54721f063ac8 | 18 | |
el16ttb | 0:54721f063ac8 | 19 | #endif |
el16ttb | 0:54721f063ac8 | 20 |