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.
Node/Node.h@0:99928431bb44, 2015-07-07 (annotated)
- Committer:
- millanea
- Date:
- Tue Jul 07 09:36:12 2015 +0000
- Revision:
- 0:99928431bb44
First commit. Committing the entire project such that it can be published.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| millanea | 0:99928431bb44 | 1 | |
| millanea | 0:99928431bb44 | 2 | #include "mbed.h" |
| millanea | 0:99928431bb44 | 3 | #include "MM2WayRanging.h" |
| millanea | 0:99928431bb44 | 4 | #include "DW1000.h" |
| millanea | 0:99928431bb44 | 5 | #include "debug.h" |
| millanea | 0:99928431bb44 | 6 | |
| millanea | 0:99928431bb44 | 7 | |
| millanea | 0:99928431bb44 | 8 | #ifndef NODE_H |
| millanea | 0:99928431bb44 | 9 | #define NODE_H |
| millanea | 0:99928431bb44 | 10 | |
| millanea | 0:99928431bb44 | 11 | |
| millanea | 0:99928431bb44 | 12 | enum NodeType { ANCHOR, BEACON, OBSERVER } ; |
| millanea | 0:99928431bb44 | 13 | |
| millanea | 0:99928431bb44 | 14 | class Node |
| millanea | 0:99928431bb44 | 15 | { |
| millanea | 0:99928431bb44 | 16 | public: |
| millanea | 0:99928431bb44 | 17 | |
| millanea | 0:99928431bb44 | 18 | // Constructor |
| millanea | 0:99928431bb44 | 19 | Node( MM2WayRanging& newRanging, DW1000& newDw ) ; |
| millanea | 0:99928431bb44 | 20 | |
| millanea | 0:99928431bb44 | 21 | // Executes the node's functionality at each timestep |
| millanea | 0:99928431bb44 | 22 | virtual void execute() ; |
| millanea | 0:99928431bb44 | 23 | |
| millanea | 0:99928431bb44 | 24 | // Sets the address of the node |
| millanea | 0:99928431bb44 | 25 | void setAddress( uint8_t address ) ; |
| millanea | 0:99928431bb44 | 26 | |
| millanea | 0:99928431bb44 | 27 | protected: |
| millanea | 0:99928431bb44 | 28 | |
| millanea | 0:99928431bb44 | 29 | // Ranging object for ranging |
| millanea | 0:99928431bb44 | 30 | MM2WayRanging& ranging ; |
| millanea | 0:99928431bb44 | 31 | |
| millanea | 0:99928431bb44 | 32 | // Decawave object for direct interaction with the device |
| millanea | 0:99928431bb44 | 33 | DW1000& dw ; |
| millanea | 0:99928431bb44 | 34 | |
| millanea | 0:99928431bb44 | 35 | } ; |
| millanea | 0:99928431bb44 | 36 | |
| millanea | 0:99928431bb44 | 37 | |
| millanea | 0:99928431bb44 | 38 | #endif |