| LightHub v4.0.0 Smarthome controller firmware

out_relay.h
Go to the documentation of this file.
1
2 #pragma once
3 #include "options.h"
4 #ifndef RELAY_DISABLE
5
6 #include <abstractout.h>
7 #include <item.h>
8
9 class out_relay : public abstractOut {
10 public:
11
12 out_relay(Item * _item):abstractOut(_item){ getConfig();};
13 void getConfig();
14 void relay(bool state);
15 int Setup() override;
16 int Poll(short cause) override;
17 int Stop() override;
18 int Status() override;
19
20 int getChanType() override;
21 int Ctrl(itemCmd cmd, char* subItem=NULL, bool toExecute=true) override;
22
23 protected:
24 short pin;
25 bool inverted;
26 uint32_t period;
27 };
28 #endif
itemCmd
Definition: itemCmd.h:153
out_relay::Status
int Status() override
Definition: out_relay.cpp:62
options.h
abstractOut
Definition: abstractout.h:8
out_relay::out_relay
out_relay(Item *_item)
Definition: out_relay.h:12
out_relay::Setup
int Setup() override
Remove?? Now getChanType used instead.
Definition: out_relay.cpp:35
out_relay::period
uint32_t period
Definition: out_relay.h:26
out_relay::pin
short pin
Definition: out_relay.h:24
out_relay::getConfig
void getConfig()
Definition: out_relay.cpp:13
out_relay
Definition: out_relay.h:9
Item
Definition: item.h:104
out_relay::Poll
int Poll(short cause) override
Definition: out_relay.cpp:120
abstractout.h
out_relay::Ctrl
int Ctrl(itemCmd cmd, char *subItem=NULL, bool toExecute=true) override
Definition: out_relay.cpp:151
out_relay::relay
void relay(bool state)
Definition: out_relay.cpp:76
out_relay::inverted
bool inverted
Definition: out_relay.h:25
out_relay::Stop
int Stop() override
Definition: out_relay.cpp:54
out_relay::getChanType
int getChanType() override
Definition: out_relay.cpp:217
item.h