OpenZWave Library 1.6.1914
Loading...
Searching...
No Matches
SceneActivation.h
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2//
3// SceneActivation.h
4//
5// Implementation of the Z-Wave COMMAND_CLASS_SCENE_ACTIVATION
6//
7// Copyright (c) 2012 Greg Satz <satz@iranger.com>
8//
9// SOFTWARE NOTICE AND LICENSE
10//
11// This file is part of OpenZWave.
12//
13// OpenZWave is free software: you can redistribute it and/or modify
14// it under the terms of the GNU Lesser General Public License as published
15// by the Free Software Foundation, either version 3 of the License,
16// or (at your option) any later version.
17//
18// OpenZWave is distributed in the hope that it will be useful,
19// but WITHOUT ANY WARRANTY; without even the implied warranty of
20// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21// GNU Lesser General Public License for more details.
22//
23// You should have received a copy of the GNU Lesser General Public License
24// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
25//
26//-----------------------------------------------------------------------------
27
28#ifndef _SceneActivation_H
29#define _SceneActivation_H
30
32#include "TimerThread.h"
33
34namespace OpenZWave
35{
36 namespace Internal
37 {
38 namespace CC
39 {
40
44 class SceneActivation: public CommandClass, private Timer
45 {
46 public:
47 static CommandClass* Create(uint32 const _homeId, uint8 const _nodeId)
48 {
49 return new SceneActivation(_homeId, _nodeId);
50 }
52 {
53 }
54
57 {
58 return 0x2B;
59 }
61 static string const StaticGetCommandClassName()
62 {
63 return "COMMAND_CLASS_SCENE_ACTIVATION";
64 }
65
66 // From CommandClass
68 virtual uint8 const GetCommandClassId() const override
69 {
71 }
73 virtual string const GetCommandClassName() const override
74 {
76 }
78 virtual bool HandleIncomingMsg(uint8 const* _data, uint32 const _length, uint32 const _instance = 1) override;
79 virtual bool HandleMsg(uint8 const* _data, uint32 const _length, uint32 const _instance = 1) override;
80
81 protected:
82 virtual void CreateVars(uint8 const _instance) override;
83
84 private:
85 void ClearScene(uint32 id);
86 SceneActivation(uint32 const _homeId, uint8 const _nodeId);
87
88 };
89 } // namespace CC
90 } // namespace Internal
91} // namespace OpenZWave
92
93#endif
unsigned int uint32
Definition: Defs.h:91
unsigned char uint8
Definition: Defs.h:85
Base class for all Z-Wave command classes.
Definition: CommandClass.h:61
void CreateVars()
Definition: CommandClass.cpp:841
Implements COMMAND_CLASS_SCENEACTIVATION (0x2B), a Z-Wave device command class.
Definition: SceneActivation.h:45
static string const StaticGetCommandClassName()
Get a string containing the name of this command class.
Definition: SceneActivation.h:61
virtual bool HandleIncomingMsg(uint8 const *_data, uint32 const _length, uint32 const _instance=1) override
Handle a response to a message associated with this command class. (Inherited from CommandClass)
Definition: SceneActivation.cpp:64
virtual uint8 const GetCommandClassId() const override
Get command class ID (1 byte) identifying this command class. (Inherited from CommandClass)
Definition: SceneActivation.h:68
virtual bool HandleMsg(uint8 const *_data, uint32 const _length, uint32 const _instance=1) override
Definition: SceneActivation.cpp:128
static CommandClass * Create(uint32 const _homeId, uint8 const _nodeId)
Definition: SceneActivation.h:47
virtual ~SceneActivation()
Definition: SceneActivation.h:51
static uint8 const StaticGetCommandClassId()
Get command class ID (1 byte) identifying this command class.
Definition: SceneActivation.h:56
virtual string const GetCommandClassName() const override
Get a string containing the name of this command class. (Inherited from CommandClass)
Definition: SceneActivation.h:73
Timer SubClass for automatically registering/unregistering Timer Callbacks if the instance goes out o...
Definition: TimerThread.h:128
Definition: Bitfield.cpp:31