OpenZWave Library
1.4.0
Toggle main menu visibility
Loading...
Searching...
No Matches
cpp
src
value_classes
ValueShort.h
Go to the documentation of this file.
1
//-----------------------------------------------------------------------------
2
//
3
// ValueShort.h
4
//
5
// Represents a 16-bit value
6
//
7
// Copyright (c) 2010 Mal Lansell <openzwave@lansell.org>
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 _ValueShort_H
29
#define _ValueShort_H
30
31
#include <string>
32
#include "
Defs.h
"
33
#include "
value_classes/Value.h
"
34
35
class
TiXmlElement;
36
37
namespace
OpenZWave
38
{
39
class
Msg
;
40
class
Node
;
41
44
class
ValueShort
:
public
Value
45
{
46
public
:
47
ValueShort
(
uint32
const
_homeId,
uint8
const
_nodeId,
ValueID::ValueGenre
const
_genre,
uint8
const
_commandClassId,
uint8
const
_instance,
uint8
const
_index,
string
const
& _label,
string
const
& _units,
bool
const
_readOnly,
bool
const
_writeOnly,
int16
const
_value,
uint8
const
_pollIntensity );
48
ValueShort
();
49
virtual
~ValueShort
(){}
50
51
bool
Set
(
int16
const
_value );
52
void
OnValueRefreshed
(
int16
const
_value );
53
54
// From Value
55
virtual
string
const
GetAsString
()
const
;
56
virtual
bool
SetFromString
(
string
const
& _value );
57
virtual
void
ReadXML
(
uint32
const
_homeId,
uint8
const
_nodeId,
uint8
const
_commandClassId, TiXmlElement
const
* _valueElement );
58
virtual
void
WriteXML
( TiXmlElement* _valueElement );
59
60
int16
GetValue
()
const
{
return
m_value; }
61
62
private
:
63
int16
m_value;
// the current value
64
int16
m_valueCheck;
// the previous value (used for double-checking spurious value reads)
65
};
66
67
}
// namespace OpenZWave
68
69
#endif
Defs.h
uint32
unsigned int uint32
Definition
Defs.h:80
int16
signed short int16
Definition
Defs.h:76
uint8
unsigned char uint8
Definition
Defs.h:74
Value.h
OpenZWave::Msg
Message object to be passed to and from devices on the Z-Wave network.
Definition
Msg.h:45
OpenZWave::Node
The Node class describes a Z-Wave node object...typically a device on the Z-Wave network.
Definition
Node.h:65
OpenZWave::ValueID::ValueGenre
ValueGenre
Definition
ValueID.h:72
OpenZWave::ValueShort::SetFromString
virtual bool SetFromString(string const &_value)
Definition
ValueShort.cpp:92
OpenZWave::ValueShort::ReadXML
virtual void ReadXML(uint32 const _homeId, uint8 const _nodeId, uint8 const _commandClassId, TiXmlElement const *_valueElement)
Definition
ValueShort.cpp:109
OpenZWave::ValueShort::~ValueShort
virtual ~ValueShort()
Definition
ValueShort.h:49
OpenZWave::ValueShort::ValueShort
ValueShort(uint32 const _homeId, uint8 const _nodeId, ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 const _index, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, int16 const _value, uint8 const _pollIntensity)
Definition
ValueShort.cpp:45
OpenZWave::ValueShort::WriteXML
virtual void WriteXML(TiXmlElement *_valueElement)
Definition
ValueShort.cpp:134
OpenZWave::ValueShort::GetValue
int16 GetValue() const
Definition
ValueShort.h:60
OpenZWave::ValueShort::GetAsString
virtual string const GetAsString() const
Definition
ValueShort.cpp:83
OpenZWave::ValueShort::ValueShort
ValueShort()
Definition
ValueShort.cpp:72
OpenZWave::Value::OnValueRefreshed
void OnValueRefreshed()
Definition
Value.cpp:412
OpenZWave::Value::Value
Value(uint32 const _homeId, uint8 const _nodeId, ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 const _index, ValueID::ValueType const _type, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, bool const _isset, uint8 const _pollIntensity)
Definition
Value.cpp:71
OpenZWave::Value::Set
bool Set()
Definition
Value.cpp:350
OpenZWave
Definition
Bitfield.h:35
Generated on
for OpenZWave Library by
1.18.0