| LightHub v4.0.0 Smarthome controller firmware

colorchannel.h
Go to the documentation of this file.
1
2 #pragma once
3 #include "options.h"
4
5
6 #include <abstractout.h>
7 #include <item.h>
8
9 class colorChannel : public abstractOut {
10 public:
11
12 colorChannel(Item * _item):abstractOut(_item) {
13 iaddr = item->getArg(); //Once retrieve and store base address
14 if (iaddr<0) iaddr=-iaddr;
15 numArgs = item->getArgCount(); // and how many addresses is configured
16 };
17 int Ctrl(itemCmd cmd, char* subItem=NULL, bool toExecute=true) override;
18 int getDefaultStorageType()override;
19 virtual int PixelCtrl(itemCmd cmd, char* subItem=NULL, bool show=true ) =0;
20 short getChannelAddr(short n =0);
21 // int isActive() override;
22 protected:
23 short iaddr;
24 short numArgs;
25 };
itemCmd
Definition: itemCmd.h:153
Item::getArg
int getArg(short n=0)
Definition: item.cpp:329
colorChannel::getChannelAddr
short getChannelAddr(short n=0)
Definition: colorchannel.cpp:12
colorChannel::numArgs
short numArgs
Definition: colorchannel.h:24
options.h
abstractOut
Definition: abstractout.h:8
colorChannel::Ctrl
int Ctrl(itemCmd cmd, char *subItem=NULL, bool toExecute=true) override
Definition: colorchannel.cpp:47
colorChannel
Definition: colorchannel.h:9
colorChannel::iaddr
short iaddr
Definition: colorchannel.h:23
Item
Definition: item.h:104
abstractout.h
colorChannel::getDefaultStorageType
int getDefaultStorageType() override
Definition: colorchannel.cpp:20
colorChannel::colorChannel
colorChannel(Item *_item)
Definition: colorchannel.h:12
abstractOut::item
Item * item
Definition: abstractout.h:18
colorChannel::PixelCtrl
virtual int PixelCtrl(itemCmd cmd, char *subItem=NULL, bool show=true)=0
Item::getArgCount
short getArgCount()
Definition: item.cpp:361
item.h