mirror of
https://github.com/Fishwaldo/open-zwave.git
synced 2025-03-15 19:41:36 +00:00
Update the ValueID Index implementation
This commit is contained in:
parent
7ab7e628ef
commit
d9de8f0ef7
15 changed files with 3477 additions and 672 deletions
3
Makefile
3
Makefile
|
@ -32,6 +32,9 @@ clean:
|
|||
$(MAKE) -C $(top_srcdir)/cpp/examples/MinOZW/ -$(MAKEFLAGS) $(MAKECMDGOALS)
|
||||
$(MAKE) -C $(top_srcdir)/cpp/test/ -$(MAKEFLAGS) $(MAKECMDGOALS)
|
||||
|
||||
updateIndexDefines:
|
||||
$(MAKE) -C $(top_srcdir)/cpp/build -$(MAKEFLAGS) $(MAKECMDGOALS)
|
||||
|
||||
test:
|
||||
$(MAKE) -C $(top_srcdir)/cpp/test/ -$(MAKEFLAGS) $(MAKECMDGOALS)
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<NotificationTypes xmlns='https://github.com/OpenZWave/open-zwave' Revision="7">
|
||||
<NotificationTypes xmlns='https://github.com/OpenZWave/open-zwave' Revision="8">
|
||||
<!-- Please keep this file in Sync with the Localization.xml file for the Notification CC -->
|
||||
<!-- If you are adding new Types or Params, Please also consider updating ValueIDIndexesDefines.def -->
|
||||
<AlarmType id="1" name="Smoke Alarm">
|
||||
<AlarmEvent id="0" name="Clear">
|
||||
<AlarmEventParam id="256" type="byte" name="Previous Event Cleared" />
|
||||
|
|
|
@ -178,6 +178,10 @@ $(top_srcdir)/cpp/src/vers.cpp:
|
|||
-e 's|[@]VERSION@|$(VERSION).$(VERSION_REV)|g' \
|
||||
< "$(top_srcdir)/dist/openzwave.spec.in" > "$(top_srcdir)/dist/openzwave.spec"
|
||||
|
||||
#create a vers.cpp file that contains our version and subversion revisions
|
||||
updateIndexDefines: $(top_srcdir)/cpp/src/ValueIDIndexesDefines.def
|
||||
@$(CXX) -E -P -o $(top_srcdir)/cpp/src/ValueIDIndexesDefines.h -x c++ $<
|
||||
|
||||
|
||||
#$(OBJDIR)/vers.o: $(top_builddir)/vers.cpp
|
||||
|
||||
|
@ -202,7 +206,7 @@ $(LIBDIR)/$(SHARED_LIB_NAME): $(patsubst %.cpp,$(OBJDIR)/%.o,$(tinyxml)) \
|
|||
$(patsubst %.cpp,$(OBJDIR)/%.o,$(indep)) \
|
||||
$(OBJDIR)/vers.o
|
||||
@echo "Linking Shared Library"
|
||||
@$(LD) $(LDFLAGS) $(TARCH) -o $@ $+ $(LIBS)
|
||||
$(LD) $(LDFLAGS) $(TARCH) -o $@ $+ $(LIBS)
|
||||
@ln -sf $(SHARED_LIB_NAME) $(LIBDIR)/$(SHARED_LIB_UNVERSIONED)
|
||||
|
||||
$(top_builddir)/libopenzwave.pc: $(top_srcdir)/cpp/build/libopenzwave.pc.in $(PKGCONFIG)
|
||||
|
|
|
@ -74,9 +74,9 @@ CC := $(CROSS_COMPILE)cc
|
|||
CXX := $(CROSS_COMPILE)c++
|
||||
LD := $(CROSS_COMPILE)c++
|
||||
else
|
||||
CC := $(CROSS_COMPILE)gcc
|
||||
CXX := $(CROSS_COMPILE)g++
|
||||
LD := $(CROSS_COMPILE)g++
|
||||
CC ?= $(CROSS_COMPILE)gcc
|
||||
CXX ?= $(CROSS_COMPILE)g++
|
||||
LD ?= $(CROSS_COMPILE)g++
|
||||
endif
|
||||
ifeq ($(UNAME),Darwin)
|
||||
AR := libtool -static -o
|
||||
|
|
|
@ -1,491 +0,0 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// ValueIDIndexes.h
|
||||
//
|
||||
// List of all Possible ValueID Indexes in OZW
|
||||
//
|
||||
// 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 _ValueIDIndexes_H
|
||||
#define _ValueIDIndexes_H
|
||||
|
||||
#include "Defs.h"
|
||||
#include <cstring>
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace OpenZWave
|
||||
{
|
||||
|
||||
|
||||
/* this is good for upto 100 entries per ENUM. I shall predict that 100 entries shall be enough for any CommandClass :) */
|
||||
|
||||
#define MAP(macro, ...) \
|
||||
IDENTITY( \
|
||||
APPLY(CHOOSE_MAP_START, COUNT(__VA_ARGS__)) \
|
||||
(macro, __VA_ARGS__))
|
||||
|
||||
#define CHOOSE_MAP_START(count) MAP ## count
|
||||
|
||||
#define APPLY(macro, ...) IDENTITY(macro(__VA_ARGS__))
|
||||
|
||||
// Needed to expand __VA_ARGS__ "eagerly" on the MSVC preprocessor.
|
||||
#define IDENTITY(x) x
|
||||
|
||||
#define MAP1(m, x) m(x)
|
||||
#define MAP2(m, x, ...) m(x) IDENTITY(MAP1(m, __VA_ARGS__))
|
||||
#define MAP3(m, x, ...) m(x) IDENTITY(MAP2(m, __VA_ARGS__))
|
||||
#define MAP4(m, x, ...) m(x) IDENTITY(MAP3(m, __VA_ARGS__))
|
||||
#define MAP5(m, x, ...) m(x) IDENTITY(MAP4(m, __VA_ARGS__))
|
||||
#define MAP6(m, x, ...) m(x) IDENTITY(MAP5(m, __VA_ARGS__))
|
||||
#define MAP7(m, x, ...) m(x) IDENTITY(MAP6(m, __VA_ARGS__))
|
||||
#define MAP8(m, x, ...) m(x) IDENTITY(MAP7(m, __VA_ARGS__))
|
||||
#define MAP9(m, x, ...) m(x) IDENTITY(MAP8(m, __VA_ARGS__))
|
||||
#define MAP10(m, x, ...) m(x) IDENTITY(MAP9(m, __VA_ARGS__))
|
||||
#define MAP11(m, x, ...) m(x) IDENTITY(MAP10(m, __VA_ARGS__))
|
||||
#define MAP12(m, x, ...) m(x) IDENTITY(MAP11(m, __VA_ARGS__))
|
||||
#define MAP13(m, x, ...) m(x) IDENTITY(MAP12(m, __VA_ARGS__))
|
||||
#define MAP14(m, x, ...) m(x) IDENTITY(MAP13(m, __VA_ARGS__))
|
||||
#define MAP15(m, x, ...) m(x) IDENTITY(MAP14(m, __VA_ARGS__))
|
||||
#define MAP16(m, x, ...) m(x) IDENTITY(MAP15(m, __VA_ARGS__))
|
||||
#define MAP17(m, x, ...) m(x) IDENTITY(MAP16(m, __VA_ARGS__))
|
||||
#define MAP18(m, x, ...) m(x) IDENTITY(MAP17(m, __VA_ARGS__))
|
||||
#define MAP19(m, x, ...) m(x) IDENTITY(MAP18(m, __VA_ARGS__))
|
||||
#define MAP20(m, x, ...) m(x) IDENTITY(MAP19(m, __VA_ARGS__))
|
||||
#define MAP21(m, x, ...) m(x) IDENTITY(MAP20(m, __VA_ARGS__))
|
||||
#define MAP22(m, x, ...) m(x) IDENTITY(MAP21(m, __VA_ARGS__))
|
||||
#define MAP23(m, x, ...) m(x) IDENTITY(MAP22(m, __VA_ARGS__))
|
||||
#define MAP24(m, x, ...) m(x) IDENTITY(MAP23(m, __VA_ARGS__))
|
||||
#define MAP25(m, x, ...) m(x) IDENTITY(MAP24(m, __VA_ARGS__))
|
||||
#define MAP26(m, x, ...) m(x) IDENTITY(MAP25(m, __VA_ARGS__))
|
||||
#define MAP27(m, x, ...) m(x) IDENTITY(MAP26(m, __VA_ARGS__))
|
||||
#define MAP28(m, x, ...) m(x) IDENTITY(MAP27(m, __VA_ARGS__))
|
||||
#define MAP29(m, x, ...) m(x) IDENTITY(MAP28(m, __VA_ARGS__))
|
||||
#define MAP30(m, x, ...) m(x) IDENTITY(MAP29(m, __VA_ARGS__))
|
||||
#define MAP31(m, x, ...) m(x) IDENTITY(MAP30(m, __VA_ARGS__))
|
||||
#define MAP32(m, x, ...) m(x) IDENTITY(MAP31(m, __VA_ARGS__))
|
||||
#define MAP33(m, x, ...) m(x) IDENTITY(MAP32(m, __VA_ARGS__))
|
||||
#define MAP34(m, x, ...) m(x) IDENTITY(MAP33(m, __VA_ARGS__))
|
||||
#define MAP35(m, x, ...) m(x) IDENTITY(MAP34(m, __VA_ARGS__))
|
||||
#define MAP36(m, x, ...) m(x) IDENTITY(MAP35(m, __VA_ARGS__))
|
||||
#define MAP37(m, x, ...) m(x) IDENTITY(MAP36(m, __VA_ARGS__))
|
||||
#define MAP38(m, x, ...) m(x) IDENTITY(MAP37(m, __VA_ARGS__))
|
||||
#define MAP39(m, x, ...) m(x) IDENTITY(MAP38(m, __VA_ARGS__))
|
||||
#define MAP40(m, x, ...) m(x) IDENTITY(MAP39(m, __VA_ARGS__))
|
||||
#define MAP41(m, x, ...) m(x) IDENTITY(MAP40(m, __VA_ARGS__))
|
||||
#define MAP42(m, x, ...) m(x) IDENTITY(MAP41(m, __VA_ARGS__))
|
||||
#define MAP43(m, x, ...) m(x) IDENTITY(MAP42(m, __VA_ARGS__))
|
||||
#define MAP44(m, x, ...) m(x) IDENTITY(MAP43(m, __VA_ARGS__))
|
||||
#define MAP45(m, x, ...) m(x) IDENTITY(MAP44(m, __VA_ARGS__))
|
||||
#define MAP46(m, x, ...) m(x) IDENTITY(MAP45(m, __VA_ARGS__))
|
||||
#define MAP47(m, x, ...) m(x) IDENTITY(MAP46(m, __VA_ARGS__))
|
||||
#define MAP48(m, x, ...) m(x) IDENTITY(MAP47(m, __VA_ARGS__))
|
||||
#define MAP49(m, x, ...) m(x) IDENTITY(MAP48(m, __VA_ARGS__))
|
||||
#define MAP50(m, x, ...) m(x) IDENTITY(MAP49(m, __VA_ARGS__))
|
||||
#define MAP51(m, x, ...) m(x) IDENTITY(MAP50(m, __VA_ARGS__))
|
||||
#define MAP52(m, x, ...) m(x) IDENTITY(MAP51(m, __VA_ARGS__))
|
||||
#define MAP53(m, x, ...) m(x) IDENTITY(MAP52(m, __VA_ARGS__))
|
||||
#define MAP54(m, x, ...) m(x) IDENTITY(MAP53(m, __VA_ARGS__))
|
||||
#define MAP55(m, x, ...) m(x) IDENTITY(MAP54(m, __VA_ARGS__))
|
||||
#define MAP56(m, x, ...) m(x) IDENTITY(MAP55(m, __VA_ARGS__))
|
||||
#define MAP57(m, x, ...) m(x) IDENTITY(MAP56(m, __VA_ARGS__))
|
||||
#define MAP58(m, x, ...) m(x) IDENTITY(MAP57(m, __VA_ARGS__))
|
||||
#define MAP59(m, x, ...) m(x) IDENTITY(MAP58(m, __VA_ARGS__))
|
||||
#define MAP60(m, x, ...) m(x) IDENTITY(MAP59(m, __VA_ARGS__))
|
||||
#define MAP61(m, x, ...) m(x) IDENTITY(MAP60(m, __VA_ARGS__))
|
||||
#define MAP62(m, x, ...) m(x) IDENTITY(MAP61(m, __VA_ARGS__))
|
||||
#define MAP63(m, x, ...) m(x) IDENTITY(MAP62(m, __VA_ARGS__))
|
||||
#define MAP64(m, x, ...) m(x) IDENTITY(MAP63(m, __VA_ARGS__))
|
||||
#define MAP65(m, x, ...) m(x) IDENTITY(MAP64(m, __VA_ARGS__))
|
||||
#define MAP66(m, x, ...) m(x) IDENTITY(MAP65(m, __VA_ARGS__))
|
||||
#define MAP67(m, x, ...) m(x) IDENTITY(MAP66(m, __VA_ARGS__))
|
||||
#define MAP68(m, x, ...) m(x) IDENTITY(MAP67(m, __VA_ARGS__))
|
||||
#define MAP69(m, x, ...) m(x) IDENTITY(MAP68(m, __VA_ARGS__))
|
||||
#define MAP70(m, x, ...) m(x) IDENTITY(MAP69(m, __VA_ARGS__))
|
||||
#define MAP71(m, x, ...) m(x) IDENTITY(MAP70(m, __VA_ARGS__))
|
||||
#define MAP72(m, x, ...) m(x) IDENTITY(MAP71(m, __VA_ARGS__))
|
||||
#define MAP73(m, x, ...) m(x) IDENTITY(MAP72(m, __VA_ARGS__))
|
||||
#define MAP74(m, x, ...) m(x) IDENTITY(MAP73(m, __VA_ARGS__))
|
||||
#define MAP75(m, x, ...) m(x) IDENTITY(MAP74(m, __VA_ARGS__))
|
||||
#define MAP76(m, x, ...) m(x) IDENTITY(MAP75(m, __VA_ARGS__))
|
||||
#define MAP77(m, x, ...) m(x) IDENTITY(MAP76(m, __VA_ARGS__))
|
||||
#define MAP78(m, x, ...) m(x) IDENTITY(MAP77(m, __VA_ARGS__))
|
||||
#define MAP79(m, x, ...) m(x) IDENTITY(MAP78(m, __VA_ARGS__))
|
||||
#define MAP80(m, x, ...) m(x) IDENTITY(MAP79(m, __VA_ARGS__))
|
||||
#define MAP81(m, x, ...) m(x) IDENTITY(MAP80(m, __VA_ARGS__))
|
||||
#define MAP82(m, x, ...) m(x) IDENTITY(MAP81(m, __VA_ARGS__))
|
||||
#define MAP83(m, x, ...) m(x) IDENTITY(MAP82(m, __VA_ARGS__))
|
||||
#define MAP84(m, x, ...) m(x) IDENTITY(MAP83(m, __VA_ARGS__))
|
||||
#define MAP85(m, x, ...) m(x) IDENTITY(MAP84(m, __VA_ARGS__))
|
||||
#define MAP86(m, x, ...) m(x) IDENTITY(MAP85(m, __VA_ARGS__))
|
||||
#define MAP87(m, x, ...) m(x) IDENTITY(MAP86(m, __VA_ARGS__))
|
||||
#define MAP88(m, x, ...) m(x) IDENTITY(MAP87(m, __VA_ARGS__))
|
||||
#define MAP89(m, x, ...) m(x) IDENTITY(MAP88(m, __VA_ARGS__))
|
||||
#define MAP90(m, x, ...) m(x) IDENTITY(MAP89(m, __VA_ARGS__))
|
||||
#define MAP91(m, x, ...) m(x) IDENTITY(MAP90(m, __VA_ARGS__))
|
||||
#define MAP92(m, x, ...) m(x) IDENTITY(MAP91(m, __VA_ARGS__))
|
||||
#define MAP93(m, x, ...) m(x) IDENTITY(MAP92(m, __VA_ARGS__))
|
||||
#define MAP94(m, x, ...) m(x) IDENTITY(MAP93(m, __VA_ARGS__))
|
||||
#define MAP95(m, x, ...) m(x) IDENTITY(MAP94(m, __VA_ARGS__))
|
||||
#define MAP96(m, x, ...) m(x) IDENTITY(MAP95(m, __VA_ARGS__))
|
||||
#define MAP97(m, x, ...) m(x) IDENTITY(MAP96(m, __VA_ARGS__))
|
||||
#define MAP98(m, x, ...) m(x) IDENTITY(MAP97(m, __VA_ARGS__))
|
||||
#define MAP99(m, x, ...) m(x) IDENTITY(MAP98(m, __VA_ARGS__))
|
||||
#define MAP100(m, x, ...) m(x) IDENTITY(MAP99(m, __VA_ARGS__))
|
||||
|
||||
|
||||
#define EVALUATE_COUNT(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, \
|
||||
_11, _12, _13, _14, _15, _16, _17, _18, _19, _20, \
|
||||
_21, _22, _23, _24, _25, _26, _27, _28, _29, _30, \
|
||||
_31, _32, _33, _34, _35, _36, _37, _38, _39, _40, \
|
||||
_41, _42, _43, _44, _45, _46, _47, _48, _49, _50, \
|
||||
_51, _52, _53, _54, _55, _56, _57, _58, _59, _60, \
|
||||
_61, _62, _63, _64, _65, _66, _67, _68, _69, _70, \
|
||||
_71, _72, _73, _74, _75, _76, _77, _78, _79, _80, \
|
||||
_81, _82, _83, _84, _85, _86, _87, _88, _89, _90, \
|
||||
_91, _92, _93, _94, _95, _96, _97, _98, _99, _100, \
|
||||
count, ...) count
|
||||
|
||||
#define COUNT(...) \
|
||||
IDENTITY(EVALUATE_COUNT(__VA_ARGS__, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, \
|
||||
90, 89, 88, 87, 86, 85, 84, 83, 82, 81, \
|
||||
80, 79, 78, 77, 76, 75, 74, 73, 72, 71, \
|
||||
70, 69, 68, 67, 66, 65, 64, 63, 62, 61, \
|
||||
60, 59, 58, 57, 56, 55, 54, 53, 52, 51, \
|
||||
50, 49, 48, 47, 46, 45, 44, 43, 42, 41, \
|
||||
40, 39, 38, 37, 36, 35, 34, 33, 32, 31, \
|
||||
30, 29, 28, 27, 26, 25, 24, 23, 22, 21, \
|
||||
20, 19, 18, 17, 16, 15, 14, 13, 12, 11, \
|
||||
10, 9, 8, 7, 6, 5, 4, 3, 2, 1))
|
||||
|
||||
|
||||
|
||||
struct ignore_assign {
|
||||
ignore_assign(int value) : _value(value) { }
|
||||
operator int() const { return _value; }
|
||||
|
||||
const ignore_assign& operator =(int dummy) { return *this; }
|
||||
|
||||
int _value;
|
||||
};
|
||||
|
||||
#define IGNORE_ASSIGN_SINGLE(expression) (ignore_assign)expression,
|
||||
#define IGNORE_ASSIGN(...) IDENTITY(MAP(IGNORE_ASSIGN_SINGLE, __VA_ARGS__))
|
||||
|
||||
#define STRINGIZE_SINGLE(expression) #expression,
|
||||
#define STRINGIZE(...) IDENTITY(MAP(STRINGIZE_SINGLE, __VA_ARGS__))
|
||||
|
||||
|
||||
|
||||
#define ENUM(EnumName, ...) \
|
||||
struct EnumName { \
|
||||
enum _enumerated { __VA_ARGS__ }; \
|
||||
\
|
||||
_enumerated _value; \
|
||||
\
|
||||
EnumName(_enumerated value) : _value(value) { } \
|
||||
operator _enumerated() const { return _value; } \
|
||||
\
|
||||
const char* _to_string() const \
|
||||
{ \
|
||||
for (size_t index = 0; index < _count; ++index) { \
|
||||
if (_values()[index] == _value) \
|
||||
return _names()[index]; \
|
||||
} \
|
||||
\
|
||||
return NULL; \
|
||||
} \
|
||||
\
|
||||
static const size_t _count = IDENTITY(COUNT(__VA_ARGS__)); \
|
||||
\
|
||||
static const int* _values() \
|
||||
{ \
|
||||
static const int values[] = \
|
||||
{ IDENTITY(IGNORE_ASSIGN(__VA_ARGS__)) }; \
|
||||
return values; \
|
||||
} \
|
||||
\
|
||||
static const char* const* _names() \
|
||||
{ \
|
||||
static const char* const raw_names[] = \
|
||||
{ IDENTITY(STRINGIZE(__VA_ARGS__)) }; \
|
||||
\
|
||||
static char* processed_names[_count]; \
|
||||
static bool initialized = false; \
|
||||
\
|
||||
if (!initialized) { \
|
||||
for (size_t index = 0; index < _count; ++index) { \
|
||||
size_t length = \
|
||||
std::strcspn(raw_names[index], " =\t\n\r"); \
|
||||
\
|
||||
processed_names[index] = new char[length + 1]; \
|
||||
\
|
||||
strncpy( \
|
||||
processed_names[index], raw_names[index], length); \
|
||||
processed_names[index][length] = '\0'; \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
return processed_names; \
|
||||
} \
|
||||
};
|
||||
|
||||
ENUM(ValueID_Index_Alarm,
|
||||
Type_Start = 0,
|
||||
Type_End = 255,
|
||||
Type_ParamStart = 256,
|
||||
Type_ParamEnd = 511,
|
||||
Type_v1 = 512,
|
||||
Level_v1 = 513,
|
||||
AutoClearEvents = 514
|
||||
);
|
||||
ENUM(ValueID_Index_AssociationCommandConfiguration,
|
||||
MaxCommandLength = 0,
|
||||
CommandsAreValues = 1,
|
||||
CommandsAreConfigurable = 2,
|
||||
NumFreeCommands = 3,
|
||||
MaxCommands = 4
|
||||
);
|
||||
ENUM(ValueID_Index_BarrierOperator,
|
||||
Command = 0,
|
||||
Label = 1,
|
||||
SupportedSignals = 2,
|
||||
Audible = 3,
|
||||
Visual = 4
|
||||
);
|
||||
ENUM(ValueID_Index_Basic,
|
||||
Set = 0
|
||||
);
|
||||
ENUM(ValueID_Index_BasicWindowCovering,
|
||||
Open = 0,
|
||||
Close = 1
|
||||
);
|
||||
ENUM(ValueID_Index_Battery,
|
||||
Level = 0
|
||||
);
|
||||
ENUM(ValueID_Index_CentralScene,
|
||||
Start = 1,
|
||||
End = 255,
|
||||
SceneCount = 256,
|
||||
ClearSceneTimeout = 257
|
||||
);
|
||||
ENUM(ValueID_Index_ClimateControlSchedule,
|
||||
DOW_Monday = 1,
|
||||
DOW_Tuesday = 2,
|
||||
DOW_Wednesday = 3,
|
||||
DOW_Thursday = 4,
|
||||
DOW_Friday = 5,
|
||||
DOW_Saturday = 6,
|
||||
DOW_Sunday = 7,
|
||||
OverrideState = 8,
|
||||
OverrideSetback = 9
|
||||
);
|
||||
ENUM(ValueID_Index_Clock,
|
||||
Day = 0,
|
||||
Hour = 1,
|
||||
Minute = 2
|
||||
);
|
||||
ENUM(ValueID_Index_Color,
|
||||
Color = 0,
|
||||
Index = 1,
|
||||
Channels_Capabilities = 2,
|
||||
Duration = 4
|
||||
);
|
||||
ENUM(ValueID_Index_Configuration,
|
||||
Param_Start = 0,
|
||||
Param_End = 255
|
||||
);
|
||||
ENUM(ValueID_Index_ControllerReplication,
|
||||
NodeId = 0,
|
||||
Function = 1,
|
||||
Replicate = 2
|
||||
);
|
||||
ENUM(ValueID_Index_DoorLock,
|
||||
Lock = 0,
|
||||
Lock_Mode = 1,
|
||||
System_Config_Mode = 2,
|
||||
System_Config_Minutes = 3,
|
||||
System_Config_Seconds = 4,
|
||||
System_Config_OutsideHandles = 5,
|
||||
System_Config_InsideHandles = 6
|
||||
);
|
||||
ENUM(ValueID_Index_DoorLockLogging,
|
||||
System_Config_MaxRecords = 0,
|
||||
GetRecordNo = 1,
|
||||
LogRecord = 2
|
||||
);
|
||||
ENUM(ValueID_Index_EnergyProduction,
|
||||
Instant = 0,
|
||||
Total = 1,
|
||||
Today = 2,
|
||||
Time = 3
|
||||
);
|
||||
ENUM(ValueID_Index_Indicator,
|
||||
Indicator = 0
|
||||
);
|
||||
ENUM(ValueID_Index_Language,
|
||||
Language = 0,
|
||||
Country = 1
|
||||
);
|
||||
ENUM(ValueID_Index_Lock,
|
||||
Locked = 0
|
||||
);
|
||||
ENUM(ValueID_Index_ManufacturerProprietary,
|
||||
FibaroVenetianBlinds_Blinds = 0,
|
||||
FibaroVenetianBlinds_Tilt = 1
|
||||
);
|
||||
ENUM(ValueID_Index_ManufacturerSpecific,
|
||||
LoadedConfig = 0,
|
||||
LocalConfig = 1,
|
||||
LatestConfig = 2,
|
||||
DeviceID = 3,
|
||||
SerialNumber = 4
|
||||
);
|
||||
ENUM(ValueID_Index_Meter,
|
||||
Start = 0,
|
||||
End = 31,
|
||||
Exporting = 32,
|
||||
Reset = 33
|
||||
);
|
||||
ENUM(ValueID_Index_MeterPulse,
|
||||
Count = 0
|
||||
);
|
||||
ENUM(ValueID_Index_PowerLevel,
|
||||
Powerlevel = 0,
|
||||
Timeout = 1,
|
||||
Set = 2,
|
||||
TestNode = 3,
|
||||
TestPowerlevel = 4,
|
||||
TestFrames = 5,
|
||||
Test = 6,
|
||||
Report = 7,
|
||||
TestStatus = 8,
|
||||
TestAckFrames = 9
|
||||
);
|
||||
ENUM(ValueID_Index_Protection,
|
||||
Protection = 0
|
||||
);
|
||||
ENUM(ValueID_Index_SceneActivation,
|
||||
SceneID = 0,
|
||||
Duration = 1
|
||||
);
|
||||
ENUM(ValueID_Index_Security,
|
||||
Secured = 0
|
||||
);
|
||||
ENUM(ValueID_Index_SensorAlarm,
|
||||
Start = 0,
|
||||
End = 255
|
||||
);
|
||||
ENUM(ValueID_Index_SensorBinary,
|
||||
Sensor = 0,
|
||||
Start = 1,
|
||||
End = 255
|
||||
);
|
||||
ENUM(ValueID_Index_SensorMultiLevel,
|
||||
Start = 0,
|
||||
End = 255
|
||||
);
|
||||
ENUM(ValueID_Index_SimpleAV,
|
||||
Command = 0
|
||||
);
|
||||
ENUM(ValueID_Index_SoundSwitch,
|
||||
Tone_Count = 0,
|
||||
Tones = 1,
|
||||
Volume = 2,
|
||||
Default_Tone = 3
|
||||
);
|
||||
ENUM(ValueID_Index_SwitchAll,
|
||||
SwitchAll = 0
|
||||
);
|
||||
ENUM(ValueID_Index_SwitchBinary,
|
||||
Level = 0,
|
||||
TargetState = 1,
|
||||
Duration = 2
|
||||
);
|
||||
ENUM(ValueID_Index_SwitchMultiLevel,
|
||||
Level = 0,
|
||||
Bright = 1,
|
||||
Dim = 2,
|
||||
IgnoreStartLevel = 3,
|
||||
StartLevel = 4,
|
||||
Duration = 5,
|
||||
Step = 6,
|
||||
Inc = 7,
|
||||
Dec = 8,
|
||||
TargetValue = 9
|
||||
);
|
||||
ENUM(ValueID_Index_SwitchToggleBinary,
|
||||
ToggleSwitch = 0
|
||||
);
|
||||
ENUM(ValueID_Index_SwitchToggleMultilevel,
|
||||
Level = 0
|
||||
);
|
||||
ENUM(ValueID_Index_ThermostatFanMode,
|
||||
FanMode = 0
|
||||
);
|
||||
ENUM(ValueID_Index_ThermostatFanState,
|
||||
FanState = 0
|
||||
);
|
||||
ENUM(ValueID_Index_ThermostatMode,
|
||||
Mode = 0
|
||||
);
|
||||
ENUM(ValueID_Index_ThermostatOperatingState,
|
||||
OperatingState = 0
|
||||
);
|
||||
ENUM(ValueID_Index_ThermostatSetpoint,
|
||||
Start = 0,
|
||||
End = 255
|
||||
);
|
||||
ENUM(ValueID_Index_TimeParameters,
|
||||
Date = 0,
|
||||
Time = 1,
|
||||
Set = 2,
|
||||
Refresh = 3
|
||||
);
|
||||
ENUM(ValueID_Index_UserCode,
|
||||
Start = 1,
|
||||
End = 254,
|
||||
Refresh = 255,
|
||||
RemoveCode = 256,
|
||||
Count = 257,
|
||||
RawValue = 258,
|
||||
RawValueIndex = 259
|
||||
);
|
||||
ENUM(ValueID_Index_Version,
|
||||
Library = 0,
|
||||
Protocol = 1,
|
||||
Application = 2
|
||||
);
|
||||
ENUM(ValueID_Index_WakeUp,
|
||||
Interval = 0,
|
||||
Min_Interval = 1,
|
||||
Max_Interval = 2,
|
||||
Default_Interval = 3,
|
||||
Interval_Step = 4
|
||||
);
|
||||
ENUM(ValueID_Index_ZWavePlusInfo,
|
||||
Version = 0,
|
||||
InstallerIcon = 1,
|
||||
UserIcon = 2
|
||||
);
|
||||
}
|
||||
#endif
|
3216
cpp/src/ValueIDIndexesDefines.def
Normal file
3216
cpp/src/ValueIDIndexesDefines.def
Normal file
File diff suppressed because it is too large
Load diff
160
cpp/src/ValueIDIndexesDefines.h
Normal file
160
cpp/src/ValueIDIndexesDefines.h
Normal file
File diff suppressed because one or more lines are too long
|
@ -422,7 +422,7 @@ bool Meter::HandleReport
|
|||
}
|
||||
}
|
||||
|
||||
if( ValueDecimal* value = static_cast<ValueDecimal*>( GetValue( _instance, ValueID_Index_Meter::Start ) ) )
|
||||
if( ValueDecimal* value = static_cast<ValueDecimal*>( GetValue( _instance, ValueID_Index_Meter::Meter_1 ) ) )
|
||||
{
|
||||
Log::Write( LogLevel_Info, GetNodeId(), "Received Meter report from node %d: %s=%s%s", GetNodeId(), label.c_str(), valueStr.c_str(), units.c_str() );
|
||||
value->SetLabel( label );
|
||||
|
@ -549,6 +549,6 @@ void Meter::CreateVars
|
|||
{
|
||||
if( Node* node = GetNodeUnsafe() )
|
||||
{
|
||||
node->CreateValueDecimal( ValueID::ValueGenre_User, GetCommandClassId(), _instance, ValueID_Index_Meter::Start, "Unknown", "", true, false, "0.0", 0 );
|
||||
node->CreateValueDecimal( ValueID::ValueGenre_User, GetCommandClassId(), _instance, ValueID_Index_Meter::Meter_1, "Unknown", "", true, false, "0.0", 0 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -182,7 +182,7 @@ bool SensorBinary::HandleMsg
|
|||
{
|
||||
Log::Write( LogLevel_Info, GetNodeId(), "Received SensorBinary report: State=%s", _data[1] ? "On" : "Off" );
|
||||
|
||||
if( ValueBool* value = static_cast<ValueBool*>( GetValue( _instance, ValueID_Index_SensorBinary::Sensor ) ) )
|
||||
if( ValueBool* value = static_cast<ValueBool*>( GetValue( _instance, ValueID_Index_SensorBinary::Sensor_1 ) ) )
|
||||
{
|
||||
value->OnValueRefreshed( _data[1] != 0 );
|
||||
value->Release();
|
||||
|
@ -238,6 +238,6 @@ void SensorBinary::CreateVars
|
|||
{
|
||||
if( Node* node = GetNodeUnsafe() )
|
||||
{
|
||||
node->CreateValueBool( ValueID::ValueGenre_User, GetCommandClassId(), _instance, ValueID_Index_SensorBinary::Sensor, "Sensor", "", true, false, false, 0 );
|
||||
node->CreateValueBool( ValueID::ValueGenre_User, GetCommandClassId(), _instance, ValueID_Index_SensorBinary::Sensor_1, "Sensor", "", true, false, false, 0 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,78 +46,7 @@ enum SensorMultilevelCmd
|
|||
SensorMultilevelCmd_Report = 0x05
|
||||
};
|
||||
|
||||
enum SensorType
|
||||
{
|
||||
SensorType_Temperature = 1,
|
||||
SensorType_General, /* deprecated by v11 */
|
||||
SensorType_Luminance,
|
||||
SensorType_Power,
|
||||
SensorType_RelativeHumidity,
|
||||
SensorType_Velocity,
|
||||
SensorType_Direction,
|
||||
SensorType_AtmosphericPressure,
|
||||
SensorType_BarometricPressure,
|
||||
SensorType_SolarRadiation,
|
||||
SensorType_DewPoint,
|
||||
SensorType_RainRate,
|
||||
SensorType_TideLevel,
|
||||
SensorType_Weight,
|
||||
SensorType_Voltage,
|
||||
SensorType_Current,
|
||||
SensorType_CO2,
|
||||
SensorType_AirFlow,
|
||||
SensorType_TankCapacity,
|
||||
SensorType_Distance,
|
||||
SensorType_AnglePosition,
|
||||
SensorType_Rotation,
|
||||
SensorType_WaterTemperature,
|
||||
SensorType_SoilTemperature,
|
||||
SensorType_SeismicIntensity,
|
||||
SensorType_SeismicMagnitude,
|
||||
SensorType_Ultraviolet,
|
||||
SensorType_ElectricalResistivity,
|
||||
SensorType_ElectricalConductivity,
|
||||
SensorType_Loudness,
|
||||
SensorType_Moisture,
|
||||
SensorType_Frequency,
|
||||
SensorType_Time,
|
||||
SensorType_TargetTemperature,
|
||||
SensorType_PM25,
|
||||
SensorType_CH2O,
|
||||
SensorType_RadonConcentration,
|
||||
SensorType_CH4Density,
|
||||
SensorType_VOC,
|
||||
SensorType_CO,
|
||||
SensorType_SoilHumidity,
|
||||
SensorType_SoilReactivity,
|
||||
SensorType_SoilSalinity,
|
||||
SensorType_HeartRate,
|
||||
SensorType_BloodPressure,
|
||||
SensorType_MuscleMass,
|
||||
SensorType_FatMass,
|
||||
SensorType_BoneMass,
|
||||
SensorType_TBW,
|
||||
SensorType_BMR,
|
||||
SensorType_BMI,
|
||||
SensorType_AccelerationX,
|
||||
SensorType_AccelerationY,
|
||||
SensorType_AccelerationZ,
|
||||
SensorType_SmokeDensity,
|
||||
SensorType_WaterFlow,
|
||||
SensorType_WaterPressure,
|
||||
SensorType_RFSignalStrength,
|
||||
SensorType_PM10,
|
||||
SensorType_RespiratoryRate,
|
||||
SensorType_RelativeModulationLevel,
|
||||
SensorType_BoilerWaterTemperature,
|
||||
SensorType_DHWTemperature,
|
||||
SensorType_OutsideTemperature,
|
||||
SensorType_ExhaustTemperature,
|
||||
SensorType_WaterChlorineLevel,
|
||||
SensorType_WaterAcidity,
|
||||
SensorType_WaterOxidation,
|
||||
SensorType_MaxType
|
||||
};
|
||||
#define MaxSensorTypes (ValueID_Index_SensorMultiLevel::WaterOxidation +1)
|
||||
|
||||
static char const* c_sensorTypeNames[] =
|
||||
{
|
||||
|
@ -310,7 +239,7 @@ bool SensorMultilevel::RequestValue
|
|||
}
|
||||
else
|
||||
{
|
||||
for( uint8 i = 1; i < SensorType_MaxType; i++ )
|
||||
for( uint8 i = 1; i < MaxSensorTypes; i++ )
|
||||
{
|
||||
Value* value = GetValue( _instance, i );
|
||||
if( value != NULL )
|
||||
|
@ -358,7 +287,7 @@ bool SensorMultilevel::HandleMsg
|
|||
if( msg != "" )
|
||||
msg += ", ";
|
||||
uint8 index = ( ( i - 1 ) * 8 ) + j + 1;
|
||||
if (index >= SensorType_MaxType) /* max size for c_sensorTypeNames */
|
||||
if (index >= MaxSensorTypes) /* max size for c_sensorTypeNames */
|
||||
{
|
||||
Log::Write (LogLevel_Warning, GetNodeId(), "SensorType Value was greater than range. Dropping");
|
||||
continue;
|
||||
|
@ -388,25 +317,25 @@ bool SensorMultilevel::HandleMsg
|
|||
char const* units = "";
|
||||
switch( sensorType )
|
||||
{
|
||||
case SensorType_Temperature: units = scale ? "F" : "C"; break;
|
||||
case SensorType_General: units = scale ? "" : "%"; break;
|
||||
case SensorType_Luminance: units = scale ? "lux" : "%"; break;
|
||||
case SensorType_Power: units = scale ? "BTU/h" : "W"; break;
|
||||
case SensorType_RelativeHumidity: units = scale ? "" : "%"; break;
|
||||
case SensorType_Velocity: units = scale ? "mph" : "m/s"; break;
|
||||
case SensorType_Direction: units = ""; break;
|
||||
case SensorType_AtmosphericPressure: units = scale ? "inHg" : "kPa"; break;
|
||||
case SensorType_BarometricPressure: units = scale ? "inHg" : "kPa"; break;
|
||||
case SensorType_SolarRadiation: units = "W/m2"; break;
|
||||
case SensorType_DewPoint: units = scale ? "F" : "C"; break;
|
||||
case SensorType_RainRate: units = scale ? "in/h" : "mm/h"; break;
|
||||
case SensorType_TideLevel: units = scale ? "ft" : "m"; break;
|
||||
case SensorType_Weight: units = scale ? "lb" : "kg"; break;
|
||||
case SensorType_Voltage: units = scale ? "mV" : "V"; break;
|
||||
case SensorType_Current: units = scale ? "mA" : "A"; break;
|
||||
case SensorType_CO2: units = "ppm"; break;
|
||||
case SensorType_AirFlow: units = scale ? "cfm" : "m3/h"; break;
|
||||
case SensorType_TankCapacity: {
|
||||
case ValueID_Index_SensorMultiLevel::Temperature: units = scale ? "F" : "C"; break;
|
||||
case ValueID_Index_SensorMultiLevel::General: units = scale ? "" : "%"; break;
|
||||
case ValueID_Index_SensorMultiLevel::Luminance: units = scale ? "lux" : "%"; break;
|
||||
case ValueID_Index_SensorMultiLevel::Power: units = scale ? "BTU/h" : "W"; break;
|
||||
case ValueID_Index_SensorMultiLevel::RelativeHumidity: units = scale ? "" : "%"; break;
|
||||
case ValueID_Index_SensorMultiLevel::Velocity: units = scale ? "mph" : "m/s"; break;
|
||||
case ValueID_Index_SensorMultiLevel::Direction: units = ""; break;
|
||||
case ValueID_Index_SensorMultiLevel::AtmosphericPressure: units = scale ? "inHg" : "kPa"; break;
|
||||
case ValueID_Index_SensorMultiLevel::BarometricPressure: units = scale ? "inHg" : "kPa"; break;
|
||||
case ValueID_Index_SensorMultiLevel::SolarRadiation: units = "W/m2"; break;
|
||||
case ValueID_Index_SensorMultiLevel::DewPoint: units = scale ? "F" : "C"; break;
|
||||
case ValueID_Index_SensorMultiLevel::RainRate: units = scale ? "in/h" : "mm/h"; break;
|
||||
case ValueID_Index_SensorMultiLevel::TideLevel: units = scale ? "ft" : "m"; break;
|
||||
case ValueID_Index_SensorMultiLevel::Weight: units = scale ? "lb" : "kg"; break;
|
||||
case ValueID_Index_SensorMultiLevel::Voltage: units = scale ? "mV" : "V"; break;
|
||||
case ValueID_Index_SensorMultiLevel::Current: units = scale ? "mA" : "A"; break;
|
||||
case ValueID_Index_SensorMultiLevel::CO2: units = "ppm"; break;
|
||||
case ValueID_Index_SensorMultiLevel::AirFlow: units = scale ? "cfm" : "m3/h"; break;
|
||||
case ValueID_Index_SensorMultiLevel::TankCapacity: {
|
||||
if (scale > 2) /* size of c_tankCapcityUnits minus invalid */
|
||||
{
|
||||
Log::Write (LogLevel_Warning, GetNodeId(), "Scale Value for c_tankCapcityUnits was greater than range. Setting to empty");
|
||||
|
@ -418,7 +347,7 @@ bool SensorMultilevel::HandleMsg
|
|||
}
|
||||
}
|
||||
break;
|
||||
case SensorType_Distance: {
|
||||
case ValueID_Index_SensorMultiLevel::Distance: {
|
||||
if (scale > 2) /* size of c_distanceUnits minus invalid */
|
||||
{
|
||||
Log::Write (LogLevel_Warning, GetNodeId(), "Scale Value for c_distanceUnits was greater than range. Setting to empty");
|
||||
|
@ -430,7 +359,7 @@ bool SensorMultilevel::HandleMsg
|
|||
}
|
||||
}
|
||||
break;
|
||||
case SensorType_AnglePosition: {
|
||||
case ValueID_Index_SensorMultiLevel::AnglePosition: {
|
||||
if (scale > 2) /* size of c_anglePositionUnits minus invalid */
|
||||
{
|
||||
Log::Write (LogLevel_Warning, GetNodeId(), "Scale Value for c_anglePositionUnits was greater than range. Setting to empty");
|
||||
|
@ -442,10 +371,10 @@ bool SensorMultilevel::HandleMsg
|
|||
}
|
||||
}
|
||||
break;
|
||||
case SensorType_Rotation: units = scale ? "hz" : "rpm"; break;
|
||||
case SensorType_WaterTemperature: units = scale ? "F" : "C"; break;
|
||||
case SensorType_SoilTemperature: units = scale ? "F" : "C"; break;
|
||||
case SensorType_SeismicIntensity: {
|
||||
case ValueID_Index_SensorMultiLevel::Rotation: units = scale ? "hz" : "rpm"; break;
|
||||
case ValueID_Index_SensorMultiLevel::WaterTemperature: units = scale ? "F" : "C"; break;
|
||||
case ValueID_Index_SensorMultiLevel::SoilTemperature: units = scale ? "F" : "C"; break;
|
||||
case ValueID_Index_SensorMultiLevel::SeismicIntensity: {
|
||||
if (scale > 3) /* size of c_seismicIntensityUnits minus invalid */
|
||||
{
|
||||
Log::Write (LogLevel_Warning, GetNodeId(), "Scale Value for c_seismicIntensityUnits was greater than range. Setting to empty");
|
||||
|
@ -457,7 +386,7 @@ bool SensorMultilevel::HandleMsg
|
|||
}
|
||||
}
|
||||
break;
|
||||
case SensorType_SeismicMagnitude: {
|
||||
case ValueID_Index_SensorMultiLevel::SeismicMagnitude: {
|
||||
if (scale > 3) /* size of c_seismicMagnitudeUnits minus invalid */
|
||||
{
|
||||
Log::Write (LogLevel_Warning, GetNodeId(), "Scale Value for c_seismicMagnitudeUnits was greater than range. Setting to empty");
|
||||
|
@ -469,11 +398,11 @@ bool SensorMultilevel::HandleMsg
|
|||
}
|
||||
}
|
||||
break;
|
||||
case SensorType_Ultraviolet: units = ""; break;
|
||||
case SensorType_ElectricalResistivity: units = "ohm"; break;
|
||||
case SensorType_ElectricalConductivity: units = "siemens/m"; break;
|
||||
case SensorType_Loudness: units = scale ? "dBA" : "db"; break;
|
||||
case SensorType_Moisture: {
|
||||
case ValueID_Index_SensorMultiLevel::Ultraviolet: units = ""; break;
|
||||
case ValueID_Index_SensorMultiLevel::ElectricalResistivity: units = "ohm"; break;
|
||||
case ValueID_Index_SensorMultiLevel::ElectricalConductivity: units = "siemens/m"; break;
|
||||
case ValueID_Index_SensorMultiLevel::Loudness: units = scale ? "dBA" : "db"; break;
|
||||
case ValueID_Index_SensorMultiLevel::Moisture: {
|
||||
if (scale > 3) /* size of c_moistureUnits minus invalid */
|
||||
{
|
||||
Log::Write (LogLevel_Warning, GetNodeId(), "Scale Value for c_moistureUnits was greater than range. Setting to empty");
|
||||
|
@ -485,43 +414,43 @@ bool SensorMultilevel::HandleMsg
|
|||
}
|
||||
}
|
||||
break;
|
||||
case SensorType_Frequency: units = scale ? "kHz" : "Hz"; break;
|
||||
case SensorType_Time: units = "s"; break;
|
||||
case SensorType_TargetTemperature: units = scale ? "F" : "C"; break;
|
||||
case SensorType_PM25: units = scale ? "ug/m3" : "mol/m3"; break;
|
||||
case SensorType_CH2O: units = "mol/m3"; break;
|
||||
case SensorType_RadonConcentration: units = scale ? "pCi/l" : "bq/m3"; break;
|
||||
case SensorType_CH4Density: units = "mol/m3"; break;
|
||||
case SensorType_VOC: units = scale ? "ppm" : "mol/m3"; break;
|
||||
case SensorType_CO: units = scale ? "ppm" : "mol/m3"; break;
|
||||
case SensorType_SoilHumidity: units = "%"; break;
|
||||
case SensorType_SoilReactivity: units = "pH"; break;
|
||||
case SensorType_SoilSalinity: units = "mol/m3"; break;
|
||||
case SensorType_HeartRate: units = "bpm"; break;
|
||||
case SensorType_BloodPressure: units = scale ? "mmHg (Diastollic)" : "mmHg (Systollic)"; break;
|
||||
case SensorType_MuscleMass: units = "kg"; break;
|
||||
case SensorType_FatMass: units = "kg"; break;
|
||||
case SensorType_BoneMass: units = "kg"; break;
|
||||
case SensorType_TBW: units = "kg"; break;
|
||||
case SensorType_BMR: units = "J"; break;
|
||||
case SensorType_BMI: units = ""; break;
|
||||
case SensorType_AccelerationX: units = "m/s2"; break;
|
||||
case SensorType_AccelerationY: units = "m/s2"; break;
|
||||
case SensorType_AccelerationZ: units = "m/s2"; break;
|
||||
case SensorType_SmokeDensity: units = "%"; break;
|
||||
case SensorType_WaterFlow: units = "l/h"; break;
|
||||
case SensorType_WaterPressure: units = "kPa"; break;
|
||||
case SensorType_RFSignalStrength: units = scale ? "dBm" : "% (RSSI)"; break;
|
||||
case SensorType_PM10: units = scale ? "ug/m3" : "mol/m3"; break;
|
||||
case SensorType_RespiratoryRate: units = "bpm"; break;
|
||||
case SensorType_RelativeModulationLevel: units = "%"; break;
|
||||
case SensorType_BoilerWaterTemperature: units = "C"; break;
|
||||
case SensorType_DHWTemperature: units = "C"; break;
|
||||
case SensorType_OutsideTemperature: units = "C"; break;
|
||||
case SensorType_ExhaustTemperature: units = "C"; break;
|
||||
case SensorType_WaterChlorineLevel: units = "mg/l"; break;
|
||||
case SensorType_WaterAcidity: units = "pH"; break;
|
||||
case SensorType_WaterOxidation: units = "mV"; break;
|
||||
case ValueID_Index_SensorMultiLevel::Frequency: units = scale ? "kHz" : "Hz"; break;
|
||||
case ValueID_Index_SensorMultiLevel::Time: units = "s"; break;
|
||||
case ValueID_Index_SensorMultiLevel::TargetTemperature: units = scale ? "F" : "C"; break;
|
||||
case ValueID_Index_SensorMultiLevel::PM25: units = scale ? "ug/m3" : "mol/m3"; break;
|
||||
case ValueID_Index_SensorMultiLevel::CH2O: units = "mol/m3"; break;
|
||||
case ValueID_Index_SensorMultiLevel::RadonConcentration: units = scale ? "pCi/l" : "bq/m3"; break;
|
||||
case ValueID_Index_SensorMultiLevel::CH4Density: units = "mol/m3"; break;
|
||||
case ValueID_Index_SensorMultiLevel::VOC: units = scale ? "ppm" : "mol/m3"; break;
|
||||
case ValueID_Index_SensorMultiLevel::CO: units = scale ? "ppm" : "mol/m3"; break;
|
||||
case ValueID_Index_SensorMultiLevel::SoilHumidity: units = "%"; break;
|
||||
case ValueID_Index_SensorMultiLevel::SoilReactivity: units = "pH"; break;
|
||||
case ValueID_Index_SensorMultiLevel::SoilSalinity: units = "mol/m3"; break;
|
||||
case ValueID_Index_SensorMultiLevel::HeartRate: units = "bpm"; break;
|
||||
case ValueID_Index_SensorMultiLevel::BloodPressure: units = scale ? "mmHg (Diastollic)" : "mmHg (Systollic)"; break;
|
||||
case ValueID_Index_SensorMultiLevel::MuscleMass: units = "kg"; break;
|
||||
case ValueID_Index_SensorMultiLevel::FatMass: units = "kg"; break;
|
||||
case ValueID_Index_SensorMultiLevel::BoneMass: units = "kg"; break;
|
||||
case ValueID_Index_SensorMultiLevel::TBW: units = "kg"; break;
|
||||
case ValueID_Index_SensorMultiLevel::BMR: units = "J"; break;
|
||||
case ValueID_Index_SensorMultiLevel::BMI: units = ""; break;
|
||||
case ValueID_Index_SensorMultiLevel::AccelerationX: units = "m/s2"; break;
|
||||
case ValueID_Index_SensorMultiLevel::AccelerationY: units = "m/s2"; break;
|
||||
case ValueID_Index_SensorMultiLevel::AccelerationZ: units = "m/s2"; break;
|
||||
case ValueID_Index_SensorMultiLevel::SmokeDensity: units = "%"; break;
|
||||
case ValueID_Index_SensorMultiLevel::WaterFlow: units = "l/h"; break;
|
||||
case ValueID_Index_SensorMultiLevel::WaterPressure: units = "kPa"; break;
|
||||
case ValueID_Index_SensorMultiLevel::RFSignalStrength: units = scale ? "dBm" : "% (RSSI)"; break;
|
||||
case ValueID_Index_SensorMultiLevel::PM10: units = scale ? "ug/m3" : "mol/m3"; break;
|
||||
case ValueID_Index_SensorMultiLevel::RespiratoryRate: units = "bpm"; break;
|
||||
case ValueID_Index_SensorMultiLevel::RelativeModulationLevel: units = "%"; break;
|
||||
case ValueID_Index_SensorMultiLevel::BoilerWaterTemperature: units = "C"; break;
|
||||
case ValueID_Index_SensorMultiLevel::DHWTemperature: units = "C"; break;
|
||||
case ValueID_Index_SensorMultiLevel::OutsideTemperature: units = "C"; break;
|
||||
case ValueID_Index_SensorMultiLevel::ExhaustTemperature: units = "C"; break;
|
||||
case ValueID_Index_SensorMultiLevel::WaterChlorineLevel: units = "mg/l"; break;
|
||||
case ValueID_Index_SensorMultiLevel::WaterAcidity: units = "pH"; break;
|
||||
case ValueID_Index_SensorMultiLevel::WaterOxidation: units = "mV"; break;
|
||||
default: {
|
||||
Log::Write (LogLevel_Warning, GetNodeId(), "sensorType Value was greater than range. Dropping");
|
||||
return false;
|
||||
|
|
|
@ -50,29 +50,7 @@ enum ThermostatSetpointCmd
|
|||
ThermostatSetpointCmd_CapabilitiesReport = 0x0A
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
ThermostatSetpoint_Unused0 = 0,
|
||||
ThermostatSetpoint_Heating1,
|
||||
ThermostatSetpoint_Cooling1,
|
||||
ThermostatSetpoint_Unused3,
|
||||
ThermostatSetpoint_Unused4,
|
||||
ThermostatSetpoint_Unused5,
|
||||
ThermostatSetpoint_Unused6,
|
||||
ThermostatSetpoint_Furnace,
|
||||
ThermostatSetpoint_DryAir,
|
||||
ThermostatSetpoint_MoistAir,
|
||||
ThermostatSetpoint_AutoChangeover,
|
||||
ThermostatSetpoint_HeatingEcon,
|
||||
ThermostatSetpoint_CoolingEcon,
|
||||
ThermostatSetpoint_AwayHeating,
|
||||
ThermostatSetpoint_CoolingHeating,
|
||||
ThermostatSetpoint_Count,
|
||||
|
||||
ThermostatSetpoint_Minimum = 100,
|
||||
ThermostatSetpoint_Maximum = 200
|
||||
};
|
||||
|
||||
#define ThermostatSetpoint_Count (ValueID_Index_ThermostatSetpoint::CoolingHeating + 1)
|
||||
|
||||
static char const* c_setpointName[] =
|
||||
{
|
||||
|
@ -302,8 +280,8 @@ bool ThermostatSetpoint::HandleMsg
|
|||
{
|
||||
string setpointName = c_setpointName[index];
|
||||
|
||||
node->CreateValueDecimal( ValueID::ValueGenre_User, GetCommandClassId(), _instance, ThermostatSetpoint_Minimum + index, setpointName + "_minimum", "C", false, false, minValue, 0 );
|
||||
node->CreateValueDecimal( ValueID::ValueGenre_User, GetCommandClassId(), _instance, ThermostatSetpoint_Maximum + index, setpointName + "_maximum", "C", false, false, maxValue, 0 );
|
||||
node->CreateValueDecimal( ValueID::ValueGenre_User, GetCommandClassId(), _instance, ValueID_Index_ThermostatSetpoint::Unused_0_Minimum + index, setpointName + "_minimum", "C", false, false, minValue, 0 );
|
||||
node->CreateValueDecimal( ValueID::ValueGenre_User, GetCommandClassId(), _instance, ValueID_Index_ThermostatSetpoint::Unused_0_Maximum + index, setpointName + "_maximum", "C", false, false, maxValue, 0 );
|
||||
Log::Write( LogLevel_Info, GetNodeId(), " Added setpoint: %s", setpointName.c_str() );
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifdef USE_HID
|
||||
|
||||
#include "Msg.h"
|
||||
#include "platform/Thread.h"
|
||||
|
@ -33,8 +32,9 @@
|
|||
#include "platform/Log.h"
|
||||
#include "platform/TimeStamp.h"
|
||||
#include "platform/HidController.h"
|
||||
#include "hidapi.h"
|
||||
|
||||
#ifdef USE_HID
|
||||
#include "hidapi.h"
|
||||
|
||||
#define CHECK_HIDAPI_RESULT(RESULT, ERRORLABEL) if (RESULT < 0) goto ERRORLABEL
|
||||
#define PACKET_BUFFER_LENGTH 256
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
#include "platform/Controller.h"
|
||||
|
||||
|
||||
#ifdef USE_HID
|
||||
|
||||
struct hid_device_;
|
||||
|
||||
typedef struct hid_device_ hid_device;
|
||||
|
@ -151,5 +153,7 @@ namespace OpenZWave
|
|||
|
||||
} // namespace OpenZWave
|
||||
|
||||
#endif
|
||||
|
||||
#endif //_HidController_H
|
||||
|
||||
|
|
|
@ -30,8 +30,9 @@
|
|||
|
||||
#include <string>
|
||||
#include <assert.h>
|
||||
#include "Defs.h"
|
||||
|
||||
#include "ValueIDIndexes.h"
|
||||
#include "Defs.h"
|
||||
|
||||
class TiXmlElement;
|
||||
|
||||
|
|
4
dist/openzwave.spec
vendored
4
dist/openzwave.spec
vendored
|
@ -3,7 +3,7 @@
|
|||
%endif
|
||||
|
||||
Name: openzwave
|
||||
Version: 1.6.163
|
||||
Version: 1.6.201
|
||||
Release: 1.0%{?dist}
|
||||
Summary: Sample Executables for OpenZWave
|
||||
URL: http://www.openzwave.net
|
||||
|
@ -134,7 +134,7 @@ getent group zwave >/dev/null || groupadd -f -r zwave
|
|||
|
||||
|
||||
%changelog
|
||||
* Wed May 08 2019 Justin Hammond <justin@dynam.ac> - 1.6.163
|
||||
* Wed May 08 2019 Justin Hammond <justin@dynam.ac> - 1.6.201
|
||||
- Update to new release of OpenZwave - 1.6
|
||||
|
||||
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.0-0.20180624git1e36dcc.0
|
||||
|
|
Loading…
Add table
Reference in a new issue