Permalink
Browse files

some spring-time refactoring...

  • Loading branch information...
1 parent bba4bd3 commit 68613139bdb84c5f037fb3abe1ca756e6b99af86 @ekarak ekarak committed Mar 16, 2013
View
8 INSTALL.txt
@@ -0,0 +1,8 @@
+(this will worl on Debian 6, you have to adjust according to your distro)
+
+sudo apt-get install ruby1.9.1-dev gccxml libxml2-dev libxslt-dev
+sudo apt-get install libboost1.42-dev libboost_system1.42-dev libboost_thread1.42-dev lib libboost-filesystem1.42-dev libboost-program-options1.42-dev
+
+sudo gem1.9.1 install mongrel --pre
+sudo gem1.9.1 install rspec
+sudo gem1.9.1 install rbgccxml
View
16 Main.cpp
@@ -28,7 +28,7 @@ for more information on the LGPL, see:
//
#include "RemoteManager.h"
-#include <protocol/TBinaryProtocol.h>
+#include <protocol/TJSONProtocol.h>
#include <server/TSimpleServer.h>
#include <transport/TServerSocket.h>
#include <transport/TBufferTransports.h>
@@ -44,6 +44,9 @@ for more information on the LGPL, see:
// alse we're using boost's filesystem classes
#include <boost/filesystem.hpp>
#include <boost/lexical_cast.hpp>
+#include <boost/exception/info.hpp>
+
+typedef boost::error_info<struct tag_stack_str,std::string> stack_info;
namespace po = boost::program_options;
namespace fs = boost::filesystem;
@@ -85,7 +88,7 @@ static bool g_initFailed = false;
static boost::condition_variable initCond ;
static boost::mutex initMutex;
-// Stromp client
+// Stomp client
#include "BoostStomp.hpp"
static STOMP::BoostStomp* stomp_client;
static string* notifications_topic = new string("/queue/zwave/monitor");
@@ -416,7 +419,6 @@ int main(int argc, char *argv[]) {
// Add a Z-Wave Driver
Manager::Get()->AddDriver( ozw_port );
- //Manager::Get()->AddDriver( "HID Controller", Driver::ControllerInterface_Hid );
}
catch (exception& e)
{
@@ -429,8 +431,6 @@ int main(int argc, char *argv[]) {
shared_ptr<RemoteManagerHandler> handler(new RemoteManagerHandler());
shared_ptr<TProcessor> processor(new RemoteManagerProcessor(handler));
TServerSocket* ss = new TServerSocket(thrift_port);
- // set 3 seconds timeout value
- ss->setRecvTimeout(3000);
shared_ptr<TServerTransport> serverTransport(ss);
shared_ptr<TTransportFactory> transportFactory(new TBufferedTransportFactory());
shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory());
@@ -448,7 +448,11 @@ int main(int argc, char *argv[]) {
}
catch (exception& e)
{
- cerr << "Exception in OpenZWave Thrift server: " << e.what() << "\n";
+ if ( std::string const *stack = boost::get_error_info<stack_info>(e) ) {
+ cerr << stack << endl;
+ } else {
+ cerr << "Exception in OpenZWave Thrift server: " << e.what() << "\n";
+ }
return 5;
}
View
12 Makefile
@@ -7,8 +7,10 @@
.SUFFIXES: .cpp .o .a .s .thrift
-CC := gcc
-CXX := g++
+#CC := gcc
+#CXX := g++
+CC := clang
+CXX := clang++
LD := ld
AR := ar rc
RANLIB := ranlib
@@ -103,7 +105,7 @@ ozwd.static: Main.o booststomp gen-cpp/RemoteManager.o gen-cpp/ozw_constants.o g
ozwd: Main.o booststomp gen-cpp/RemoteManager.o gen-cpp/ozw_constants.o gen-cpp/ozw_types.o $(LIBZWAVE_DYNAMIC)
$(CXX) -o $@ $(LDFLAGS) Main.o gen-cpp/RemoteManager.o gen-cpp/ozw_constants.o gen-cpp/ozw_types.o $(LIBZWAVE_DYNAMIC) $(LIBS)
-
+
dist: main
rm -f Thrift4OZW.tar.gz
tar -c --exclude=".git" --exclude ".svn" --exclude "*.o" -hvzf Thrift4OZW.tar.gz *.cpp *.h *.thrift *.sm *.rb Makefile gen-*/ license/ README*
@@ -122,5 +124,5 @@ binclean:
thrift: gen-cpp/RemoteManager.cpp
patchdiffs:
- - diff -C3 gen-cpp/ozw_types.h.orig gen-cpp/ozw_types.h.patched > ozw_types.h.patch
- - diff -C3 gen-cpp/RemoteManager_server.cpp.orig gen-cpp/RemoteManager_server.cpp.patched > RemoteManager_server.cpp.patch
+ - diff -C3 gen-cpp/ozw_types.h.orig gen-cpp/ozw_types.h > ozw_types.h.patch
+ - diff -C3 gen-cpp/RemoteManager_server.cpp.orig gen-cpp/RemoteManager_server.cpp > RemoteManager_server.cpp.patch
View
3 gen-csharp/OpenZWave/DriverControllerCommand.cs
@@ -7,6 +7,9 @@
namespace OpenZWave
{
+ /// <summary>
+ /// < A collection of bytes
+ /// </summary>
public enum DriverControllerCommand
{
ControllerCommand_None = 0,
View
1 gen-csharp/OpenZWave/RemoteValueType.cs
@@ -18,5 +18,6 @@ public enum RemoteValueType
ValueType_Short = 6,
ValueType_String = 7,
ValueType_Button = 8,
+ ValueType_Raw = 9,
}
}
View
1 gen-erl/ozw_types.hrl
@@ -16,6 +16,7 @@
-define(ozw_RemoteValueType_ValueType_Short, 6).
-define(ozw_RemoteValueType_ValueType_String, 7).
-define(ozw_RemoteValueType_ValueType_Button, 8).
+-define(ozw_RemoteValueType_ValueType_Raw, 9).
-define(ozw_DriverControllerCommand_ControllerCommand_None, 0).
-define(ozw_DriverControllerCommand_ControllerCommand_AddDevice, 1).
View
6 gen-go/OpenZWave/ttypes.go
@@ -60,6 +60,7 @@ const (
ValueType_Short RemoteValueType = 6
ValueType_String RemoteValueType = 7
ValueType_Button RemoteValueType = 8
+ ValueType_Raw RemoteValueType = 9
)
func (p RemoteValueType) String() string {
switch p {
@@ -72,6 +73,7 @@ func (p RemoteValueType) String() string {
case ValueType_Short: return "ValueType_Short"
case ValueType_String: return "ValueType_String"
case ValueType_Button: return "ValueType_Button"
+ case ValueType_Raw: return "ValueType_Raw"
}
return ""
}
@@ -87,6 +89,7 @@ func FromRemoteValueTypeString(s string) RemoteValueType {
case "ValueType_Short": return ValueType_Short
case "ValueType_String": return ValueType_String
case "ValueType_Button": return ValueType_Button
+ case "ValueType_Raw": return ValueType_Raw
}
return RemoteValueType(-10000)
}
@@ -99,6 +102,9 @@ func (p RemoteValueType) IsEnum() bool {
return true
}
+/**
+ *< A collection of bytes
+ */
type DriverControllerCommand int
const (
ControllerCommand_None DriverControllerCommand = 0
View
3 gen-java/OpenZWave/DriverControllerCommand.java
@@ -11,6 +11,9 @@
import java.util.HashMap;
import org.apache.thrift.TEnum;
+/**
+ * < A collection of bytes
+ */
public enum DriverControllerCommand implements org.apache.thrift.TEnum {
ControllerCommand_None(0),
/**
View
5 gen-java/OpenZWave/RemoteValueType.java
@@ -20,7 +20,8 @@
ValueType_Schedule(5),
ValueType_Short(6),
ValueType_String(7),
- ValueType_Button(8);
+ ValueType_Button(8),
+ ValueType_Raw(9);
private final int value;
@@ -59,6 +60,8 @@ public static RemoteValueType findByValue(int value) {
return ValueType_String;
case 8:
return ValueType_Button;
+ case 9:
+ return ValueType_Raw;
default:
return null;
}
View
3 gen-js/ozw_types.js
@@ -23,7 +23,8 @@ OpenZWave.RemoteValueType = {
'ValueType_Schedule' : 5,
'ValueType_Short' : 6,
'ValueType_String' : 7,
-'ValueType_Button' : 8
+'ValueType_Button' : 8,
+'ValueType_Raw' : 9
};
OpenZWave.DriverControllerCommand = {
'ControllerCommand_None' : 0,
View
1 gen-perl/OpenZWave/Types.pm
@@ -24,6 +24,7 @@ use constant ValueType_Schedule => 5;
use constant ValueType_Short => 6;
use constant ValueType_String => 7;
use constant ValueType_Button => 8;
+use constant ValueType_Raw => 9;
package OpenZWave::DriverControllerCommand;
use constant ControllerCommand_None => 0;
use constant ControllerCommand_AddDevice => 1;
View
6 gen-py/OpenZWave/ttypes.py
@@ -49,6 +49,7 @@ class RemoteValueType:
ValueType_Short = 6
ValueType_String = 7
ValueType_Button = 8
+ ValueType_Raw = 9
_VALUES_TO_NAMES = {
0: "ValueType_Bool",
@@ -60,6 +61,7 @@ class RemoteValueType:
6: "ValueType_Short",
7: "ValueType_String",
8: "ValueType_Button",
+ 9: "ValueType_Raw",
}
_NAMES_TO_VALUES = {
@@ -72,9 +74,13 @@ class RemoteValueType:
"ValueType_Short": 6,
"ValueType_String": 7,
"ValueType_Button": 8,
+ "ValueType_Raw": 9,
}
class DriverControllerCommand:
+ """
+ < A collection of bytes
+ """
ControllerCommand_None = 0
ControllerCommand_AddDevice = 1
ControllerCommand_CreateNewPrimary = 2
View
5 gen-rb/ozw_types.rb
@@ -27,8 +27,9 @@ module RemoteValueType
ValueType_Short = 6
ValueType_String = 7
ValueType_Button = 8
- VALUE_MAP = {0 => "ValueType_Bool", 1 => "ValueType_Byte", 2 => "ValueType_Decimal", 3 => "ValueType_Int", 4 => "ValueType_List", 5 => "ValueType_Schedule", 6 => "ValueType_Short", 7 => "ValueType_String", 8 => "ValueType_Button"}
- VALID_VALUES = Set.new([ValueType_Bool, ValueType_Byte, ValueType_Decimal, ValueType_Int, ValueType_List, ValueType_Schedule, ValueType_Short, ValueType_String, ValueType_Button]).freeze
+ ValueType_Raw = 9
+ VALUE_MAP = {0 => "ValueType_Bool", 1 => "ValueType_Byte", 2 => "ValueType_Decimal", 3 => "ValueType_Int", 4 => "ValueType_List", 5 => "ValueType_Schedule", 6 => "ValueType_Short", 7 => "ValueType_String", 8 => "ValueType_Button", 9 => "ValueType_Raw"}
+ VALID_VALUES = Set.new([ValueType_Bool, ValueType_Byte, ValueType_Decimal, ValueType_Int, ValueType_List, ValueType_Schedule, ValueType_Short, ValueType_String, ValueType_Button, ValueType_Raw]).freeze
end
module DriverControllerCommand
View
3 ozw.thrift
@@ -44,7 +44,8 @@ enum RemoteValueType
ValueType_Schedule=5,
ValueType_Short=6,
ValueType_String=7,
- ValueType_Button=8
+ ValueType_Button=8,
+ ValueType_Raw /**< A collection of bytes */
}
enum DriverControllerCommand
View
480 ozw_types.h.patch
@@ -1,462 +1,38 @@
-*** gen-cpp/ozw_types.h.orig 2013-03-09 21:01:54.109456666 +0200
---- gen-cpp/ozw_types.h.patched 2012-04-16 12:25:34.615507390 +0300
+*** gen-cpp/ozw_types.h.orig 2012-04-25 19:48:56.816331392 +0300
+--- gen-cpp/ozw_types.h 2012-04-16 12:25:34.615507390 +0300
***************
-*** 1,5 ****
- /**
-! * Autogenerated by Thrift Compiler (1.0.0-dev)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
---- 1,5 ----
- /**
-! * Autogenerated by Thrift Compiler (0.9.0-dev)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
-***************
-*** 7,14 ****
- #ifndef ozw_TYPES_H
- #define ozw_TYPES_H
-
-- #include <cstddef>
- using std::size_t;
- #include <thrift/Thrift.h>
- #include <thrift/TApplicationException.h>
- #include <thrift/protocol/TProtocol.h>
+*** 7,12 ****
--- 7,14 ----
#ifndef ozw_TYPES_H
#define ozw_TYPES_H
- using std::size_t;
-+
++ #include <cstddef>
++ using std::size_t;
#include <thrift/Thrift.h>
#include <thrift/TApplicationException.h>
#include <thrift/protocol/TProtocol.h>
***************
-*** 44,50 ****
- ValueType_Schedule = 5,
- ValueType_Short = 6,
- ValueType_String = 7,
-! ValueType_Button = 8
- };
- };
-
---- 44,51 ----
- ValueType_Schedule = 5,
- ValueType_Short = 6,
- ValueType_String = 7,
-! ValueType_Button = 8,
-! ValueType_Max = 8
- };
- };
-
-***************
-*** 53,72 ****
- struct DriverControllerCommand {
- enum type {
- ControllerCommand_None = 0,
-! ControllerCommand_AddDevice = 1,
-! ControllerCommand_CreateNewPrimary = 2,
-! ControllerCommand_ReceiveConfiguration = 3,
-! ControllerCommand_RemoveDevice = 4,
-! ControllerCommand_RemoveFailedNode = 5,
-! ControllerCommand_HasNodeFailed = 6,
-! ControllerCommand_ReplaceFailedNode = 7,
-! ControllerCommand_TransferPrimaryRole = 8,
-! ControllerCommand_RequestNetworkUpdate = 9,
-! ControllerCommand_RequestNodeNeighborUpdate = 10,
-! ControllerCommand_AssignReturnRoute = 11,
-! ControllerCommand_DeleteAllReturnRoutes = 12,
-! ControllerCommand_SendNodeInformation = 13,
-! ControllerCommand_ReplicationSend = 14,
- ControllerCommand_CreateButton = 15,
- ControllerCommand_DeleteButton = 16
- };
---- 54,73 ----
- struct DriverControllerCommand {
- enum type {
- ControllerCommand_None = 0,
-! ControllerCommand_AddController = 1,
-! ControllerCommand_AddDevice = 2,
-! ControllerCommand_CreateNewPrimary = 3,
-! ControllerCommand_ReceiveConfiguration = 4,
-! ControllerCommand_RemoveController = 5,
-! ControllerCommand_RemoveDevice = 6,
-! ControllerCommand_RemoveFailedNode = 7,
-! ControllerCommand_HasNodeFailed = 8,
-! ControllerCommand_ReplaceFailedNode = 9,
-! ControllerCommand_TransferPrimaryRole = 10,
-! ControllerCommand_RequestNetworkUpdate = 11,
-! ControllerCommand_RequestNodeNeighborUpdate = 12,
-! ControllerCommand_AssignReturnRoute = 13,
-! ControllerCommand_DeleteAllReturnRoutes = 14,
- ControllerCommand_CreateButton = 15,
- ControllerCommand_DeleteButton = 16
- };
-***************
-*** 74,127 ****
-
- extern const std::map<int, const char*> _DriverControllerCommand_VALUES_TO_NAMES;
-
-- struct DriverControllerState {
-- enum type {
-- ControllerState_Normal = 0,
-- ControllerState_Starting = 1,
-- ControllerState_Cancel = 2,
-- ControllerState_Error = 3,
-- ControllerState_Waiting = 4,
-- ControllerState_Sleeping = 5,
-- ControllerState_InProgress = 6,
-- ControllerState_Completed = 7,
-- ControllerState_Failed = 8,
-- ControllerState_NodeOK = 9,
-- ControllerState_NodeFailed = 10
-- };
-- };
--
-- extern const std::map<int, const char*> _DriverControllerState_VALUES_TO_NAMES;
--
-- struct DriverControllerError {
-- enum type {
-- ControllerError_None = 0,
-- ControllerError_ButtonNotFound = 1,
-- ControllerError_NodeNotFound = 2,
-- ControllerError_NotBridge = 3,
-- ControllerError_NotSUC = 4,
-- ControllerError_NotSecondary = 5,
-- ControllerError_NotPrimary = 6,
-- ControllerError_IsPrimary = 7,
-- ControllerError_NotFound = 8,
-- ControllerError_Busy = 9,
-- ControllerError_Failed = 10,
-- ControllerError_Disabled = 11,
-- ControllerError_Overflow = 12
-- };
-- };
--
-- extern const std::map<int, const char*> _DriverControllerError_VALUES_TO_NAMES;
--
-- struct DriverControllerInterface {
-- enum type {
-- ControllerInterface_Unknown = 0,
-- ControllerInterface_Serial = 1,
-- ControllerInterface_Hid = 2
-- };
-- };
--
-- extern const std::map<int, const char*> _DriverControllerInterface_VALUES_TO_NAMES;
--
- typedef struct _RemoteValueID__isset {
- _RemoteValueID__isset() : _homeId(false), _nodeId(false), _genre(false), _commandClassId(false), _instance(false), _valueIndex(false), _type(false) {}
- bool _homeId;
---- 75,80 ----
-***************
-*** 419,665 ****
-
- void swap(GetDriverStatisticsReturnStruct &a, GetDriverStatisticsReturnStruct &b);
-
-- typedef struct _CommandClassData__isset {
-- _CommandClassData__isset() : m_commandClassId(false), m_sentCnt(false), m_receivedCnt(false) {}
-- bool m_commandClassId;
-- bool m_sentCnt;
-- bool m_receivedCnt;
-- } _CommandClassData__isset;
--
-- class CommandClassData {
-- public:
--
-- static const char* ascii_fingerprint; // = "6991D02F78C92CCC3C9DC65E1F8719EF";
-- static const uint8_t binary_fingerprint[16]; // = {0x69,0x91,0xD0,0x2F,0x78,0xC9,0x2C,0xCC,0x3C,0x9D,0xC6,0x5E,0x1F,0x87,0x19,0xEF};
--
-- CommandClassData() : m_commandClassId(0), m_sentCnt(0), m_receivedCnt(0) {
-- }
--
-- virtual ~CommandClassData() throw() {}
--
-- int8_t m_commandClassId;
-- int32_t m_sentCnt;
-- int32_t m_receivedCnt;
--
-- _CommandClassData__isset __isset;
--
-- void __set_m_commandClassId(const int8_t val) {
-- m_commandClassId = val;
-- }
--
-- void __set_m_sentCnt(const int32_t val) {
-- m_sentCnt = val;
-- }
--
-- void __set_m_receivedCnt(const int32_t val) {
-- m_receivedCnt = val;
-- }
--
-- bool operator == (const CommandClassData & rhs) const
-- {
-- if (!(m_commandClassId == rhs.m_commandClassId))
-- return false;
-- if (!(m_sentCnt == rhs.m_sentCnt))
-- return false;
-- if (!(m_receivedCnt == rhs.m_receivedCnt))
-- return false;
-- return true;
-- }
-- bool operator != (const CommandClassData &rhs) const {
-- return !(*this == rhs);
-- }
--
-- bool operator < (const CommandClassData & ) const;
--
-- uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
-- uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
--
-- };
--
-- void swap(CommandClassData &a, CommandClassData &b);
--
-- typedef struct _NodeData__isset {
-- _NodeData__isset() : m_sentCnt(false), m_sentFailed(false), m_retries(false), m_receivedCnt(false), m_receivedDups(false), m_rtt(false), m_sentTS(false), m_receivedTS(false), m_lastRTT(false), m_averageRTT(false), m_quality(false), m_lastReceivedMessage(false), m_ccData(false) {}
-- bool m_sentCnt;
-- bool m_sentFailed;
-- bool m_retries;
-- bool m_receivedCnt;
-- bool m_receivedDups;
-- bool m_rtt;
-- bool m_sentTS;
-- bool m_receivedTS;
-- bool m_lastRTT;
-- bool m_averageRTT;
-- bool m_quality;
-- bool m_lastReceivedMessage;
-- bool m_ccData;
-- } _NodeData__isset;
--
-- class NodeData {
-- public:
--
-- static const char* ascii_fingerprint; // = "DB994120B65B924D2C723CE2B0A136F6";
-- static const uint8_t binary_fingerprint[16]; // = {0xDB,0x99,0x41,0x20,0xB6,0x5B,0x92,0x4D,0x2C,0x72,0x3C,0xE2,0xB0,0xA1,0x36,0xF6};
--
-- NodeData() : m_sentCnt(0), m_sentFailed(0), m_retries(0), m_receivedCnt(0), m_receivedDups(0), m_rtt(0), m_sentTS(), m_receivedTS(), m_lastRTT(0), m_averageRTT(0), m_quality(0) {
-- }
--
-- virtual ~NodeData() throw() {}
--
-- int32_t m_sentCnt;
-- int32_t m_sentFailed;
-- int32_t m_retries;
-- int32_t m_receivedCnt;
-- int32_t m_receivedDups;
-- int32_t m_rtt;
-- std::string m_sentTS;
-- std::string m_receivedTS;
-- int32_t m_lastRTT;
-- int32_t m_averageRTT;
-- int8_t m_quality;
-- std::vector<int8_t> m_lastReceivedMessage;
-- std::vector<CommandClassData> m_ccData;
--
-- _NodeData__isset __isset;
--
-- void __set_m_sentCnt(const int32_t val) {
-- m_sentCnt = val;
-- }
--
-- void __set_m_sentFailed(const int32_t val) {
-- m_sentFailed = val;
-- }
--
-- void __set_m_retries(const int32_t val) {
-- m_retries = val;
-- }
--
-- void __set_m_receivedCnt(const int32_t val) {
-- m_receivedCnt = val;
-- }
--
-- void __set_m_receivedDups(const int32_t val) {
-- m_receivedDups = val;
-- }
--
-- void __set_m_rtt(const int32_t val) {
-- m_rtt = val;
-- }
--
-- void __set_m_sentTS(const std::string& val) {
-- m_sentTS = val;
-- }
--
-- void __set_m_receivedTS(const std::string& val) {
-- m_receivedTS = val;
-- }
--
-- void __set_m_lastRTT(const int32_t val) {
-- m_lastRTT = val;
-- }
--
-- void __set_m_averageRTT(const int32_t val) {
-- m_averageRTT = val;
-- }
--
-- void __set_m_quality(const int8_t val) {
-- m_quality = val;
-- }
--
-- void __set_m_lastReceivedMessage(const std::vector<int8_t> & val) {
-- m_lastReceivedMessage = val;
-- }
--
-- void __set_m_ccData(const std::vector<CommandClassData> & val) {
-- m_ccData = val;
-- }
--
-- bool operator == (const NodeData & rhs) const
-- {
-- if (!(m_sentCnt == rhs.m_sentCnt))
-- return false;
-- if (!(m_sentFailed == rhs.m_sentFailed))
-- return false;
-- if (!(m_retries == rhs.m_retries))
-- return false;
-- if (!(m_receivedCnt == rhs.m_receivedCnt))
-- return false;
-- if (!(m_receivedDups == rhs.m_receivedDups))
-- return false;
-- if (!(m_rtt == rhs.m_rtt))
-- return false;
-- if (!(m_sentTS == rhs.m_sentTS))
-- return false;
-- if (!(m_receivedTS == rhs.m_receivedTS))
-- return false;
-- if (!(m_lastRTT == rhs.m_lastRTT))
-- return false;
-- if (!(m_averageRTT == rhs.m_averageRTT))
-- return false;
-- if (!(m_quality == rhs.m_quality))
-- return false;
-- if (!(m_lastReceivedMessage == rhs.m_lastReceivedMessage))
-- return false;
-- if (!(m_ccData == rhs.m_ccData))
-- return false;
-- return true;
-- }
-- bool operator != (const NodeData &rhs) const {
-- return !(*this == rhs);
-- }
--
-- bool operator < (const NodeData & ) const;
--
-- uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
-- uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
--
-- };
--
-- void swap(NodeData &a, NodeData &b);
--
-- typedef struct _GetNodeStatisticsReturnStruct__isset {
-- _GetNodeStatisticsReturnStruct__isset() : _data(false) {}
-- bool _data;
-- } _GetNodeStatisticsReturnStruct__isset;
--
-- class GetNodeStatisticsReturnStruct {
-- public:
--
-- static const char* ascii_fingerprint; // = "C5D06FBEAFB493FE97292FCD55C6E89F";
-- static const uint8_t binary_fingerprint[16]; // = {0xC5,0xD0,0x6F,0xBE,0xAF,0xB4,0x93,0xFE,0x97,0x29,0x2F,0xCD,0x55,0xC6,0xE8,0x9F};
--
-- GetNodeStatisticsReturnStruct() {
-- }
--
-- virtual ~GetNodeStatisticsReturnStruct() throw() {}
--
-- NodeData _data;
--
-- _GetNodeStatisticsReturnStruct__isset __isset;
--
-- void __set__data(const NodeData& val) {
-- _data = val;
-- }
--
-- bool operator == (const GetNodeStatisticsReturnStruct & rhs) const
-- {
-- if (!(_data == rhs._data))
-- return false;
-- return true;
-- }
-- bool operator != (const GetNodeStatisticsReturnStruct &rhs) const {
-- return !(*this == rhs);
-- }
--
-- bool operator < (const GetNodeStatisticsReturnStruct & ) const;
--
-- uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
-- uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
--
-- };
--
-- void swap(GetNodeStatisticsReturnStruct &a, GetNodeStatisticsReturnStruct &b);
--
- typedef struct _GetSwitchPointReturnStruct__isset {
- _GetSwitchPointReturnStruct__isset() : retval(false), o_hours(false), o_minutes(false), o_setback(false) {}
- bool retval;
---- 372,377 ----
-***************
-*** 1084,1140 ****
-
- void swap(Bool_ListString &a, Bool_ListString &b);
+*** 103,108 ****
+--- 105,126 ----
+ int8_t _valueIndex;
+ RemoteValueType::type _type;
+
++ // ekarak: constructor from ValueID
++ RemoteValueID(ValueID vid) :
++ _homeId ((int32_t) vid.GetHomeId()),
++ _nodeId ((int8_t) vid.GetNodeId()),
++ _genre ((RemoteValueGenre::type) vid.GetGenre()),
++ _commandClassId((int8_t) vid.GetCommandClassId()),
++ _instance ((int8_t) vid.GetInstance()),
++ _valueIndex((int8_t) vid.GetIndex()),
++ _type ((RemoteValueType::type) vid.GetType()) { }
++
++ // ekarak: converter to ValueID
++ ValueID toValueID() const {
++ return ValueID((uint32)_homeId, (uint8)_nodeId, (ValueID::ValueGenre)_genre, (uint8)_commandClassId, (uint8)_instance, (uint8)_valueIndex, (ValueID::ValueType)_type);
++ }
++
++
+ _RemoteValueID__isset __isset;
-- typedef struct _ListUInt8_Byte__isset {
-- _ListUInt8_Byte__isset() : _value(false), _length(false) {}
-- bool _value;
-- bool _length;
-- } _ListUInt8_Byte__isset;
--
-- class ListUInt8_Byte {
-- public:
--
-- static const char* ascii_fingerprint; // = "C18DF93C44240A2B0D04E759C8DFEB90";
-- static const uint8_t binary_fingerprint[16]; // = {0xC1,0x8D,0xF9,0x3C,0x44,0x24,0x0A,0x2B,0x0D,0x04,0xE7,0x59,0xC8,0xDF,0xEB,0x90};
--
-- ListUInt8_Byte() : _length(0) {
-- }
--
-- virtual ~ListUInt8_Byte() throw() {}
--
-- std::vector<int8_t> _value;
-- int8_t _length;
--
-- _ListUInt8_Byte__isset __isset;
--
-- void __set__value(const std::vector<int8_t> & val) {
-- _value = val;
-- }
--
-- void __set__length(const int8_t val) {
-- _length = val;
-- }
--
-- bool operator == (const ListUInt8_Byte & rhs) const
-- {
-- if (!(_value == rhs._value))
-- return false;
-- if (!(_length == rhs._length))
-- return false;
-- return true;
-- }
-- bool operator != (const ListUInt8_Byte &rhs) const {
-- return !(*this == rhs);
-- }
--
-- bool operator < (const ListUInt8_Byte & ) const;
--
-- uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
-- uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
--
-- };
--
-- void swap(ListUInt8_Byte &a, ListUInt8_Byte &b);
--
- typedef struct _UInt32_ListByte__isset {
- _UInt32_ListByte__isset() : retval(false), _nodeNeighbors(false) {}
- bool retval;
---- 796,801 ----
+ void __set__homeId(const int32_t val) {
View
BIN ozwd
Binary file not shown.

0 comments on commit 6861313

Please sign in to comment.