inital draft
This commit is contained in:
commit
8491fc7308
7 changed files with 1037 additions and 0 deletions
24
Switchable_Device.h
Normal file
24
Switchable_Device.h
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#ifndef SWITCHABLE_DEVICE_H
|
||||
#define SWITCHABLE_DEVICE_H
|
||||
|
||||
typedef void(*voidFuncPtr)(void);
|
||||
|
||||
class SwitchableDevice {
|
||||
private:
|
||||
voidFuncPtr _onMethod;
|
||||
voidFuncPtr _offMethod;
|
||||
|
||||
public:
|
||||
SwitchableDevice();
|
||||
|
||||
void setOnMethod(voidFuncPtr onMethod);
|
||||
void setOffMethod(voidFuncPtr offMethod);
|
||||
|
||||
void setSwitchMethods(voidFuncPtr onMethod, voidFuncPtr offMethod);
|
||||
void clearSwitchMethods();
|
||||
|
||||
void on();
|
||||
void off();
|
||||
};
|
||||
|
||||
#endif // SWITCHABLE_DEVICE_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue