Skip to content

Commit

Permalink
Feature: Color CC to Version 3 - Adds Target ValueID
Browse files Browse the repository at this point in the history
  • Loading branch information
Fishwaldo committed Jul 2, 2020
1 parent 2801f3a commit 0dba812
Show file tree
Hide file tree
Showing 6 changed files with 268 additions and 270 deletions.
8 changes: 7 additions & 1 deletion config/aeotec/zwa002.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!--
ZWA002 LED Bulb 6 Multi-Color
https://products.z-wavealliance.org/products/2881
--><Product Revision="3" xmlns="https://github.com/OpenZWave/open-zwave">
--><Product Revision="4" xmlns="https://github.com/OpenZWave/open-zwave">
<MetaData>
<MetaDataItem name="OzwInfoPage">http://www.openzwave.com/device-database/0371:0002:0103</MetaDataItem>
<MetaDataItem name="ProductPic">images/aeotec/zwa002.png</MetaDataItem>
Expand Down Expand Up @@ -44,6 +44,7 @@ Blinks between 100% White and Blue 0x0000FF color for 3 seconds (at a rate of 20
<ChangeLog>
<Entry author="Justin Hammond - [email protected]" date="02 Jun 2019" revision="2">Initial Metadata Import from Z-Wave Alliance Database - https://products.z-wavealliance.org/products/2880/xml</Entry>
<Entry author="Justin Hammond - [email protected]" date="02 Jun 2019" revision="3">Updated Metadata Import from Z-Wave Alliance Database - https://products.z-wavealliance.org/products/2881/xml</Entry>
<Entry author="Justin Hammond" date="02 July 2020" revision="4">Add Verified Change Flag to Color CC</Entry>
</ChangeLog>
<MetaDataItem id="0002" name="ZWProductPage" type="0003">https://products.z-wavealliance.org/products/2881/</MetaDataItem>
<MetaDataItem id="0002" name="FrequencyName" type="0003">CEPT (Europe)</MetaDataItem>
Expand Down Expand Up @@ -94,6 +95,11 @@ Blinks between 100% White and Blue 0x0000FF color for 3 seconds (at a rate of 20
</Help>
</Value>
</CommandClass>
<CommandClass id="51">
<Compatibility>
<VerifyChanged index="0">true</VerifyChanged>
</Compatibility>
</CommandClass>
<!-- Association Groups -->
<CommandClass id="133">
<Associations num_groups="1">
Expand Down
8 changes: 4 additions & 4 deletions cpp/build/testconfigversions.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,8 @@
'md5' => 'e63fd65924332e173ce34701ba86502affcfe1e5088cac0aeaa5755a0c1e73e335727b5bdc4730784c407f8022766fc0c220e8f07e36df8e6a44ca636abf67a8'
},
'config/aeotec/zwa002.xml' => {
'Revision' => 3,
'md5' => 'f8ae29516711f6eca7237df4095354a8ad6b69812f8032b157d875d6ec6a09cebdc03feb81e3933ddb6f7d41454b34f79b2f9b876601665c4c761f52d33da8dc'
'Revision' => 4,
'md5' => 'c32dbf9c909ee50b3d38f14594f163cb2e5b49873cf1cd551c3d1a0fdbfb7223466c2e70d14d1b95de5467797f6fc2141b0e8859fe6c3e2fe3231abd0aae1dce'
},
'config/aeotec/zwa003.xml' => {
'Revision' => 4,
Expand Down Expand Up @@ -432,8 +432,8 @@
'md5' => '4252c298eacb7e31a79c7c8fcee5e2d40b56d9bf865c8eeed53e3a29e8695508d38ffb83f558a41871e13af346c65cbdbc8a7de6caf7c5a1a67af59b5fb384b3'
},
'config/assa_abloy/PushButtonDeadbolt.xml' => {
'Revision' => 6,
'md5' => 'eab93127aa1423d943e6e4bc2650b76a4a8d029d9c138011c5a713e919b4fd3e27981a73a87f35ddd2089775b925e6fb5d85976e318ccca676208bf5502570d1'
'Revision' => 7,
'md5' => 'a39dc67ada1bb3ea32c5be977f635cb4e5758e5006d54b84ef8cb9c8bb91a830718e94758b5701d07af4c17ec3c83a68af34069aaded0e9096f70311e15ae2c5'
},
'config/assa_abloy/PushButtonLever.xml' => {
'Revision' => 1,
Expand Down
3 changes: 2 additions & 1 deletion cpp/src/ValueIDIndexesDefines.def
Original file line number Diff line number Diff line change
Expand Up @@ -1887,7 +1887,8 @@ ENUM(ValueID_Index_Color,
Color = 0,
Index = 1,
Channels_Capabilities = 2,
Duration = 4
Duration = 4,
Target = 5
);
ENUM(ValueID_Index_Configuration,
Parameter_1 = 1,
Expand Down
3 changes: 2 additions & 1 deletion cpp/src/ValueIDIndexesDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ struct ValueID_Index_Clock { enum _enumerated { Day = 0, Hour = 1, Minute = 2 };



struct ValueID_Index_Color { enum _enumerated { Color = 0, Index = 1, Channels_Capabilities = 2, Duration = 4 }; _enumerated _value; ValueID_Index_Color(_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 = 4; static const int* _values() { static const int values[] = { (ignore_assign)Color = 0, (ignore_assign)Index = 1, (ignore_assign)Channels_Capabilities = 2, (ignore_assign)Duration = 4, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Color = 0", "Index = 1", "Channels_Capabilities = 2", "Duration = 4", }; 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; } };;
struct ValueID_Index_Color { enum _enumerated { Color = 0, Index = 1, Channels_Capabilities = 2, Duration = 4, Target = 5 }; _enumerated _value; ValueID_Index_Color(_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 = 5; static const int* _values() { static const int values[] = { (ignore_assign)Color = 0, (ignore_assign)Index = 1, (ignore_assign)Channels_Capabilities = 2, (ignore_assign)Duration = 4, (ignore_assign)Target = 5, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Color = 0", "Index = 1", "Channels_Capabilities = 2", "Duration = 4", "Target = 5", }; 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; } };;




Expand Down
Loading

0 comments on commit 0dba812

Please sign in to comment.