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.
common.h@0:c0bb943bc2a7, 2012-04-09 (annotated)
- Committer:
- priusfan
- Date:
- Mon Apr 09 15:27:55 2012 +0000
- Revision:
- 0:c0bb943bc2a7
todo: find a working BT module...
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| priusfan | 0:c0bb943bc2a7 | 1 | /* |
| priusfan | 0:c0bb943bc2a7 | 2 | * File: common.h |
| priusfan | 0:c0bb943bc2a7 | 3 | * Author: teamprii |
| priusfan | 0:c0bb943bc2a7 | 4 | * |
| priusfan | 0:c0bb943bc2a7 | 5 | * Created on April 8, 2012, 6:49 PM |
| priusfan | 0:c0bb943bc2a7 | 6 | */ |
| priusfan | 0:c0bb943bc2a7 | 7 | |
| priusfan | 0:c0bb943bc2a7 | 8 | #ifndef COMMON_H |
| priusfan | 0:c0bb943bc2a7 | 9 | #define COMMON_H |
| priusfan | 0:c0bb943bc2a7 | 10 | |
| priusfan | 0:c0bb943bc2a7 | 11 | #include <vector> |
| priusfan | 0:c0bb943bc2a7 | 12 | using namespace std; |
| priusfan | 0:c0bb943bc2a7 | 13 | |
| priusfan | 0:c0bb943bc2a7 | 14 | class reqTbl { |
| priusfan | 0:c0bb943bc2a7 | 15 | public: |
| priusfan | 0:c0bb943bc2a7 | 16 | int id; // PID |
| priusfan | 0:c0bb943bc2a7 | 17 | int freq; // request frequency |
| priusfan | 0:c0bb943bc2a7 | 18 | int fcnt; // frequency counter |
| priusfan | 0:c0bb943bc2a7 | 19 | vector<int> code; // list of code; change from cod1, cod2 to a vector code and move to end of line in file for easier read |
| priusfan | 0:c0bb943bc2a7 | 20 | reqTbl(); |
| priusfan | 0:c0bb943bc2a7 | 21 | }; |
| priusfan | 0:c0bb943bc2a7 | 22 | |
| priusfan | 0:c0bb943bc2a7 | 23 | reqTbl::reqTbl() { |
| priusfan | 0:c0bb943bc2a7 | 24 | fcnt = 0; // initialize frequency counter to 0 |
| priusfan | 0:c0bb943bc2a7 | 25 | } |
| priusfan | 0:c0bb943bc2a7 | 26 | |
| priusfan | 0:c0bb943bc2a7 | 27 | extern vector<reqTbl> reqTable; |
| priusfan | 0:c0bb943bc2a7 | 28 | extern int reqNumTbl; // this will be just (int)reqTable.size() |
| priusfan | 0:c0bb943bc2a7 | 29 | |
| priusfan | 0:c0bb943bc2a7 | 30 | #endif /* COMMON_H */ |