forked from OpenZWave/Thrift4OZW
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathozw_types.h.patch
More file actions
38 lines (35 loc) · 1.23 KB
/
ozw_types.h.patch
File metadata and controls
38 lines (35 loc) · 1.23 KB
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
*** 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
***************
*** 7,12 ****
--- 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>
***************
*** 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;
void __set__homeId(const int32_t val) {