Bike-X  0.8
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
tests.cpp
Go to the documentation of this file.
1 #include <iostream>
2 #include <Battery.h>
3 #include <Oximetry.h>
4 #include <Speed.h>
5 #include <Direction.h>
6 #include <Break.h>
7 
8 using namespace std;
9 
11 {
12  Battery b;
13  Oximetry o;
14  Speed s;
15  Direction d;
16  char data;
17 
18  // Get the data
20 
21  b.getData(data);
22  std::cout << "Battery '" << data << "' " << std::endl;
23 
24  o.getData(data);
25  std::cout << "Oximetry '" << data << "' " << std::endl;
26 
27  s.getData(data);
28  std::cout << "Speed '" << data << "' " << std::endl;
29 
30  d.getData(data);
31  std::cout << "Direction '" << data << "' " << std::endl;
32 }
33 
35 {
36  Break b;
37  char data = 'a';
38  b.setData(data);
39  Active::flush();
40 }
41 
42 int main()
43 {
44  cout << "Testing sensors" << endl;
45  return 0;
46 }
int getData(unsigned char &data)
Definition: Battery.cpp:3
static int flush()
Definition: Active.cpp:6
int getData(unsigned char &data)
Definition: Speed.cpp:3
Definition: Speed.h:6
int getData(unsigned char &data)
Definition: Direction.cpp:3
static int flush()
Definition: Passive.cpp:9
int main()
Definition: tests.cpp:6
int getData(unsigned char &data)
Definition: Oximetry.cpp:3
void test_initAllPassiveDevices()
Definition: tests.cpp:10
void test_initAllActiveDevices()
Definition: tests.cpp:34
Definition: Break.h:6
int setData(unsigned char data)
Definition: Break.cpp:3
Definition: Battery.h:6