OpenZWave Library
1.6.1914
Toggle main menu visibility
Loading...
Searching...
No Matches
cpp
src
value_classes
ValueRaw.h
Go to the documentation of this file.
1
//-----------------------------------------------------------------------------
2
//
3
// ValueRaw.h
4
//
5
// Represents a collection of 8-bit values
6
//
7
// Copyright (c) 2013 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 _ValueRaw_H
29
#define _ValueRaw_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
namespace
Internal
40
{
41
namespace
VC
42
{
43
47
class
ValueRaw
:
public
Value
48
{
49
public
:
50
ValueRaw
(
uint32
const
_homeId,
uint8
const
_nodeId,
ValueID::ValueGenre
const
_genre,
uint8
const
_commandClassId,
uint8
const
_instance,
uint16
const
_index,
string
const
& _label,
string
const
& _units,
bool
const
_readOnly,
bool
const
_writeOnly,
uint8
const
* _value,
uint8
const
_length,
uint8
const
_pollIntensity);
51
ValueRaw
();
52
virtual
~ValueRaw
();
53
54
bool
Set
(
uint8
const
* _value,
uint8
const
_length);
55
void
OnValueRefreshed
(
uint8
const
* _value,
uint8
const
_length);
56
void
SetTargetValue
(
uint8
const
* _target,
uint8
const
_length,
int32
_duration = 0);
57
58
// From Value
59
virtual
string
const
GetAsString
()
const
;
60
virtual
bool
SetFromString
(
string
const
& _value);
61
virtual
void
ReadXML
(
uint32
const
_homeId,
uint8
const
_nodeId,
uint8
const
_commandClassId, TiXmlElement
const
* _valueElement);
62
virtual
void
WriteXML
(TiXmlElement* _valueElement);
63
64
uint8
*
GetValue
()
const
65
{
66
return
m_value;
67
}
68
uint8
GetLength
()
const
69
{
70
return
m_valueLength;
71
}
72
73
private
:
74
uint8
* m_value;
// the current value
75
uint8
m_valueLength;
// fixed length for this instance
76
uint8
* m_valueCheck;
// the previous value (used for double-checking spurious value reads)
77
uint8
m_valueCheckLength;
// m_valueCheck array length
78
uint8
* m_targetValue;
// Target Value
79
uint8
m_targetValueLength;
// Target Value Array Length
80
};
81
}
// namespace VC
82
}
// namespace Internal
83
}
// namespace OpenZWave
84
85
#endif
86
Defs.h
uint16
unsigned short uint16
Definition
Defs.h:88
uint32
unsigned int uint32
Definition
Defs.h:91
int32
signed int int32
Definition
Defs.h:90
uint8
unsigned char uint8
Definition
Defs.h:85
Value.h
OpenZWave::Internal::VC::ValueRaw::ReadXML
virtual void ReadXML(uint32 const _homeId, uint8 const _nodeId, uint8 const _commandClassId, TiXmlElement const *_valueElement)
Definition
ValueRaw.cpp:135
OpenZWave::Internal::VC::ValueRaw::SetFromString
virtual bool SetFromString(string const &_value)
Definition
ValueRaw.cpp:95
OpenZWave::Internal::VC::ValueRaw::GetAsString
virtual string const GetAsString() const
Definition
ValueRaw.cpp:77
OpenZWave::Internal::VC::ValueRaw::ValueRaw
ValueRaw()
Definition
ValueRaw.cpp:59
OpenZWave::Internal::VC::ValueRaw::SetTargetValue
void SetTargetValue(uint8 const *_target, uint8 const _length, int32 _duration=0)
Definition
ValueRaw.cpp:218
OpenZWave::Internal::VC::ValueRaw::~ValueRaw
virtual ~ValueRaw()
Definition
ValueRaw.cpp:70
OpenZWave::Internal::VC::ValueRaw::GetLength
uint8 GetLength() const
Definition
ValueRaw.h:68
OpenZWave::Internal::VC::ValueRaw::WriteXML
virtual void WriteXML(TiXmlElement *_valueElement)
Definition
ValueRaw.cpp:183
OpenZWave::Internal::VC::ValueRaw::ValueRaw
ValueRaw(uint32 const _homeId, uint8 const _nodeId, ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _index, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, uint8 const *_value, uint8 const _length, uint8 const _pollIntensity)
Definition
ValueRaw.cpp:46
OpenZWave::Internal::VC::ValueRaw::GetValue
uint8 * GetValue() const
Definition
ValueRaw.h:64
OpenZWave::Internal::VC::Value::Value
Value(uint32 const _homeId, uint8 const _nodeId, ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 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:59
OpenZWave::Internal::VC::Value::Set
bool Set()
Definition
Value.cpp:289
OpenZWave::Internal::VC::Value::OnValueRefreshed
void OnValueRefreshed()
Definition
Value.cpp:351
OpenZWave::ValueID::ValueGenre
ValueGenre
Definition
ValueID.h:85
OpenZWave::Internal::VC
Definition
Driver.h:64
OpenZWave::Internal
Definition
Bitfield.cpp:33
OpenZWave
Definition
Bitfield.cpp:31
Generated on
for OpenZWave Library by
1.17.0