TactileVestProject  V1.0
Tactile API documentation
 All Classes Functions
Attire.h
1 #ifndef ATTIRE_H
2 #define ATTIRE_H
3 
4 #include <map>
5 #include <thread>
6 #include "Tactor.h"
7 #include "Sensor.h"
8 #include "ComplexPattern.h"
9 #include "SimplePattern.h"
10 class Attire
11 {
12  public:
15  Attire(HardwareInterface * hardware);
16  virtual ~Attire();
17  Attire(const Attire& other);
18  Attire& operator=(const Attire& other);
23  Tactor * addTactor(string name, Tactor * tactor);
27  Tactor * removeTactor(string name);
32  Sensor * addSensor(string name, Sensor * sensor);
36  Sensor * removeSensor(string name);
41  bool command(string tactorName, string command);
45  string check(string sensorName);
49  bool execute(SimplePattern pattern);
52  void execute(ComplexPattern pattern);
53  protected:
54  private:
55  HardwareInterface * hardware;
56  map<string,Tactor*> tactors;
57  map<string,Sensor*> sensors;
58  bool execute(SimplePattern* pattern, int delay);
59  vector<thread> threads;
60 };
61 
62 #endif // ATTIRE_H
Definition: Sensor.h:5
Attire(HardwareInterface *hardware)
An interface to a hardware device, such as a serial connection.
Definition: HardwareInterface.h:5
bool command(string tactorName, string command)
Sensor * addSensor(string name, Sensor *sensor)
Tactor * removeTactor(string name)
A collection of SimplePatterns to be executed in sequence.
Definition: ComplexPattern.h:8
Definition: Tactor.h:6
A collection of tactors to be commanded with the same command simultaneously.
Definition: SimplePattern.h:8
Sensor * removeSensor(string name)
string check(string sensorName)
Tactor * addTactor(string name, Tactor *tactor)
bool execute(SimplePattern pattern)
Definition: Attire.h:10