-
Notifications
You must be signed in to change notification settings - Fork 0
/
GPIOPin.h
48 lines (36 loc) · 972 Bytes
/
GPIOPin.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
#ifndef GPIOPINIO_GPIOPIN_H
#define GPIOPINIO_GPIOPIN_H
#include <IO/ServerIO/ISendTrigger.h>
#include <IO/ServerIO/CDPSignalChannel.h>
#include <CDPSystem/Base/CDPSetting.h>
#include <atomic>
namespace ServerIO {
class IChannel;
}
namespace GPIOPinIO {
class GPIOPin: public ServerIO::CDPSignalChannel<bool>, public ServerIO::ISendTrigger
{
public:
GPIOPin(short nr, bool inputGPIO);
~GPIOPin();
bool Initialize();
bool Deinitialize();
void Update();
std::string GetNodeTypeName() const override;
void FlagForSend() override;
void SetDebugLevel(int level);
int GetDebugLevel() const;
std::string baseDirectory() const;
void setBaseDirectory(const std::string& baseDirectory);
private:
void composeValuePath();
std::atomic_bool m_doWrite;
short m_nr;
bool m_inputGPIO;
unsigned char m_valueGPIO;
std::string m_valuePath;
int m_debugLevel;
std::string m_baseDirectory;
};
}
#endif