-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmode.h
More file actions
60 lines (49 loc) · 1.11 KB
/
mode.h
File metadata and controls
60 lines (49 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef MODE_H
#define MODE_H
#include <Arduino.h>
#include "dataset.h"
#include "format.h"
#include <memory>
#include <string>
#include <vector>
class Mode {
public:
enum class InputOutputType {
SUPPORTS_FUNCTIONAL_MAPPING_20,
ABS,
REL,
DIS,
SUPPORTS_NULL
};
Mode();
~Mode();
void registerInputType(InputOutputType inputType);
void registerOutputType(InputOutputType outputType);
void setName(const std::string& name);
void setUnits(const std::string& units);
void setPctMinMax(float min, float max);
void setSiMinMax(float min, float max);
void setFormat(std::unique_ptr<Format> format);
std::string getName();
std::string getUnits();
float getPctMin();
float getPctMax();
float getSiMin();
float getSiMax();
void reset();
void processDataPacket(const uint8_t* payload, int payloadSize);
Dataset* getDataset(int index);
Format* getFormat();
private:
std::string name_;
std::string units_;
float pctMin_;
float pctMax_;
float siMin_;
float siMax_;
std::unique_ptr<Format> format_;
bool inputTypes_[5];
bool outputTypes_[5];
std::vector<Dataset> datasets_;
};
#endif // MODE_H