-
Notifications
You must be signed in to change notification settings - Fork 0
/
NSxChannel.h
62 lines (44 loc) · 1.54 KB
/
NSxChannel.h
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
61
62
#ifndef ___NSxChannel_h__
#define ___NSxChannel_h__
#include <cstdint>
#include <fstream>
#include <stdexcept>
#include <iostream>
#include <sstream>
#include <string>
#include "filter.h"
class NSxChannel {
public:
NSxChannel();
NSxChannel(std::ifstream &file);
/* Getters for labels */
std::string getLabel() const { return std::string(electrodeLabel);}
std::string getUnits() const { return std::string(unitLabel);}
std::string getRippleID() const;
std::uint16_t getNumericID() const {return electrodeID;}
std::uint8_t getFrontEnd() const {return frontEndID; }
std::uint8_t getPin() const {return pin; }
/* Getters for A/D properties*/
std::int16_t getDigitalMin() const {return minDigital; }
std::int16_t getDigitalMax() const {return maxDigital; }
std::int16_t getAnalogMin() const {return minAnalog; }
std::int16_t getAnalogMax() const {return maxAnalog; }
double getVoltsPerAD() const;
/* Getters for Filters*/
Filter getLPFilter() const { return lowpass;}
Filter getHPFilter() const { return highpass;}
friend std::ostream& operator<<(std::ostream& out, const NSxChannel& c);
protected:
std::uint16_t electrodeID;
char electrodeLabel[16];
char unitLabel[16];
std::uint8_t frontEndID;
std::uint8_t pin;
std::int16_t minDigital;
std::int16_t maxDigital;
std::int16_t minAnalog;
std::int16_t maxAnalog;
Filter lowpass;
Filter highpass;
};
#endif /* ___NSxChannel_h__ */