Configuration.h
Go to the documentation of this file.
//-----------------------------------------------------------------------------
//
// Configuration.h
//
// Implementation of the Z-Wave COMMAND_CLASS_CONFIGURATION
//
// Copyright (c) 2010 Mal Lansell <openzwave@lansell.org>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#ifndef _Configuration_H
#define _Configuration_H
#include <list>
#include "command_classes/CommandClass.h"
namespace OpenZWave
{
class Value;
class Configuration: public CommandClass
{
friend class Node;
public:
static CommandClass* Create( uint32 const _homeId, uint8 const _nodeId ){ return new Configuration( _homeId, _nodeId ); }
virtual ~Configuration(){}
static uint8 const StaticGetCommandClassId(){ return 0x70; }
static string const StaticGetCommandClassName(){ return "COMMAND_CLASS_CONFIGURATION"; }
virtual bool RequestValue( uint32 const _requestFlags, uint8 const _parameter, uint8 const _index, Driver::MsgQueue const _queue );
void Set( uint8 const _parameter, int32 const _value, uint8 const _size );
// From CommandClass
virtual uint8 const GetCommandClassId()const{ return StaticGetCommandClassId(); }
virtual string const GetCommandClassName()const{ return StaticGetCommandClassName(); }
virtual bool HandleMsg( uint8 const* _data, uint32 const _length, uint32 const _instance = 1 );
virtual bool SetValue( Value const& _value );
private:
Configuration( uint32 const _homeId, uint8 const _nodeId ): CommandClass( _homeId, _nodeId ){}
};
} // namespace OpenZWave
#endif
OpenZWave
Definition: Bitfield.h:34
OpenZWave::Driver::MsgQueue
MsgQueue
Definition: Driver.h:565
OpenZWave::Configuration::StaticGetCommandClassName
static string const StaticGetCommandClassName()
Definition: Configuration.h:49
CommandClass.h
OpenZWave::Configuration
Implements COMMAND_CLASS_CONFIGURATION (0x70), a Z-Wave device command class.
Definition: Configuration.h:40
OpenZWave::Node
The Node class describes a Z-Wave node object...typically a device on the Z-Wave network.
Definition: Node.h:64
OpenZWave::Configuration::GetCommandClassName
virtual string const GetCommandClassName() const
Definition: Configuration.h:56
OpenZWave::CommandClass
Base class for all Z-Wave command classes.
Definition: CommandClass.h:46
OpenZWave::CommandClass::CommandClass
CommandClass(uint32 const _homeId, uint8 const _nodeId)
Definition: CommandClass.cpp:55
OpenZWave::Configuration::HandleMsg
virtual bool HandleMsg(uint8 const *_data, uint32 const _length, uint32 const _instance=1)
Definition: Configuration.cpp:56
OpenZWave::Configuration::Set
void Set(uint8 const _parameter, int32 const _value, uint8 const _size)
Definition: Configuration.cpp:251
OpenZWave::Configuration::Create
static CommandClass * Create(uint32 const _homeId, uint8 const _nodeId)
Definition: Configuration.h:45
OpenZWave::Configuration::RequestValue
virtual bool RequestValue(uint32 const _requestFlags, uint8 const _parameter, uint8 const _index, Driver::MsgQueue const _queue)
Definition: Configuration.cpp:218
int32
signed int int32
Definition: Defs.h:79
uint32
unsigned int uint32
Definition: Defs.h:80
OpenZWave::Configuration::GetCommandClassId
virtual uint8 const GetCommandClassId() const
Definition: Configuration.h:55
OpenZWave::Configuration::~Configuration
virtual ~Configuration()
Definition: Configuration.h:46
OpenZWave::Configuration::SetValue
virtual bool SetValue(Value const &_value)
Definition: Configuration.cpp:160
OpenZWave::Value
Base class for values associated with a node.
Definition: Value.h:47
OpenZWave::Configuration::StaticGetCommandClassId
static uint8 const StaticGetCommandClassId()
Definition: Configuration.h:48
uint8
unsigned char uint8
Definition: Defs.h:74