From 5deb6af16d22aa66f8a91e77dddf5a9a9e72d43b Mon Sep 17 00:00:00 2001 From: Cyberwizzard Date: Sat, 31 Oct 2020 21:30:55 +0100 Subject: [PATCH 01/15] Retain min temp field size for setpoint command and apply it there #2435 --- cpp/src/ValueIDIndexesDefines.def | 1 + cpp/src/ValueIDIndexesDefines.h | 111 +----------------- cpp/src/command_classes/CommandClass.cpp | 3 +- cpp/src/command_classes/CommandClass.h | 3 +- .../command_classes/ThermostatSetpoint.cpp | 16 ++- 5 files changed, 19 insertions(+), 115 deletions(-) diff --git a/cpp/src/ValueIDIndexesDefines.def b/cpp/src/ValueIDIndexesDefines.def index a23583297c..37c3897cdc 100644 --- a/cpp/src/ValueIDIndexesDefines.def +++ b/cpp/src/ValueIDIndexesDefines.def @@ -3166,6 +3166,7 @@ ENUM(ValueID_Index_ThermostatSetpoint, CoolingEcon, AwayHeating, CoolingHeating, + SetPointMinSize, Unused_0_Minimum = 100, Heating_Minimum, Cooling_Minimum, diff --git a/cpp/src/ValueIDIndexesDefines.h b/cpp/src/ValueIDIndexesDefines.h index 035343efb1..876a56dea9 100644 --- a/cpp/src/ValueIDIndexesDefines.h +++ b/cpp/src/ValueIDIndexesDefines.h @@ -1,161 +1,52 @@ struct ignore_assign { ignore_assign(int value) : _value(value) { } operator int() const { return _value; } - const ignore_assign& operator =(int dummy) { (void)dummy; return *this; } - int _value; }; struct ValueID_Index_Alarm { enum _enumerated { Type_Start = 0, Type_Smoke_Alarm = 1, Type_Carbon_Monoxide = 2, Type_Carbon_Dioxide = 3, Type_Heat = 4, Type_Water = 5, Type_Access_Control = 6, Type_Home_Security = 7, Type_Power_Management = 8, Type_System = 9, Type_Emergency = 10, Type_Clock = 11, Type_Appliance = 12, Type_Home_Health = 13, Type_Siren = 14, Type_Water_Valve = 15, Type_Weather = 16, Type_Irrigation = 17, Type_Gas = 18, Type_Event_19, Type_Event_20, Type_Event_21, Type_Event_22, Type_Event_23, Type_Event_24, Type_Event_25, Type_Event_26, Type_Event_27, Type_Event_28, Type_Event_29, Type_Event_30, Type_Event_31, Type_Event_32, Type_Event_33, Type_Event_34, Type_Event_35, Type_Event_36, Type_Event_37, Type_Event_38, Type_Event_39, Type_Event_40, Type_Event_41, Type_Event_42, Type_Event_43, Type_Event_44, Type_Event_45, Type_Event_46, Type_Event_47, Type_Event_48, Type_Event_49, Type_Event_50, Type_Event_51, Type_Event_52, Type_Event_53, Type_Event_54, Type_Event_55, Type_Event_56, Type_Event_57, Type_Event_58, Type_Event_59, Type_Event_60, Type_Event_61, Type_Event_62, Type_Event_63, Type_Event_64, Type_Event_65, Type_Event_66, Type_Event_67, Type_Event_68, Type_Event_69, Type_Event_70, Type_Event_71, Type_Event_72, Type_Event_73, Type_Event_74, Type_Event_75, Type_Event_76, Type_Event_77, Type_Event_78, Type_Event_79, Type_Event_80, Type_Event_81, Type_Event_82, Type_Event_83, Type_Event_84, Type_Event_85, Type_Event_86, Type_Event_87, Type_Event_88, Type_Event_89, Type_Event_90, Type_Event_91, Type_Event_92, Type_Event_93, Type_Event_94, Type_Event_95, Type_Event_96, Type_Event_97, Type_Event_98, Type_Event_99, Type_Event_100, Type_Event_101, Type_Event_102, Type_Event_103, Type_Event_104, Type_Event_105, Type_Event_106, Type_Event_107, Type_Event_108, Type_Event_109, Type_Event_110, Type_Event_111, Type_Event_112, Type_Event_113, Type_Event_114, Type_Event_115, Type_Event_116, Type_Event_117, Type_Event_118, Type_Event_119, Type_Event_120, Type_Event_121, Type_Event_122, Type_Event_123, Type_Event_124, Type_Event_125, Type_Event_126, Type_Event_127, Type_Event_128, Type_Event_129, Type_Event_130, Type_Event_131, Type_Event_132, Type_Event_133, Type_Event_134, Type_Event_135, Type_Event_136, Type_Event_137, Type_Event_138, Type_Event_139, Type_Event_140, Type_Event_141, Type_Event_142, Type_Event_143, Type_Event_144, Type_Event_145, Type_Event_146, Type_Event_147, Type_Event_148, Type_Event_149, Type_Event_150, Type_Event_151, Type_Event_152, Type_Event_153, Type_Event_154, Type_Event_155, Type_Event_156, Type_Event_157, Type_Event_158, Type_Event_159, Type_Event_160, Type_Event_161, Type_Event_162, Type_Event_163, Type_Event_164, Type_Event_165, Type_Event_166, Type_Event_167, Type_Event_168, Type_Event_169, Type_Event_170, Type_Event_171, Type_Event_172, Type_Event_173, Type_Event_174, Type_Event_175, Type_Event_176, Type_Event_177, Type_Event_178, Type_Event_179, Type_Event_180, Type_Event_181, Type_Event_182, Type_Event_183, Type_Event_184, Type_Event_185, Type_Event_186, Type_Event_187, Type_Event_188, Type_Event_189, Type_Event_190, Type_Event_191, Type_Event_192, Type_Event_193, Type_Event_194, Type_Event_195, Type_Event_196, Type_Event_197, Type_Event_198, Type_Event_199, Type_Event_200, Type_Event_201, Type_Event_202, Type_Event_203, Type_Event_204, Type_Event_205, Type_Event_206, Type_Event_207, Type_Event_208, Type_Event_209, Type_Event_210, Type_Event_211, Type_Event_212, Type_Event_213, Type_Event_214, Type_Event_215, Type_Event_216, Type_Event_217, Type_Event_218, Type_Event_219, Type_Event_220, Type_Event_221, Type_Event_222, Type_Event_223, Type_Event_224, Type_Event_225, Type_Event_226, Type_Event_227, Type_Event_228, Type_Event_229, Type_Event_230, Type_Event_231, Type_Event_232, Type_Event_233, Type_Event_234, Type_Event_235, Type_Event_236, Type_Event_237, Type_Event_238, Type_Event_239, Type_Event_240, Type_Event_241, Type_Event_242, Type_Event_243, Type_Event_244, Type_Event_245, Type_Event_246, Type_Event_247, Type_Event_248, Type_Event_249, Type_Event_250, Type_Event_251, Type_Event_252, Type_Event_253, Type_Event_254, Type_Event_255, Type_Event_Param_Previous_Event = 256, Type_Event_Param_Location = 257, Type_Event_Param_Result = 258, Type_Event_Param_Threshold = 259, Type_Event_Param_UserCode = 260, Type_Event_Param_261 = 261, Type_Event_Param_Progress = 262, Type_Event_Param_Mode = 263, Type_Event_Param_Obstruction = 264, Type_Event_Param_Sensor_ID = 265, Type_Event_Param_Error_Code = 266, Type_Event_Param_Duration = 267, Type_Event_Param_Pollution_Level = 268, Type_Event_Param_Status = 269, Type_Event_Param_Schedule_ID = 270, Type_Event_Param_Valve_Table_ID = 271, Type_Event_Param_272, Type_Event_Param_273, Type_Event_Param_274, Type_Event_Param_275, Type_Event_Param_276, Type_Event_Param_277, Type_Event_Param_278, Type_Event_Param_279, Type_Event_Param_280, Type_Event_Param_281, Type_Event_Param_282, Type_Event_Param_283, Type_Event_Param_284, Type_Event_Param_285, Type_Event_Param_286, Type_Event_Param_287, Type_Event_Param_288, Type_Event_Param_289, Type_Event_Param_290, Type_Event_Param_291, Type_Event_Param_292, Type_Event_Param_293, Type_Event_Param_294, Type_Event_Param_295, Type_Event_Param_296, Type_Event_Param_297, Type_Event_Param_298, Type_Event_Param_299, Type_Event_Param_300, Type_Event_Param_301, Type_Event_Param_302, Type_Event_Param_303, Type_Event_Param_304, Type_Event_Param_305, Type_Event_Param_306, Type_Event_Param_307, Type_Event_Param_308, Type_Event_Param_309, Type_Event_Param_310, Type_Event_Param_311, Type_Event_Param_312, Type_Event_Param_313, Type_Event_Param_314, Type_Event_Param_315, Type_Event_Param_316, Type_Event_Param_317, Type_Event_Param_318, Type_Event_Param_319, Type_Event_Param_320, Type_Event_Param_321, Type_Event_Param_322, Type_Event_Param_323, Type_Event_Param_324, Type_Event_Param_325, Type_Event_Param_326, Type_Event_Param_327, Type_Event_Param_328, Type_Event_Param_329, Type_Event_Param_330, Type_Event_Param_331, Type_Event_Param_332, Type_Event_Param_333, Type_Event_Param_334, Type_Event_Param_335, Type_Event_Param_336, Type_Event_Param_337, Type_Event_Param_338, Type_Event_Param_339, Type_Event_Param_340, Type_Event_Param_341, Type_Event_Param_342, Type_Event_Param_343, Type_Event_Param_344, Type_Event_Param_345, Type_Event_Param_346, Type_Event_Param_347, Type_Event_Param_348, Type_Event_Param_349, Type_Event_Param_350, Type_Event_Param_351, Type_Event_Param_352, Type_Event_Param_353, Type_Event_Param_354, Type_Event_Param_355, Type_Event_Param_356, Type_Event_Param_357, Type_Event_Param_358, Type_Event_Param_359, Type_Event_Param_360, Type_Event_Param_361, Type_Event_Param_362, Type_Event_Param_363, Type_Event_Param_364, Type_Event_Param_365, Type_Event_Param_366, Type_Event_Param_367, Type_Event_Param_368, Type_Event_Param_369, Type_Event_Param_370, Type_Event_Param_371, Type_Event_Param_372, Type_Event_Param_373, Type_Event_Param_374, Type_Event_Param_375, Type_Event_Param_376, Type_Event_Param_377, Type_Event_Param_378, Type_Event_Param_379, Type_Event_Param_380, Type_Event_Param_381, Type_Event_Param_382, Type_Event_Param_383, Type_Event_Param_384, Type_Event_Param_385, Type_Event_Param_386, Type_Event_Param_387, Type_Event_Param_388, Type_Event_Param_389, Type_Event_Param_390, Type_Event_Param_391, Type_Event_Param_392, Type_Event_Param_393, Type_Event_Param_394, Type_Event_Param_395, Type_Event_Param_396, Type_Event_Param_397, Type_Event_Param_398, Type_Event_Param_399, Type_Event_Param_400, Type_Event_Param_401, Type_Event_Param_402, Type_Event_Param_403, Type_Event_Param_404, Type_Event_Param_405, Type_Event_Param_406, Type_Event_Param_407, Type_Event_Param_408, Type_Event_Param_409, Type_Event_Param_410, Type_Event_Param_411, Type_Event_Param_412, Type_Event_Param_413, Type_Event_Param_414, Type_Event_Param_415, Type_Event_Param_416, Type_Event_Param_417, Type_Event_Param_418, Type_Event_Param_419, Type_Event_Param_420, Type_Event_Param_421, Type_Event_Param_422, Type_Event_Param_423, Type_Event_Param_424, Type_Event_Param_425, Type_Event_Param_426, Type_Event_Param_427, Type_Event_Param_428, Type_Event_Param_429, Type_Event_Param_430, Type_Event_Param_431, Type_Event_Param_432, Type_Event_Param_433, Type_Event_Param_434, Type_Event_Param_435, Type_Event_Param_436, Type_Event_Param_437, Type_Event_Param_438, Type_Event_Param_439, Type_Event_Param_440, Type_Event_Param_441, Type_Event_Param_442, Type_Event_Param_443, Type_Event_Param_444, Type_Event_Param_445, Type_Event_Param_446, Type_Event_Param_447, Type_Event_Param_448, Type_Event_Param_449, Type_Event_Param_450, Type_Event_Param_451, Type_Event_Param_452, Type_Event_Param_453, Type_Event_Param_454, Type_Event_Param_455, Type_Event_Param_456, Type_Event_Param_457, Type_Event_Param_458, Type_Event_Param_459, Type_Event_Param_460, Type_Event_Param_461, Type_Event_Param_462, Type_Event_Param_463, Type_Event_Param_464, Type_Event_Param_465, Type_Event_Param_466, Type_Event_Param_467, Type_Event_Param_468, Type_Event_Param_469, Type_Event_Param_470, Type_Event_Param_471, Type_Event_Param_472, Type_Event_Param_473, Type_Event_Param_474, Type_Event_Param_475, Type_Event_Param_476, Type_Event_Param_477, Type_Event_Param_478, Type_Event_Param_479, Type_Event_Param_480, Type_Event_Param_481, Type_Event_Param_482, Type_Event_Param_483, Type_Event_Param_484, Type_Event_Param_485, Type_Event_Param_486, Type_Event_Param_487, Type_Event_Param_488, Type_Event_Param_489, Type_Event_Param_490, Type_Event_Param_491, Type_Event_Param_492, Type_Event_Param_493, Type_Event_Param_494, Type_Event_Param_495, Type_Event_Param_496, Type_Event_Param_497, Type_Event_Param_498, Type_Event_Param_499, Type_Event_Param_500, Type_Event_Param_501, Type_Event_Param_502, Type_Event_Param_503, Type_Event_Param_504, Type_Event_Param_505, Type_Event_Param_506, Type_Event_Param_507, Type_Event_Param_508, Type_Event_Param_509, Type_Event_Param_510, Type_Event_Param_511, Type_v1 = 512, Level_v1 = 513, AutoClearEvents = 514 }; _enumerated _value; ValueID_Index_Alarm(_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 = 515; static const int* _values() { static const int values[] = { (ignore_assign)Type_Start = 0, (ignore_assign)Type_Smoke_Alarm = 1, (ignore_assign)Type_Carbon_Monoxide = 2, (ignore_assign)Type_Carbon_Dioxide = 3, (ignore_assign)Type_Heat = 4, (ignore_assign)Type_Water = 5, (ignore_assign)Type_Access_Control = 6, (ignore_assign)Type_Home_Security = 7, (ignore_assign)Type_Power_Management = 8, (ignore_assign)Type_System = 9, (ignore_assign)Type_Emergency = 10, (ignore_assign)Type_Clock = 11, (ignore_assign)Type_Appliance = 12, (ignore_assign)Type_Home_Health = 13, (ignore_assign)Type_Siren = 14, (ignore_assign)Type_Water_Valve = 15, (ignore_assign)Type_Weather = 16, (ignore_assign)Type_Irrigation = 17, (ignore_assign)Type_Gas = 18, (ignore_assign)Type_Event_19, (ignore_assign)Type_Event_20, (ignore_assign)Type_Event_21, (ignore_assign)Type_Event_22, (ignore_assign)Type_Event_23, (ignore_assign)Type_Event_24, (ignore_assign)Type_Event_25, (ignore_assign)Type_Event_26, (ignore_assign)Type_Event_27, (ignore_assign)Type_Event_28, (ignore_assign)Type_Event_29, (ignore_assign)Type_Event_30, (ignore_assign)Type_Event_31, (ignore_assign)Type_Event_32, (ignore_assign)Type_Event_33, (ignore_assign)Type_Event_34, (ignore_assign)Type_Event_35, (ignore_assign)Type_Event_36, (ignore_assign)Type_Event_37, (ignore_assign)Type_Event_38, (ignore_assign)Type_Event_39, (ignore_assign)Type_Event_40, (ignore_assign)Type_Event_41, (ignore_assign)Type_Event_42, (ignore_assign)Type_Event_43, (ignore_assign)Type_Event_44, (ignore_assign)Type_Event_45, (ignore_assign)Type_Event_46, (ignore_assign)Type_Event_47, (ignore_assign)Type_Event_48, (ignore_assign)Type_Event_49, (ignore_assign)Type_Event_50, (ignore_assign)Type_Event_51, (ignore_assign)Type_Event_52, (ignore_assign)Type_Event_53, (ignore_assign)Type_Event_54, (ignore_assign)Type_Event_55, (ignore_assign)Type_Event_56, (ignore_assign)Type_Event_57, (ignore_assign)Type_Event_58, (ignore_assign)Type_Event_59, (ignore_assign)Type_Event_60, (ignore_assign)Type_Event_61, (ignore_assign)Type_Event_62, (ignore_assign)Type_Event_63, (ignore_assign)Type_Event_64, (ignore_assign)Type_Event_65, (ignore_assign)Type_Event_66, (ignore_assign)Type_Event_67, (ignore_assign)Type_Event_68, (ignore_assign)Type_Event_69, (ignore_assign)Type_Event_70, (ignore_assign)Type_Event_71, (ignore_assign)Type_Event_72, (ignore_assign)Type_Event_73, (ignore_assign)Type_Event_74, (ignore_assign)Type_Event_75, (ignore_assign)Type_Event_76, (ignore_assign)Type_Event_77, (ignore_assign)Type_Event_78, (ignore_assign)Type_Event_79, (ignore_assign)Type_Event_80, (ignore_assign)Type_Event_81, (ignore_assign)Type_Event_82, (ignore_assign)Type_Event_83, (ignore_assign)Type_Event_84, (ignore_assign)Type_Event_85, (ignore_assign)Type_Event_86, (ignore_assign)Type_Event_87, (ignore_assign)Type_Event_88, (ignore_assign)Type_Event_89, (ignore_assign)Type_Event_90, (ignore_assign)Type_Event_91, (ignore_assign)Type_Event_92, (ignore_assign)Type_Event_93, (ignore_assign)Type_Event_94, (ignore_assign)Type_Event_95, (ignore_assign)Type_Event_96, (ignore_assign)Type_Event_97, (ignore_assign)Type_Event_98, (ignore_assign)Type_Event_99, (ignore_assign)Type_Event_100, (ignore_assign)Type_Event_101, (ignore_assign)Type_Event_102, (ignore_assign)Type_Event_103, (ignore_assign)Type_Event_104, (ignore_assign)Type_Event_105, (ignore_assign)Type_Event_106, (ignore_assign)Type_Event_107, (ignore_assign)Type_Event_108, (ignore_assign)Type_Event_109, (ignore_assign)Type_Event_110, (ignore_assign)Type_Event_111, (ignore_assign)Type_Event_112, (ignore_assign)Type_Event_113, (ignore_assign)Type_Event_114, (ignore_assign)Type_Event_115, (ignore_assign)Type_Event_116, (ignore_assign)Type_Event_117, (ignore_assign)Type_Event_118, (ignore_assign)Type_Event_119, (ignore_assign)Type_Event_120, (ignore_assign)Type_Event_121, (ignore_assign)Type_Event_122, (ignore_assign)Type_Event_123, (ignore_assign)Type_Event_124, (ignore_assign)Type_Event_125, (ignore_assign)Type_Event_126, (ignore_assign)Type_Event_127, (ignore_assign)Type_Event_128, (ignore_assign)Type_Event_129, (ignore_assign)Type_Event_130, (ignore_assign)Type_Event_131, (ignore_assign)Type_Event_132, (ignore_assign)Type_Event_133, (ignore_assign)Type_Event_134, (ignore_assign)Type_Event_135, (ignore_assign)Type_Event_136, (ignore_assign)Type_Event_137, (ignore_assign)Type_Event_138, (ignore_assign)Type_Event_139, (ignore_assign)Type_Event_140, (ignore_assign)Type_Event_141, (ignore_assign)Type_Event_142, (ignore_assign)Type_Event_143, (ignore_assign)Type_Event_144, (ignore_assign)Type_Event_145, (ignore_assign)Type_Event_146, (ignore_assign)Type_Event_147, (ignore_assign)Type_Event_148, (ignore_assign)Type_Event_149, (ignore_assign)Type_Event_150, (ignore_assign)Type_Event_151, (ignore_assign)Type_Event_152, (ignore_assign)Type_Event_153, (ignore_assign)Type_Event_154, (ignore_assign)Type_Event_155, (ignore_assign)Type_Event_156, (ignore_assign)Type_Event_157, (ignore_assign)Type_Event_158, (ignore_assign)Type_Event_159, (ignore_assign)Type_Event_160, (ignore_assign)Type_Event_161, (ignore_assign)Type_Event_162, (ignore_assign)Type_Event_163, (ignore_assign)Type_Event_164, (ignore_assign)Type_Event_165, (ignore_assign)Type_Event_166, (ignore_assign)Type_Event_167, (ignore_assign)Type_Event_168, (ignore_assign)Type_Event_169, (ignore_assign)Type_Event_170, (ignore_assign)Type_Event_171, (ignore_assign)Type_Event_172, (ignore_assign)Type_Event_173, (ignore_assign)Type_Event_174, (ignore_assign)Type_Event_175, (ignore_assign)Type_Event_176, (ignore_assign)Type_Event_177, (ignore_assign)Type_Event_178, (ignore_assign)Type_Event_179, (ignore_assign)Type_Event_180, (ignore_assign)Type_Event_181, (ignore_assign)Type_Event_182, (ignore_assign)Type_Event_183, (ignore_assign)Type_Event_184, (ignore_assign)Type_Event_185, (ignore_assign)Type_Event_186, (ignore_assign)Type_Event_187, (ignore_assign)Type_Event_188, (ignore_assign)Type_Event_189, (ignore_assign)Type_Event_190, (ignore_assign)Type_Event_191, (ignore_assign)Type_Event_192, (ignore_assign)Type_Event_193, (ignore_assign)Type_Event_194, (ignore_assign)Type_Event_195, (ignore_assign)Type_Event_196, (ignore_assign)Type_Event_197, (ignore_assign)Type_Event_198, (ignore_assign)Type_Event_199, (ignore_assign)Type_Event_200, (ignore_assign)Type_Event_201, (ignore_assign)Type_Event_202, (ignore_assign)Type_Event_203, (ignore_assign)Type_Event_204, (ignore_assign)Type_Event_205, (ignore_assign)Type_Event_206, (ignore_assign)Type_Event_207, (ignore_assign)Type_Event_208, (ignore_assign)Type_Event_209, (ignore_assign)Type_Event_210, (ignore_assign)Type_Event_211, (ignore_assign)Type_Event_212, (ignore_assign)Type_Event_213, (ignore_assign)Type_Event_214, (ignore_assign)Type_Event_215, (ignore_assign)Type_Event_216, (ignore_assign)Type_Event_217, (ignore_assign)Type_Event_218, (ignore_assign)Type_Event_219, (ignore_assign)Type_Event_220, (ignore_assign)Type_Event_221, (ignore_assign)Type_Event_222, (ignore_assign)Type_Event_223, (ignore_assign)Type_Event_224, (ignore_assign)Type_Event_225, (ignore_assign)Type_Event_226, (ignore_assign)Type_Event_227, (ignore_assign)Type_Event_228, (ignore_assign)Type_Event_229, (ignore_assign)Type_Event_230, (ignore_assign)Type_Event_231, (ignore_assign)Type_Event_232, (ignore_assign)Type_Event_233, (ignore_assign)Type_Event_234, (ignore_assign)Type_Event_235, (ignore_assign)Type_Event_236, (ignore_assign)Type_Event_237, (ignore_assign)Type_Event_238, (ignore_assign)Type_Event_239, (ignore_assign)Type_Event_240, (ignore_assign)Type_Event_241, (ignore_assign)Type_Event_242, (ignore_assign)Type_Event_243, (ignore_assign)Type_Event_244, (ignore_assign)Type_Event_245, (ignore_assign)Type_Event_246, (ignore_assign)Type_Event_247, (ignore_assign)Type_Event_248, (ignore_assign)Type_Event_249, (ignore_assign)Type_Event_250, (ignore_assign)Type_Event_251, (ignore_assign)Type_Event_252, (ignore_assign)Type_Event_253, (ignore_assign)Type_Event_254, (ignore_assign)Type_Event_255, (ignore_assign)Type_Event_Param_Previous_Event = 256, (ignore_assign)Type_Event_Param_Location = 257, (ignore_assign)Type_Event_Param_Result = 258, (ignore_assign)Type_Event_Param_Threshold = 259, (ignore_assign)Type_Event_Param_UserCode = 260, (ignore_assign)Type_Event_Param_261 = 261, (ignore_assign)Type_Event_Param_Progress = 262, (ignore_assign)Type_Event_Param_Mode = 263, (ignore_assign)Type_Event_Param_Obstruction = 264, (ignore_assign)Type_Event_Param_Sensor_ID = 265, (ignore_assign)Type_Event_Param_Error_Code = 266, (ignore_assign)Type_Event_Param_Duration = 267, (ignore_assign)Type_Event_Param_Pollution_Level = 268, (ignore_assign)Type_Event_Param_Status = 269, (ignore_assign)Type_Event_Param_Schedule_ID = 270, (ignore_assign)Type_Event_Param_Valve_Table_ID = 271, (ignore_assign)Type_Event_Param_272, (ignore_assign)Type_Event_Param_273, (ignore_assign)Type_Event_Param_274, (ignore_assign)Type_Event_Param_275, (ignore_assign)Type_Event_Param_276, (ignore_assign)Type_Event_Param_277, (ignore_assign)Type_Event_Param_278, (ignore_assign)Type_Event_Param_279, (ignore_assign)Type_Event_Param_280, (ignore_assign)Type_Event_Param_281, (ignore_assign)Type_Event_Param_282, (ignore_assign)Type_Event_Param_283, (ignore_assign)Type_Event_Param_284, (ignore_assign)Type_Event_Param_285, (ignore_assign)Type_Event_Param_286, (ignore_assign)Type_Event_Param_287, (ignore_assign)Type_Event_Param_288, (ignore_assign)Type_Event_Param_289, (ignore_assign)Type_Event_Param_290, (ignore_assign)Type_Event_Param_291, (ignore_assign)Type_Event_Param_292, (ignore_assign)Type_Event_Param_293, (ignore_assign)Type_Event_Param_294, (ignore_assign)Type_Event_Param_295, (ignore_assign)Type_Event_Param_296, (ignore_assign)Type_Event_Param_297, (ignore_assign)Type_Event_Param_298, (ignore_assign)Type_Event_Param_299, (ignore_assign)Type_Event_Param_300, (ignore_assign)Type_Event_Param_301, (ignore_assign)Type_Event_Param_302, (ignore_assign)Type_Event_Param_303, (ignore_assign)Type_Event_Param_304, (ignore_assign)Type_Event_Param_305, (ignore_assign)Type_Event_Param_306, (ignore_assign)Type_Event_Param_307, (ignore_assign)Type_Event_Param_308, (ignore_assign)Type_Event_Param_309, (ignore_assign)Type_Event_Param_310, (ignore_assign)Type_Event_Param_311, (ignore_assign)Type_Event_Param_312, (ignore_assign)Type_Event_Param_313, (ignore_assign)Type_Event_Param_314, (ignore_assign)Type_Event_Param_315, (ignore_assign)Type_Event_Param_316, (ignore_assign)Type_Event_Param_317, (ignore_assign)Type_Event_Param_318, (ignore_assign)Type_Event_Param_319, (ignore_assign)Type_Event_Param_320, (ignore_assign)Type_Event_Param_321, (ignore_assign)Type_Event_Param_322, (ignore_assign)Type_Event_Param_323, (ignore_assign)Type_Event_Param_324, (ignore_assign)Type_Event_Param_325, (ignore_assign)Type_Event_Param_326, (ignore_assign)Type_Event_Param_327, (ignore_assign)Type_Event_Param_328, (ignore_assign)Type_Event_Param_329, (ignore_assign)Type_Event_Param_330, (ignore_assign)Type_Event_Param_331, (ignore_assign)Type_Event_Param_332, (ignore_assign)Type_Event_Param_333, (ignore_assign)Type_Event_Param_334, (ignore_assign)Type_Event_Param_335, (ignore_assign)Type_Event_Param_336, (ignore_assign)Type_Event_Param_337, (ignore_assign)Type_Event_Param_338, (ignore_assign)Type_Event_Param_339, (ignore_assign)Type_Event_Param_340, (ignore_assign)Type_Event_Param_341, (ignore_assign)Type_Event_Param_342, (ignore_assign)Type_Event_Param_343, (ignore_assign)Type_Event_Param_344, (ignore_assign)Type_Event_Param_345, (ignore_assign)Type_Event_Param_346, (ignore_assign)Type_Event_Param_347, (ignore_assign)Type_Event_Param_348, (ignore_assign)Type_Event_Param_349, (ignore_assign)Type_Event_Param_350, (ignore_assign)Type_Event_Param_351, (ignore_assign)Type_Event_Param_352, (ignore_assign)Type_Event_Param_353, (ignore_assign)Type_Event_Param_354, (ignore_assign)Type_Event_Param_355, (ignore_assign)Type_Event_Param_356, (ignore_assign)Type_Event_Param_357, (ignore_assign)Type_Event_Param_358, (ignore_assign)Type_Event_Param_359, (ignore_assign)Type_Event_Param_360, (ignore_assign)Type_Event_Param_361, (ignore_assign)Type_Event_Param_362, (ignore_assign)Type_Event_Param_363, (ignore_assign)Type_Event_Param_364, (ignore_assign)Type_Event_Param_365, (ignore_assign)Type_Event_Param_366, (ignore_assign)Type_Event_Param_367, (ignore_assign)Type_Event_Param_368, (ignore_assign)Type_Event_Param_369, (ignore_assign)Type_Event_Param_370, (ignore_assign)Type_Event_Param_371, (ignore_assign)Type_Event_Param_372, (ignore_assign)Type_Event_Param_373, (ignore_assign)Type_Event_Param_374, (ignore_assign)Type_Event_Param_375, (ignore_assign)Type_Event_Param_376, (ignore_assign)Type_Event_Param_377, (ignore_assign)Type_Event_Param_378, (ignore_assign)Type_Event_Param_379, (ignore_assign)Type_Event_Param_380, (ignore_assign)Type_Event_Param_381, (ignore_assign)Type_Event_Param_382, (ignore_assign)Type_Event_Param_383, (ignore_assign)Type_Event_Param_384, (ignore_assign)Type_Event_Param_385, (ignore_assign)Type_Event_Param_386, (ignore_assign)Type_Event_Param_387, (ignore_assign)Type_Event_Param_388, (ignore_assign)Type_Event_Param_389, (ignore_assign)Type_Event_Param_390, (ignore_assign)Type_Event_Param_391, (ignore_assign)Type_Event_Param_392, (ignore_assign)Type_Event_Param_393, (ignore_assign)Type_Event_Param_394, (ignore_assign)Type_Event_Param_395, (ignore_assign)Type_Event_Param_396, (ignore_assign)Type_Event_Param_397, (ignore_assign)Type_Event_Param_398, (ignore_assign)Type_Event_Param_399, (ignore_assign)Type_Event_Param_400, (ignore_assign)Type_Event_Param_401, (ignore_assign)Type_Event_Param_402, (ignore_assign)Type_Event_Param_403, (ignore_assign)Type_Event_Param_404, (ignore_assign)Type_Event_Param_405, (ignore_assign)Type_Event_Param_406, (ignore_assign)Type_Event_Param_407, (ignore_assign)Type_Event_Param_408, (ignore_assign)Type_Event_Param_409, (ignore_assign)Type_Event_Param_410, (ignore_assign)Type_Event_Param_411, (ignore_assign)Type_Event_Param_412, (ignore_assign)Type_Event_Param_413, (ignore_assign)Type_Event_Param_414, (ignore_assign)Type_Event_Param_415, (ignore_assign)Type_Event_Param_416, (ignore_assign)Type_Event_Param_417, (ignore_assign)Type_Event_Param_418, (ignore_assign)Type_Event_Param_419, (ignore_assign)Type_Event_Param_420, (ignore_assign)Type_Event_Param_421, (ignore_assign)Type_Event_Param_422, (ignore_assign)Type_Event_Param_423, (ignore_assign)Type_Event_Param_424, (ignore_assign)Type_Event_Param_425, (ignore_assign)Type_Event_Param_426, (ignore_assign)Type_Event_Param_427, (ignore_assign)Type_Event_Param_428, (ignore_assign)Type_Event_Param_429, (ignore_assign)Type_Event_Param_430, (ignore_assign)Type_Event_Param_431, (ignore_assign)Type_Event_Param_432, (ignore_assign)Type_Event_Param_433, (ignore_assign)Type_Event_Param_434, (ignore_assign)Type_Event_Param_435, (ignore_assign)Type_Event_Param_436, (ignore_assign)Type_Event_Param_437, (ignore_assign)Type_Event_Param_438, (ignore_assign)Type_Event_Param_439, (ignore_assign)Type_Event_Param_440, (ignore_assign)Type_Event_Param_441, (ignore_assign)Type_Event_Param_442, (ignore_assign)Type_Event_Param_443, (ignore_assign)Type_Event_Param_444, (ignore_assign)Type_Event_Param_445, (ignore_assign)Type_Event_Param_446, (ignore_assign)Type_Event_Param_447, (ignore_assign)Type_Event_Param_448, (ignore_assign)Type_Event_Param_449, (ignore_assign)Type_Event_Param_450, (ignore_assign)Type_Event_Param_451, (ignore_assign)Type_Event_Param_452, (ignore_assign)Type_Event_Param_453, (ignore_assign)Type_Event_Param_454, (ignore_assign)Type_Event_Param_455, (ignore_assign)Type_Event_Param_456, (ignore_assign)Type_Event_Param_457, (ignore_assign)Type_Event_Param_458, (ignore_assign)Type_Event_Param_459, (ignore_assign)Type_Event_Param_460, (ignore_assign)Type_Event_Param_461, (ignore_assign)Type_Event_Param_462, (ignore_assign)Type_Event_Param_463, (ignore_assign)Type_Event_Param_464, (ignore_assign)Type_Event_Param_465, (ignore_assign)Type_Event_Param_466, (ignore_assign)Type_Event_Param_467, (ignore_assign)Type_Event_Param_468, (ignore_assign)Type_Event_Param_469, (ignore_assign)Type_Event_Param_470, (ignore_assign)Type_Event_Param_471, (ignore_assign)Type_Event_Param_472, (ignore_assign)Type_Event_Param_473, (ignore_assign)Type_Event_Param_474, (ignore_assign)Type_Event_Param_475, (ignore_assign)Type_Event_Param_476, (ignore_assign)Type_Event_Param_477, (ignore_assign)Type_Event_Param_478, (ignore_assign)Type_Event_Param_479, (ignore_assign)Type_Event_Param_480, (ignore_assign)Type_Event_Param_481, (ignore_assign)Type_Event_Param_482, (ignore_assign)Type_Event_Param_483, (ignore_assign)Type_Event_Param_484, (ignore_assign)Type_Event_Param_485, (ignore_assign)Type_Event_Param_486, (ignore_assign)Type_Event_Param_487, (ignore_assign)Type_Event_Param_488, (ignore_assign)Type_Event_Param_489, (ignore_assign)Type_Event_Param_490, (ignore_assign)Type_Event_Param_491, (ignore_assign)Type_Event_Param_492, (ignore_assign)Type_Event_Param_493, (ignore_assign)Type_Event_Param_494, (ignore_assign)Type_Event_Param_495, (ignore_assign)Type_Event_Param_496, (ignore_assign)Type_Event_Param_497, (ignore_assign)Type_Event_Param_498, (ignore_assign)Type_Event_Param_499, (ignore_assign)Type_Event_Param_500, (ignore_assign)Type_Event_Param_501, (ignore_assign)Type_Event_Param_502, (ignore_assign)Type_Event_Param_503, (ignore_assign)Type_Event_Param_504, (ignore_assign)Type_Event_Param_505, (ignore_assign)Type_Event_Param_506, (ignore_assign)Type_Event_Param_507, (ignore_assign)Type_Event_Param_508, (ignore_assign)Type_Event_Param_509, (ignore_assign)Type_Event_Param_510, (ignore_assign)Type_Event_Param_511, (ignore_assign)Type_v1 = 512, (ignore_assign)Level_v1 = 513, (ignore_assign)AutoClearEvents = 514, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Type_Start = 0", "Type_Smoke_Alarm = 1", "Type_Carbon_Monoxide = 2", "Type_Carbon_Dioxide = 3", "Type_Heat = 4", "Type_Water = 5", "Type_Access_Control = 6", "Type_Home_Security = 7", "Type_Power_Management = 8", "Type_System = 9", "Type_Emergency = 10", "Type_Clock = 11", "Type_Appliance = 12", "Type_Home_Health = 13", "Type_Siren = 14", "Type_Water_Valve = 15", "Type_Weather = 16", "Type_Irrigation = 17", "Type_Gas = 18", "Type_Event_19", "Type_Event_20", "Type_Event_21", "Type_Event_22", "Type_Event_23", "Type_Event_24", "Type_Event_25", "Type_Event_26", "Type_Event_27", "Type_Event_28", "Type_Event_29", "Type_Event_30", "Type_Event_31", "Type_Event_32", "Type_Event_33", "Type_Event_34", "Type_Event_35", "Type_Event_36", "Type_Event_37", "Type_Event_38", "Type_Event_39", "Type_Event_40", "Type_Event_41", "Type_Event_42", "Type_Event_43", "Type_Event_44", "Type_Event_45", "Type_Event_46", "Type_Event_47", "Type_Event_48", "Type_Event_49", "Type_Event_50", "Type_Event_51", "Type_Event_52", "Type_Event_53", "Type_Event_54", "Type_Event_55", "Type_Event_56", "Type_Event_57", "Type_Event_58", "Type_Event_59", "Type_Event_60", "Type_Event_61", "Type_Event_62", "Type_Event_63", "Type_Event_64", "Type_Event_65", "Type_Event_66", "Type_Event_67", "Type_Event_68", "Type_Event_69", "Type_Event_70", "Type_Event_71", "Type_Event_72", "Type_Event_73", "Type_Event_74", "Type_Event_75", "Type_Event_76", "Type_Event_77", "Type_Event_78", "Type_Event_79", "Type_Event_80", "Type_Event_81", "Type_Event_82", "Type_Event_83", "Type_Event_84", "Type_Event_85", "Type_Event_86", "Type_Event_87", "Type_Event_88", "Type_Event_89", "Type_Event_90", "Type_Event_91", "Type_Event_92", "Type_Event_93", "Type_Event_94", "Type_Event_95", "Type_Event_96", "Type_Event_97", "Type_Event_98", "Type_Event_99", "Type_Event_100", "Type_Event_101", "Type_Event_102", "Type_Event_103", "Type_Event_104", "Type_Event_105", "Type_Event_106", "Type_Event_107", "Type_Event_108", "Type_Event_109", "Type_Event_110", "Type_Event_111", "Type_Event_112", "Type_Event_113", "Type_Event_114", "Type_Event_115", "Type_Event_116", "Type_Event_117", "Type_Event_118", "Type_Event_119", "Type_Event_120", "Type_Event_121", "Type_Event_122", "Type_Event_123", "Type_Event_124", "Type_Event_125", "Type_Event_126", "Type_Event_127", "Type_Event_128", "Type_Event_129", "Type_Event_130", "Type_Event_131", "Type_Event_132", "Type_Event_133", "Type_Event_134", "Type_Event_135", "Type_Event_136", "Type_Event_137", "Type_Event_138", "Type_Event_139", "Type_Event_140", "Type_Event_141", "Type_Event_142", "Type_Event_143", "Type_Event_144", "Type_Event_145", "Type_Event_146", "Type_Event_147", "Type_Event_148", "Type_Event_149", "Type_Event_150", "Type_Event_151", "Type_Event_152", "Type_Event_153", "Type_Event_154", "Type_Event_155", "Type_Event_156", "Type_Event_157", "Type_Event_158", "Type_Event_159", "Type_Event_160", "Type_Event_161", "Type_Event_162", "Type_Event_163", "Type_Event_164", "Type_Event_165", "Type_Event_166", "Type_Event_167", "Type_Event_168", "Type_Event_169", "Type_Event_170", "Type_Event_171", "Type_Event_172", "Type_Event_173", "Type_Event_174", "Type_Event_175", "Type_Event_176", "Type_Event_177", "Type_Event_178", "Type_Event_179", "Type_Event_180", "Type_Event_181", "Type_Event_182", "Type_Event_183", "Type_Event_184", "Type_Event_185", "Type_Event_186", "Type_Event_187", "Type_Event_188", "Type_Event_189", "Type_Event_190", "Type_Event_191", "Type_Event_192", "Type_Event_193", "Type_Event_194", "Type_Event_195", "Type_Event_196", "Type_Event_197", "Type_Event_198", "Type_Event_199", "Type_Event_200", "Type_Event_201", "Type_Event_202", "Type_Event_203", "Type_Event_204", "Type_Event_205", "Type_Event_206", "Type_Event_207", "Type_Event_208", "Type_Event_209", "Type_Event_210", "Type_Event_211", "Type_Event_212", "Type_Event_213", "Type_Event_214", "Type_Event_215", "Type_Event_216", "Type_Event_217", "Type_Event_218", "Type_Event_219", "Type_Event_220", "Type_Event_221", "Type_Event_222", "Type_Event_223", "Type_Event_224", "Type_Event_225", "Type_Event_226", "Type_Event_227", "Type_Event_228", "Type_Event_229", "Type_Event_230", "Type_Event_231", "Type_Event_232", "Type_Event_233", "Type_Event_234", "Type_Event_235", "Type_Event_236", "Type_Event_237", "Type_Event_238", "Type_Event_239", "Type_Event_240", "Type_Event_241", "Type_Event_242", "Type_Event_243", "Type_Event_244", "Type_Event_245", "Type_Event_246", "Type_Event_247", "Type_Event_248", "Type_Event_249", "Type_Event_250", "Type_Event_251", "Type_Event_252", "Type_Event_253", "Type_Event_254", "Type_Event_255", "Type_Event_Param_Previous_Event = 256", "Type_Event_Param_Location = 257", "Type_Event_Param_Result = 258", "Type_Event_Param_Threshold = 259", "Type_Event_Param_UserCode = 260", "Type_Event_Param_261 = 261", "Type_Event_Param_Progress = 262", "Type_Event_Param_Mode = 263", "Type_Event_Param_Obstruction = 264", "Type_Event_Param_Sensor_ID = 265", "Type_Event_Param_Error_Code = 266", "Type_Event_Param_Duration = 267", "Type_Event_Param_Pollution_Level = 268", "Type_Event_Param_Status = 269", "Type_Event_Param_Schedule_ID = 270", "Type_Event_Param_Valve_Table_ID = 271", "Type_Event_Param_272", "Type_Event_Param_273", "Type_Event_Param_274", "Type_Event_Param_275", "Type_Event_Param_276", "Type_Event_Param_277", "Type_Event_Param_278", "Type_Event_Param_279", "Type_Event_Param_280", "Type_Event_Param_281", "Type_Event_Param_282", "Type_Event_Param_283", "Type_Event_Param_284", "Type_Event_Param_285", "Type_Event_Param_286", "Type_Event_Param_287", "Type_Event_Param_288", "Type_Event_Param_289", "Type_Event_Param_290", "Type_Event_Param_291", "Type_Event_Param_292", "Type_Event_Param_293", "Type_Event_Param_294", "Type_Event_Param_295", "Type_Event_Param_296", "Type_Event_Param_297", "Type_Event_Param_298", "Type_Event_Param_299", "Type_Event_Param_300", "Type_Event_Param_301", "Type_Event_Param_302", "Type_Event_Param_303", "Type_Event_Param_304", "Type_Event_Param_305", "Type_Event_Param_306", "Type_Event_Param_307", "Type_Event_Param_308", "Type_Event_Param_309", "Type_Event_Param_310", "Type_Event_Param_311", "Type_Event_Param_312", "Type_Event_Param_313", "Type_Event_Param_314", "Type_Event_Param_315", "Type_Event_Param_316", "Type_Event_Param_317", "Type_Event_Param_318", "Type_Event_Param_319", "Type_Event_Param_320", "Type_Event_Param_321", "Type_Event_Param_322", "Type_Event_Param_323", "Type_Event_Param_324", "Type_Event_Param_325", "Type_Event_Param_326", "Type_Event_Param_327", "Type_Event_Param_328", "Type_Event_Param_329", "Type_Event_Param_330", "Type_Event_Param_331", "Type_Event_Param_332", "Type_Event_Param_333", "Type_Event_Param_334", "Type_Event_Param_335", "Type_Event_Param_336", "Type_Event_Param_337", "Type_Event_Param_338", "Type_Event_Param_339", "Type_Event_Param_340", "Type_Event_Param_341", "Type_Event_Param_342", "Type_Event_Param_343", "Type_Event_Param_344", "Type_Event_Param_345", "Type_Event_Param_346", "Type_Event_Param_347", "Type_Event_Param_348", "Type_Event_Param_349", "Type_Event_Param_350", "Type_Event_Param_351", "Type_Event_Param_352", "Type_Event_Param_353", "Type_Event_Param_354", "Type_Event_Param_355", "Type_Event_Param_356", "Type_Event_Param_357", "Type_Event_Param_358", "Type_Event_Param_359", "Type_Event_Param_360", "Type_Event_Param_361", "Type_Event_Param_362", "Type_Event_Param_363", "Type_Event_Param_364", "Type_Event_Param_365", "Type_Event_Param_366", "Type_Event_Param_367", "Type_Event_Param_368", "Type_Event_Param_369", "Type_Event_Param_370", "Type_Event_Param_371", "Type_Event_Param_372", "Type_Event_Param_373", "Type_Event_Param_374", "Type_Event_Param_375", "Type_Event_Param_376", "Type_Event_Param_377", "Type_Event_Param_378", "Type_Event_Param_379", "Type_Event_Param_380", "Type_Event_Param_381", "Type_Event_Param_382", "Type_Event_Param_383", "Type_Event_Param_384", "Type_Event_Param_385", "Type_Event_Param_386", "Type_Event_Param_387", "Type_Event_Param_388", "Type_Event_Param_389", "Type_Event_Param_390", "Type_Event_Param_391", "Type_Event_Param_392", "Type_Event_Param_393", "Type_Event_Param_394", "Type_Event_Param_395", "Type_Event_Param_396", "Type_Event_Param_397", "Type_Event_Param_398", "Type_Event_Param_399", "Type_Event_Param_400", "Type_Event_Param_401", "Type_Event_Param_402", "Type_Event_Param_403", "Type_Event_Param_404", "Type_Event_Param_405", "Type_Event_Param_406", "Type_Event_Param_407", "Type_Event_Param_408", "Type_Event_Param_409", "Type_Event_Param_410", "Type_Event_Param_411", "Type_Event_Param_412", "Type_Event_Param_413", "Type_Event_Param_414", "Type_Event_Param_415", "Type_Event_Param_416", "Type_Event_Param_417", "Type_Event_Param_418", "Type_Event_Param_419", "Type_Event_Param_420", "Type_Event_Param_421", "Type_Event_Param_422", "Type_Event_Param_423", "Type_Event_Param_424", "Type_Event_Param_425", "Type_Event_Param_426", "Type_Event_Param_427", "Type_Event_Param_428", "Type_Event_Param_429", "Type_Event_Param_430", "Type_Event_Param_431", "Type_Event_Param_432", "Type_Event_Param_433", "Type_Event_Param_434", "Type_Event_Param_435", "Type_Event_Param_436", "Type_Event_Param_437", "Type_Event_Param_438", "Type_Event_Param_439", "Type_Event_Param_440", "Type_Event_Param_441", "Type_Event_Param_442", "Type_Event_Param_443", "Type_Event_Param_444", "Type_Event_Param_445", "Type_Event_Param_446", "Type_Event_Param_447", "Type_Event_Param_448", "Type_Event_Param_449", "Type_Event_Param_450", "Type_Event_Param_451", "Type_Event_Param_452", "Type_Event_Param_453", "Type_Event_Param_454", "Type_Event_Param_455", "Type_Event_Param_456", "Type_Event_Param_457", "Type_Event_Param_458", "Type_Event_Param_459", "Type_Event_Param_460", "Type_Event_Param_461", "Type_Event_Param_462", "Type_Event_Param_463", "Type_Event_Param_464", "Type_Event_Param_465", "Type_Event_Param_466", "Type_Event_Param_467", "Type_Event_Param_468", "Type_Event_Param_469", "Type_Event_Param_470", "Type_Event_Param_471", "Type_Event_Param_472", "Type_Event_Param_473", "Type_Event_Param_474", "Type_Event_Param_475", "Type_Event_Param_476", "Type_Event_Param_477", "Type_Event_Param_478", "Type_Event_Param_479", "Type_Event_Param_480", "Type_Event_Param_481", "Type_Event_Param_482", "Type_Event_Param_483", "Type_Event_Param_484", "Type_Event_Param_485", "Type_Event_Param_486", "Type_Event_Param_487", "Type_Event_Param_488", "Type_Event_Param_489", "Type_Event_Param_490", "Type_Event_Param_491", "Type_Event_Param_492", "Type_Event_Param_493", "Type_Event_Param_494", "Type_Event_Param_495", "Type_Event_Param_496", "Type_Event_Param_497", "Type_Event_Param_498", "Type_Event_Param_499", "Type_Event_Param_500", "Type_Event_Param_501", "Type_Event_Param_502", "Type_Event_Param_503", "Type_Event_Param_504", "Type_Event_Param_505", "Type_Event_Param_506", "Type_Event_Param_507", "Type_Event_Param_508", "Type_Event_Param_509", "Type_Event_Param_510", "Type_Event_Param_511", "Type_v1 = 512", "Level_v1 = 513", "AutoClearEvents = 514", }; 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_AssociationCommandConfiguration { enum _enumerated { MaxCommandLength = 0, CommandsAreValues = 1, CommandsAreConfigurable = 2, NumFreeCommands = 3, MaxCommands = 4 }; _enumerated _value; ValueID_Index_AssociationCommandConfiguration(_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)MaxCommandLength = 0, (ignore_assign)CommandsAreValues = 1, (ignore_assign)CommandsAreConfigurable = 2, (ignore_assign)NumFreeCommands = 3, (ignore_assign)MaxCommands = 4, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "MaxCommandLength = 0", "CommandsAreValues = 1", "CommandsAreConfigurable = 2", "NumFreeCommands = 3", "MaxCommands = 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_BarrierOperator { enum _enumerated { Command = 0, Label = 1, SupportedSignals = 2, Audible = 3, Visual = 4 }; _enumerated _value; ValueID_Index_BarrierOperator(_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)Command = 0, (ignore_assign)Label = 1, (ignore_assign)SupportedSignals = 2, (ignore_assign)Audible = 3, (ignore_assign)Visual = 4, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Command = 0", "Label = 1", "SupportedSignals = 2", "Audible = 3", "Visual = 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_Basic { enum _enumerated { Set = 0, Target = 1, Duration = 2 }; _enumerated _value; ValueID_Index_Basic(_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 = 3; static const int* _values() { static const int values[] = { (ignore_assign)Set = 0, (ignore_assign)Target = 1, (ignore_assign)Duration = 2, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Set = 0", "Target = 1", "Duration = 2", }; 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_BasicWindowCovering { enum _enumerated { Open = 0, Close = 1 }; _enumerated _value; ValueID_Index_BasicWindowCovering(_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 = 2; static const int* _values() { static const int values[] = { (ignore_assign)Open = 0, (ignore_assign)Close = 1, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Open = 0", "Close = 1", }; 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_Battery { enum _enumerated { Level = 0 }; _enumerated _value; ValueID_Index_Battery(_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 = 1; static const int* _values() { static const int values[] = { (ignore_assign)Level = 0, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Level = 0", }; 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_CentralScene { enum _enumerated { Scene_1 = 1, Scene_2, Scene_3, Scene_4, Scene_5, Scene_6, Scene_7, Scene_8, Scene_9, Scene_10, Scene_11, Scene_12, Scene_13, Scene_14, Scene_15, Scene_16, Scene_17, Scene_18, Scene_19, Scene_20, Scene_21, Scene_22, Scene_23, Scene_24, Scene_25, Scene_26, Scene_27, Scene_28, Scene_29, Scene_30, Scene_31, Scene_32, Scene_33, Scene_34, Scene_35, Scene_36, Scene_37, Scene_38, Scene_39, Scene_40, Scene_41, Scene_42, Scene_43, Scene_44, Scene_45, Scene_46, Scene_47, Scene_48, Scene_49, Scene_50, Scene_51, Scene_52, Scene_53, Scene_54, Scene_55, Scene_56, Scene_57, Scene_58, Scene_59, Scene_60, Scene_61, Scene_62, Scene_63, Scene_64, Scene_65, Scene_66, Scene_67, Scene_68, Scene_69, Scene_70, Scene_71, Scene_72, Scene_73, Scene_74, Scene_75, Scene_76, Scene_77, Scene_78, Scene_79, Scene_80, Scene_81, Scene_82, Scene_83, Scene_84, Scene_85, Scene_86, Scene_87, Scene_88, Scene_89, Scene_90, Scene_91, Scene_92, Scene_93, Scene_94, Scene_95, Scene_96, Scene_97, Scene_98, Scene_99, Scene_100, Scene_101, Scene_102, Scene_103, Scene_104, Scene_105, Scene_106, Scene_107, Scene_108, Scene_109, Scene_110, Scene_111, Scene_112, Scene_113, Scene_114, Scene_115, Scene_116, Scene_117, Scene_118, Scene_119, Scene_120, Scene_121, Scene_122, Scene_123, Scene_124, Scene_125, Scene_126, Scene_127, Scene_128, Scene_129, Scene_130, Scene_131, Scene_132, Scene_133, Scene_134, Scene_135, Scene_136, Scene_137, Scene_138, Scene_139, Scene_140, Scene_141, Scene_142, Scene_143, Scene_144, Scene_145, Scene_146, Scene_147, Scene_148, Scene_149, Scene_150, Scene_151, Scene_152, Scene_153, Scene_154, Scene_155, Scene_156, Scene_157, Scene_158, Scene_159, Scene_160, Scene_161, Scene_162, Scene_163, Scene_164, Scene_165, Scene_166, Scene_167, Scene_168, Scene_169, Scene_170, Scene_171, Scene_172, Scene_173, Scene_174, Scene_175, Scene_176, Scene_177, Scene_178, Scene_179, Scene_180, Scene_181, Scene_182, Scene_183, Scene_184, Scene_185, Scene_186, Scene_187, Scene_188, Scene_189, Scene_190, Scene_191, Scene_192, Scene_193, Scene_194, Scene_195, Scene_196, Scene_197, Scene_198, Scene_199, Scene_200, Scene_201, Scene_202, Scene_203, Scene_204, Scene_205, Scene_206, Scene_207, Scene_208, Scene_209, Scene_210, Scene_211, Scene_212, Scene_213, Scene_214, Scene_215, Scene_216, Scene_217, Scene_218, Scene_219, Scene_220, Scene_221, Scene_222, Scene_223, Scene_224, Scene_225, Scene_226, Scene_227, Scene_228, Scene_229, Scene_230, Scene_231, Scene_232, Scene_233, Scene_234, Scene_235, Scene_236, Scene_237, Scene_238, Scene_239, Scene_240, Scene_241, Scene_242, Scene_243, Scene_244, Scene_245, Scene_246, Scene_247, Scene_248, Scene_249, Scene_250, Scene_251, Scene_252, Scene_253, Scene_254, Scene_255, SceneCount = 256, ClearSceneTimeout = 257 }; _enumerated _value; ValueID_Index_CentralScene(_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 = 257; static const int* _values() { static const int values[] = { (ignore_assign)Scene_1 = 1, (ignore_assign)Scene_2, (ignore_assign)Scene_3, (ignore_assign)Scene_4, (ignore_assign)Scene_5, (ignore_assign)Scene_6, (ignore_assign)Scene_7, (ignore_assign)Scene_8, (ignore_assign)Scene_9, (ignore_assign)Scene_10, (ignore_assign)Scene_11, (ignore_assign)Scene_12, (ignore_assign)Scene_13, (ignore_assign)Scene_14, (ignore_assign)Scene_15, (ignore_assign)Scene_16, (ignore_assign)Scene_17, (ignore_assign)Scene_18, (ignore_assign)Scene_19, (ignore_assign)Scene_20, (ignore_assign)Scene_21, (ignore_assign)Scene_22, (ignore_assign)Scene_23, (ignore_assign)Scene_24, (ignore_assign)Scene_25, (ignore_assign)Scene_26, (ignore_assign)Scene_27, (ignore_assign)Scene_28, (ignore_assign)Scene_29, (ignore_assign)Scene_30, (ignore_assign)Scene_31, (ignore_assign)Scene_32, (ignore_assign)Scene_33, (ignore_assign)Scene_34, (ignore_assign)Scene_35, (ignore_assign)Scene_36, (ignore_assign)Scene_37, (ignore_assign)Scene_38, (ignore_assign)Scene_39, (ignore_assign)Scene_40, (ignore_assign)Scene_41, (ignore_assign)Scene_42, (ignore_assign)Scene_43, (ignore_assign)Scene_44, (ignore_assign)Scene_45, (ignore_assign)Scene_46, (ignore_assign)Scene_47, (ignore_assign)Scene_48, (ignore_assign)Scene_49, (ignore_assign)Scene_50, (ignore_assign)Scene_51, (ignore_assign)Scene_52, (ignore_assign)Scene_53, (ignore_assign)Scene_54, (ignore_assign)Scene_55, (ignore_assign)Scene_56, (ignore_assign)Scene_57, (ignore_assign)Scene_58, (ignore_assign)Scene_59, (ignore_assign)Scene_60, (ignore_assign)Scene_61, (ignore_assign)Scene_62, (ignore_assign)Scene_63, (ignore_assign)Scene_64, (ignore_assign)Scene_65, (ignore_assign)Scene_66, (ignore_assign)Scene_67, (ignore_assign)Scene_68, (ignore_assign)Scene_69, (ignore_assign)Scene_70, (ignore_assign)Scene_71, (ignore_assign)Scene_72, (ignore_assign)Scene_73, (ignore_assign)Scene_74, (ignore_assign)Scene_75, (ignore_assign)Scene_76, (ignore_assign)Scene_77, (ignore_assign)Scene_78, (ignore_assign)Scene_79, (ignore_assign)Scene_80, (ignore_assign)Scene_81, (ignore_assign)Scene_82, (ignore_assign)Scene_83, (ignore_assign)Scene_84, (ignore_assign)Scene_85, (ignore_assign)Scene_86, (ignore_assign)Scene_87, (ignore_assign)Scene_88, (ignore_assign)Scene_89, (ignore_assign)Scene_90, (ignore_assign)Scene_91, (ignore_assign)Scene_92, (ignore_assign)Scene_93, (ignore_assign)Scene_94, (ignore_assign)Scene_95, (ignore_assign)Scene_96, (ignore_assign)Scene_97, (ignore_assign)Scene_98, (ignore_assign)Scene_99, (ignore_assign)Scene_100, (ignore_assign)Scene_101, (ignore_assign)Scene_102, (ignore_assign)Scene_103, (ignore_assign)Scene_104, (ignore_assign)Scene_105, (ignore_assign)Scene_106, (ignore_assign)Scene_107, (ignore_assign)Scene_108, (ignore_assign)Scene_109, (ignore_assign)Scene_110, (ignore_assign)Scene_111, (ignore_assign)Scene_112, (ignore_assign)Scene_113, (ignore_assign)Scene_114, (ignore_assign)Scene_115, (ignore_assign)Scene_116, (ignore_assign)Scene_117, (ignore_assign)Scene_118, (ignore_assign)Scene_119, (ignore_assign)Scene_120, (ignore_assign)Scene_121, (ignore_assign)Scene_122, (ignore_assign)Scene_123, (ignore_assign)Scene_124, (ignore_assign)Scene_125, (ignore_assign)Scene_126, (ignore_assign)Scene_127, (ignore_assign)Scene_128, (ignore_assign)Scene_129, (ignore_assign)Scene_130, (ignore_assign)Scene_131, (ignore_assign)Scene_132, (ignore_assign)Scene_133, (ignore_assign)Scene_134, (ignore_assign)Scene_135, (ignore_assign)Scene_136, (ignore_assign)Scene_137, (ignore_assign)Scene_138, (ignore_assign)Scene_139, (ignore_assign)Scene_140, (ignore_assign)Scene_141, (ignore_assign)Scene_142, (ignore_assign)Scene_143, (ignore_assign)Scene_144, (ignore_assign)Scene_145, (ignore_assign)Scene_146, (ignore_assign)Scene_147, (ignore_assign)Scene_148, (ignore_assign)Scene_149, (ignore_assign)Scene_150, (ignore_assign)Scene_151, (ignore_assign)Scene_152, (ignore_assign)Scene_153, (ignore_assign)Scene_154, (ignore_assign)Scene_155, (ignore_assign)Scene_156, (ignore_assign)Scene_157, (ignore_assign)Scene_158, (ignore_assign)Scene_159, (ignore_assign)Scene_160, (ignore_assign)Scene_161, (ignore_assign)Scene_162, (ignore_assign)Scene_163, (ignore_assign)Scene_164, (ignore_assign)Scene_165, (ignore_assign)Scene_166, (ignore_assign)Scene_167, (ignore_assign)Scene_168, (ignore_assign)Scene_169, (ignore_assign)Scene_170, (ignore_assign)Scene_171, (ignore_assign)Scene_172, (ignore_assign)Scene_173, (ignore_assign)Scene_174, (ignore_assign)Scene_175, (ignore_assign)Scene_176, (ignore_assign)Scene_177, (ignore_assign)Scene_178, (ignore_assign)Scene_179, (ignore_assign)Scene_180, (ignore_assign)Scene_181, (ignore_assign)Scene_182, (ignore_assign)Scene_183, (ignore_assign)Scene_184, (ignore_assign)Scene_185, (ignore_assign)Scene_186, (ignore_assign)Scene_187, (ignore_assign)Scene_188, (ignore_assign)Scene_189, (ignore_assign)Scene_190, (ignore_assign)Scene_191, (ignore_assign)Scene_192, (ignore_assign)Scene_193, (ignore_assign)Scene_194, (ignore_assign)Scene_195, (ignore_assign)Scene_196, (ignore_assign)Scene_197, (ignore_assign)Scene_198, (ignore_assign)Scene_199, (ignore_assign)Scene_200, (ignore_assign)Scene_201, (ignore_assign)Scene_202, (ignore_assign)Scene_203, (ignore_assign)Scene_204, (ignore_assign)Scene_205, (ignore_assign)Scene_206, (ignore_assign)Scene_207, (ignore_assign)Scene_208, (ignore_assign)Scene_209, (ignore_assign)Scene_210, (ignore_assign)Scene_211, (ignore_assign)Scene_212, (ignore_assign)Scene_213, (ignore_assign)Scene_214, (ignore_assign)Scene_215, (ignore_assign)Scene_216, (ignore_assign)Scene_217, (ignore_assign)Scene_218, (ignore_assign)Scene_219, (ignore_assign)Scene_220, (ignore_assign)Scene_221, (ignore_assign)Scene_222, (ignore_assign)Scene_223, (ignore_assign)Scene_224, (ignore_assign)Scene_225, (ignore_assign)Scene_226, (ignore_assign)Scene_227, (ignore_assign)Scene_228, (ignore_assign)Scene_229, (ignore_assign)Scene_230, (ignore_assign)Scene_231, (ignore_assign)Scene_232, (ignore_assign)Scene_233, (ignore_assign)Scene_234, (ignore_assign)Scene_235, (ignore_assign)Scene_236, (ignore_assign)Scene_237, (ignore_assign)Scene_238, (ignore_assign)Scene_239, (ignore_assign)Scene_240, (ignore_assign)Scene_241, (ignore_assign)Scene_242, (ignore_assign)Scene_243, (ignore_assign)Scene_244, (ignore_assign)Scene_245, (ignore_assign)Scene_246, (ignore_assign)Scene_247, (ignore_assign)Scene_248, (ignore_assign)Scene_249, (ignore_assign)Scene_250, (ignore_assign)Scene_251, (ignore_assign)Scene_252, (ignore_assign)Scene_253, (ignore_assign)Scene_254, (ignore_assign)Scene_255, (ignore_assign)SceneCount = 256, (ignore_assign)ClearSceneTimeout = 257, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Scene_1 = 1", "Scene_2", "Scene_3", "Scene_4", "Scene_5", "Scene_6", "Scene_7", "Scene_8", "Scene_9", "Scene_10", "Scene_11", "Scene_12", "Scene_13", "Scene_14", "Scene_15", "Scene_16", "Scene_17", "Scene_18", "Scene_19", "Scene_20", "Scene_21", "Scene_22", "Scene_23", "Scene_24", "Scene_25", "Scene_26", "Scene_27", "Scene_28", "Scene_29", "Scene_30", "Scene_31", "Scene_32", "Scene_33", "Scene_34", "Scene_35", "Scene_36", "Scene_37", "Scene_38", "Scene_39", "Scene_40", "Scene_41", "Scene_42", "Scene_43", "Scene_44", "Scene_45", "Scene_46", "Scene_47", "Scene_48", "Scene_49", "Scene_50", "Scene_51", "Scene_52", "Scene_53", "Scene_54", "Scene_55", "Scene_56", "Scene_57", "Scene_58", "Scene_59", "Scene_60", "Scene_61", "Scene_62", "Scene_63", "Scene_64", "Scene_65", "Scene_66", "Scene_67", "Scene_68", "Scene_69", "Scene_70", "Scene_71", "Scene_72", "Scene_73", "Scene_74", "Scene_75", "Scene_76", "Scene_77", "Scene_78", "Scene_79", "Scene_80", "Scene_81", "Scene_82", "Scene_83", "Scene_84", "Scene_85", "Scene_86", "Scene_87", "Scene_88", "Scene_89", "Scene_90", "Scene_91", "Scene_92", "Scene_93", "Scene_94", "Scene_95", "Scene_96", "Scene_97", "Scene_98", "Scene_99", "Scene_100", "Scene_101", "Scene_102", "Scene_103", "Scene_104", "Scene_105", "Scene_106", "Scene_107", "Scene_108", "Scene_109", "Scene_110", "Scene_111", "Scene_112", "Scene_113", "Scene_114", "Scene_115", "Scene_116", "Scene_117", "Scene_118", "Scene_119", "Scene_120", "Scene_121", "Scene_122", "Scene_123", "Scene_124", "Scene_125", "Scene_126", "Scene_127", "Scene_128", "Scene_129", "Scene_130", "Scene_131", "Scene_132", "Scene_133", "Scene_134", "Scene_135", "Scene_136", "Scene_137", "Scene_138", "Scene_139", "Scene_140", "Scene_141", "Scene_142", "Scene_143", "Scene_144", "Scene_145", "Scene_146", "Scene_147", "Scene_148", "Scene_149", "Scene_150", "Scene_151", "Scene_152", "Scene_153", "Scene_154", "Scene_155", "Scene_156", "Scene_157", "Scene_158", "Scene_159", "Scene_160", "Scene_161", "Scene_162", "Scene_163", "Scene_164", "Scene_165", "Scene_166", "Scene_167", "Scene_168", "Scene_169", "Scene_170", "Scene_171", "Scene_172", "Scene_173", "Scene_174", "Scene_175", "Scene_176", "Scene_177", "Scene_178", "Scene_179", "Scene_180", "Scene_181", "Scene_182", "Scene_183", "Scene_184", "Scene_185", "Scene_186", "Scene_187", "Scene_188", "Scene_189", "Scene_190", "Scene_191", "Scene_192", "Scene_193", "Scene_194", "Scene_195", "Scene_196", "Scene_197", "Scene_198", "Scene_199", "Scene_200", "Scene_201", "Scene_202", "Scene_203", "Scene_204", "Scene_205", "Scene_206", "Scene_207", "Scene_208", "Scene_209", "Scene_210", "Scene_211", "Scene_212", "Scene_213", "Scene_214", "Scene_215", "Scene_216", "Scene_217", "Scene_218", "Scene_219", "Scene_220", "Scene_221", "Scene_222", "Scene_223", "Scene_224", "Scene_225", "Scene_226", "Scene_227", "Scene_228", "Scene_229", "Scene_230", "Scene_231", "Scene_232", "Scene_233", "Scene_234", "Scene_235", "Scene_236", "Scene_237", "Scene_238", "Scene_239", "Scene_240", "Scene_241", "Scene_242", "Scene_243", "Scene_244", "Scene_245", "Scene_246", "Scene_247", "Scene_248", "Scene_249", "Scene_250", "Scene_251", "Scene_252", "Scene_253", "Scene_254", "Scene_255", "SceneCount = 256", "ClearSceneTimeout = 257", }; 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_ClimateControlSchedule { enum _enumerated { 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 }; _enumerated _value; ValueID_Index_ClimateControlSchedule(_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 = 9; static const int* _values() { static const int values[] = { (ignore_assign)DOW_Monday = 1, (ignore_assign)DOW_Tuesday = 2, (ignore_assign)DOW_Wednesday = 3, (ignore_assign)DOW_Thursday = 4, (ignore_assign)DOW_Friday = 5, (ignore_assign)DOW_Saturday = 6, (ignore_assign)DOW_Sunday = 7, (ignore_assign)OverrideState = 8, (ignore_assign)OverrideSetback = 9, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "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", }; 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_Clock { enum _enumerated { Day = 0, Hour = 1, Minute = 2 }; _enumerated _value; ValueID_Index_Clock(_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 = 3; static const int* _values() { static const int values[] = { (ignore_assign)Day = 0, (ignore_assign)Hour = 1, (ignore_assign)Minute = 2, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Day = 0", "Hour = 1", "Minute = 2", }; 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; } };; - - - - - - struct ValueID_Index_Configuration { enum _enumerated { Parameter_1 = 1, Parameter_2, Parameter_3, Parameter_4, Parameter_5, Parameter_6, Parameter_7, Parameter_8, Parameter_9, Parameter_10, Parameter_11, Parameter_12, Parameter_13, Parameter_14, Parameter_15, Parameter_16, Parameter_17, Parameter_18, Parameter_19, Parameter_20, Parameter_21, Parameter_22, Parameter_23, Parameter_24, Parameter_25, Parameter_26, Parameter_27, Parameter_28, Parameter_29, Parameter_30, Parameter_31, Parameter_32, Parameter_33, Parameter_34, Parameter_35, Parameter_36, Parameter_37, Parameter_38, Parameter_39, Parameter_40, Parameter_41, Parameter_42, Parameter_43, Parameter_44, Parameter_45, Parameter_46, Parameter_47, Parameter_48, Parameter_49, Parameter_50, Parameter_51, Parameter_52, Parameter_53, Parameter_54, Parameter_55, Parameter_56, Parameter_57, Parameter_58, Parameter_59, Parameter_60, Parameter_61, Parameter_62, Parameter_63, Parameter_64, Parameter_65, Parameter_66, Parameter_67, Parameter_68, Parameter_69, Parameter_70, Parameter_71, Parameter_72, Parameter_73, Parameter_74, Parameter_75, Parameter_76, Parameter_77, Parameter_78, Parameter_79, Parameter_80, Parameter_81, Parameter_82, Parameter_83, Parameter_84, Parameter_85, Parameter_86, Parameter_87, Parameter_88, Parameter_89, Parameter_90, Parameter_91, Parameter_92, Parameter_93, Parameter_94, Parameter_95, Parameter_96, Parameter_97, Parameter_98, Parameter_99, Parameter_100, Parameter_101, Parameter_102, Parameter_103, Parameter_104, Parameter_105, Parameter_106, Parameter_107, Parameter_108, Parameter_109, Parameter_110, Parameter_111, Parameter_112, Parameter_113, Parameter_114, Parameter_115, Parameter_116, Parameter_117, Parameter_118, Parameter_119, Parameter_120, Parameter_121, Parameter_122, Parameter_123, Parameter_124, Parameter_125, Parameter_126, Parameter_127, Parameter_128, Parameter_129, Parameter_130, Parameter_131, Parameter_132, Parameter_133, Parameter_134, Parameter_135, Parameter_136, Parameter_137, Parameter_138, Parameter_139, Parameter_140, Parameter_141, Parameter_142, Parameter_143, Parameter_144, Parameter_145, Parameter_146, Parameter_147, Parameter_148, Parameter_149, Parameter_150, Parameter_151, Parameter_152, Parameter_153, Parameter_154, Parameter_155, Parameter_156, Parameter_157, Parameter_158, Parameter_159, Parameter_160, Parameter_161, Parameter_162, Parameter_163, Parameter_164, Parameter_165, Parameter_166, Parameter_167, Parameter_168, Parameter_169, Parameter_170, Parameter_171, Parameter_172, Parameter_173, Parameter_174, Parameter_175, Parameter_176, Parameter_177, Parameter_178, Parameter_179, Parameter_180, Parameter_181, Parameter_182, Parameter_183, Parameter_184, Parameter_185, Parameter_186, Parameter_187, Parameter_188, Parameter_189, Parameter_190, Parameter_191, Parameter_192, Parameter_193, Parameter_194, Parameter_195, Parameter_196, Parameter_197, Parameter_198, Parameter_199, Parameter_200, Parameter_201, Parameter_202, Parameter_203, Parameter_204, Parameter_205, Parameter_206, Parameter_207, Parameter_208, Parameter_209, Parameter_210, Parameter_211, Parameter_212, Parameter_213, Parameter_214, Parameter_215, Parameter_216, Parameter_217, Parameter_218, Parameter_219, Parameter_220, Parameter_221, Parameter_222, Parameter_223, Parameter_224, Parameter_225, Parameter_226, Parameter_227, Parameter_228, Parameter_229, Parameter_230, Parameter_231, Parameter_232, Parameter_233, Parameter_234, Parameter_235, Parameter_236, Parameter_237, Parameter_238, Parameter_239, Parameter_240, Parameter_241, Parameter_242, Parameter_243, Parameter_244, Parameter_245, Parameter_246, Parameter_247, Parameter_248, Parameter_249, Parameter_250, Parameter_251, Parameter_252, Parameter_253, Parameter_254, Parameter_255 }; _enumerated _value; ValueID_Index_Configuration(_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 = 255; static const int* _values() { static const int values[] = { (ignore_assign)Parameter_1 = 1, (ignore_assign)Parameter_2, (ignore_assign)Parameter_3, (ignore_assign)Parameter_4, (ignore_assign)Parameter_5, (ignore_assign)Parameter_6, (ignore_assign)Parameter_7, (ignore_assign)Parameter_8, (ignore_assign)Parameter_9, (ignore_assign)Parameter_10, (ignore_assign)Parameter_11, (ignore_assign)Parameter_12, (ignore_assign)Parameter_13, (ignore_assign)Parameter_14, (ignore_assign)Parameter_15, (ignore_assign)Parameter_16, (ignore_assign)Parameter_17, (ignore_assign)Parameter_18, (ignore_assign)Parameter_19, (ignore_assign)Parameter_20, (ignore_assign)Parameter_21, (ignore_assign)Parameter_22, (ignore_assign)Parameter_23, (ignore_assign)Parameter_24, (ignore_assign)Parameter_25, (ignore_assign)Parameter_26, (ignore_assign)Parameter_27, (ignore_assign)Parameter_28, (ignore_assign)Parameter_29, (ignore_assign)Parameter_30, (ignore_assign)Parameter_31, (ignore_assign)Parameter_32, (ignore_assign)Parameter_33, (ignore_assign)Parameter_34, (ignore_assign)Parameter_35, (ignore_assign)Parameter_36, (ignore_assign)Parameter_37, (ignore_assign)Parameter_38, (ignore_assign)Parameter_39, (ignore_assign)Parameter_40, (ignore_assign)Parameter_41, (ignore_assign)Parameter_42, (ignore_assign)Parameter_43, (ignore_assign)Parameter_44, (ignore_assign)Parameter_45, (ignore_assign)Parameter_46, (ignore_assign)Parameter_47, (ignore_assign)Parameter_48, (ignore_assign)Parameter_49, (ignore_assign)Parameter_50, (ignore_assign)Parameter_51, (ignore_assign)Parameter_52, (ignore_assign)Parameter_53, (ignore_assign)Parameter_54, (ignore_assign)Parameter_55, (ignore_assign)Parameter_56, (ignore_assign)Parameter_57, (ignore_assign)Parameter_58, (ignore_assign)Parameter_59, (ignore_assign)Parameter_60, (ignore_assign)Parameter_61, (ignore_assign)Parameter_62, (ignore_assign)Parameter_63, (ignore_assign)Parameter_64, (ignore_assign)Parameter_65, (ignore_assign)Parameter_66, (ignore_assign)Parameter_67, (ignore_assign)Parameter_68, (ignore_assign)Parameter_69, (ignore_assign)Parameter_70, (ignore_assign)Parameter_71, (ignore_assign)Parameter_72, (ignore_assign)Parameter_73, (ignore_assign)Parameter_74, (ignore_assign)Parameter_75, (ignore_assign)Parameter_76, (ignore_assign)Parameter_77, (ignore_assign)Parameter_78, (ignore_assign)Parameter_79, (ignore_assign)Parameter_80, (ignore_assign)Parameter_81, (ignore_assign)Parameter_82, (ignore_assign)Parameter_83, (ignore_assign)Parameter_84, (ignore_assign)Parameter_85, (ignore_assign)Parameter_86, (ignore_assign)Parameter_87, (ignore_assign)Parameter_88, (ignore_assign)Parameter_89, (ignore_assign)Parameter_90, (ignore_assign)Parameter_91, (ignore_assign)Parameter_92, (ignore_assign)Parameter_93, (ignore_assign)Parameter_94, (ignore_assign)Parameter_95, (ignore_assign)Parameter_96, (ignore_assign)Parameter_97, (ignore_assign)Parameter_98, (ignore_assign)Parameter_99, (ignore_assign)Parameter_100, (ignore_assign)Parameter_101, (ignore_assign)Parameter_102, (ignore_assign)Parameter_103, (ignore_assign)Parameter_104, (ignore_assign)Parameter_105, (ignore_assign)Parameter_106, (ignore_assign)Parameter_107, (ignore_assign)Parameter_108, (ignore_assign)Parameter_109, (ignore_assign)Parameter_110, (ignore_assign)Parameter_111, (ignore_assign)Parameter_112, (ignore_assign)Parameter_113, (ignore_assign)Parameter_114, (ignore_assign)Parameter_115, (ignore_assign)Parameter_116, (ignore_assign)Parameter_117, (ignore_assign)Parameter_118, (ignore_assign)Parameter_119, (ignore_assign)Parameter_120, (ignore_assign)Parameter_121, (ignore_assign)Parameter_122, (ignore_assign)Parameter_123, (ignore_assign)Parameter_124, (ignore_assign)Parameter_125, (ignore_assign)Parameter_126, (ignore_assign)Parameter_127, (ignore_assign)Parameter_128, (ignore_assign)Parameter_129, (ignore_assign)Parameter_130, (ignore_assign)Parameter_131, (ignore_assign)Parameter_132, (ignore_assign)Parameter_133, (ignore_assign)Parameter_134, (ignore_assign)Parameter_135, (ignore_assign)Parameter_136, (ignore_assign)Parameter_137, (ignore_assign)Parameter_138, (ignore_assign)Parameter_139, (ignore_assign)Parameter_140, (ignore_assign)Parameter_141, (ignore_assign)Parameter_142, (ignore_assign)Parameter_143, (ignore_assign)Parameter_144, (ignore_assign)Parameter_145, (ignore_assign)Parameter_146, (ignore_assign)Parameter_147, (ignore_assign)Parameter_148, (ignore_assign)Parameter_149, (ignore_assign)Parameter_150, (ignore_assign)Parameter_151, (ignore_assign)Parameter_152, (ignore_assign)Parameter_153, (ignore_assign)Parameter_154, (ignore_assign)Parameter_155, (ignore_assign)Parameter_156, (ignore_assign)Parameter_157, (ignore_assign)Parameter_158, (ignore_assign)Parameter_159, (ignore_assign)Parameter_160, (ignore_assign)Parameter_161, (ignore_assign)Parameter_162, (ignore_assign)Parameter_163, (ignore_assign)Parameter_164, (ignore_assign)Parameter_165, (ignore_assign)Parameter_166, (ignore_assign)Parameter_167, (ignore_assign)Parameter_168, (ignore_assign)Parameter_169, (ignore_assign)Parameter_170, (ignore_assign)Parameter_171, (ignore_assign)Parameter_172, (ignore_assign)Parameter_173, (ignore_assign)Parameter_174, (ignore_assign)Parameter_175, (ignore_assign)Parameter_176, (ignore_assign)Parameter_177, (ignore_assign)Parameter_178, (ignore_assign)Parameter_179, (ignore_assign)Parameter_180, (ignore_assign)Parameter_181, (ignore_assign)Parameter_182, (ignore_assign)Parameter_183, (ignore_assign)Parameter_184, (ignore_assign)Parameter_185, (ignore_assign)Parameter_186, (ignore_assign)Parameter_187, (ignore_assign)Parameter_188, (ignore_assign)Parameter_189, (ignore_assign)Parameter_190, (ignore_assign)Parameter_191, (ignore_assign)Parameter_192, (ignore_assign)Parameter_193, (ignore_assign)Parameter_194, (ignore_assign)Parameter_195, (ignore_assign)Parameter_196, (ignore_assign)Parameter_197, (ignore_assign)Parameter_198, (ignore_assign)Parameter_199, (ignore_assign)Parameter_200, (ignore_assign)Parameter_201, (ignore_assign)Parameter_202, (ignore_assign)Parameter_203, (ignore_assign)Parameter_204, (ignore_assign)Parameter_205, (ignore_assign)Parameter_206, (ignore_assign)Parameter_207, (ignore_assign)Parameter_208, (ignore_assign)Parameter_209, (ignore_assign)Parameter_210, (ignore_assign)Parameter_211, (ignore_assign)Parameter_212, (ignore_assign)Parameter_213, (ignore_assign)Parameter_214, (ignore_assign)Parameter_215, (ignore_assign)Parameter_216, (ignore_assign)Parameter_217, (ignore_assign)Parameter_218, (ignore_assign)Parameter_219, (ignore_assign)Parameter_220, (ignore_assign)Parameter_221, (ignore_assign)Parameter_222, (ignore_assign)Parameter_223, (ignore_assign)Parameter_224, (ignore_assign)Parameter_225, (ignore_assign)Parameter_226, (ignore_assign)Parameter_227, (ignore_assign)Parameter_228, (ignore_assign)Parameter_229, (ignore_assign)Parameter_230, (ignore_assign)Parameter_231, (ignore_assign)Parameter_232, (ignore_assign)Parameter_233, (ignore_assign)Parameter_234, (ignore_assign)Parameter_235, (ignore_assign)Parameter_236, (ignore_assign)Parameter_237, (ignore_assign)Parameter_238, (ignore_assign)Parameter_239, (ignore_assign)Parameter_240, (ignore_assign)Parameter_241, (ignore_assign)Parameter_242, (ignore_assign)Parameter_243, (ignore_assign)Parameter_244, (ignore_assign)Parameter_245, (ignore_assign)Parameter_246, (ignore_assign)Parameter_247, (ignore_assign)Parameter_248, (ignore_assign)Parameter_249, (ignore_assign)Parameter_250, (ignore_assign)Parameter_251, (ignore_assign)Parameter_252, (ignore_assign)Parameter_253, (ignore_assign)Parameter_254, (ignore_assign)Parameter_255, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Parameter_1 = 1", "Parameter_2", "Parameter_3", "Parameter_4", "Parameter_5", "Parameter_6", "Parameter_7", "Parameter_8", "Parameter_9", "Parameter_10", "Parameter_11", "Parameter_12", "Parameter_13", "Parameter_14", "Parameter_15", "Parameter_16", "Parameter_17", "Parameter_18", "Parameter_19", "Parameter_20", "Parameter_21", "Parameter_22", "Parameter_23", "Parameter_24", "Parameter_25", "Parameter_26", "Parameter_27", "Parameter_28", "Parameter_29", "Parameter_30", "Parameter_31", "Parameter_32", "Parameter_33", "Parameter_34", "Parameter_35", "Parameter_36", "Parameter_37", "Parameter_38", "Parameter_39", "Parameter_40", "Parameter_41", "Parameter_42", "Parameter_43", "Parameter_44", "Parameter_45", "Parameter_46", "Parameter_47", "Parameter_48", "Parameter_49", "Parameter_50", "Parameter_51", "Parameter_52", "Parameter_53", "Parameter_54", "Parameter_55", "Parameter_56", "Parameter_57", "Parameter_58", "Parameter_59", "Parameter_60", "Parameter_61", "Parameter_62", "Parameter_63", "Parameter_64", "Parameter_65", "Parameter_66", "Parameter_67", "Parameter_68", "Parameter_69", "Parameter_70", "Parameter_71", "Parameter_72", "Parameter_73", "Parameter_74", "Parameter_75", "Parameter_76", "Parameter_77", "Parameter_78", "Parameter_79", "Parameter_80", "Parameter_81", "Parameter_82", "Parameter_83", "Parameter_84", "Parameter_85", "Parameter_86", "Parameter_87", "Parameter_88", "Parameter_89", "Parameter_90", "Parameter_91", "Parameter_92", "Parameter_93", "Parameter_94", "Parameter_95", "Parameter_96", "Parameter_97", "Parameter_98", "Parameter_99", "Parameter_100", "Parameter_101", "Parameter_102", "Parameter_103", "Parameter_104", "Parameter_105", "Parameter_106", "Parameter_107", "Parameter_108", "Parameter_109", "Parameter_110", "Parameter_111", "Parameter_112", "Parameter_113", "Parameter_114", "Parameter_115", "Parameter_116", "Parameter_117", "Parameter_118", "Parameter_119", "Parameter_120", "Parameter_121", "Parameter_122", "Parameter_123", "Parameter_124", "Parameter_125", "Parameter_126", "Parameter_127", "Parameter_128", "Parameter_129", "Parameter_130", "Parameter_131", "Parameter_132", "Parameter_133", "Parameter_134", "Parameter_135", "Parameter_136", "Parameter_137", "Parameter_138", "Parameter_139", "Parameter_140", "Parameter_141", "Parameter_142", "Parameter_143", "Parameter_144", "Parameter_145", "Parameter_146", "Parameter_147", "Parameter_148", "Parameter_149", "Parameter_150", "Parameter_151", "Parameter_152", "Parameter_153", "Parameter_154", "Parameter_155", "Parameter_156", "Parameter_157", "Parameter_158", "Parameter_159", "Parameter_160", "Parameter_161", "Parameter_162", "Parameter_163", "Parameter_164", "Parameter_165", "Parameter_166", "Parameter_167", "Parameter_168", "Parameter_169", "Parameter_170", "Parameter_171", "Parameter_172", "Parameter_173", "Parameter_174", "Parameter_175", "Parameter_176", "Parameter_177", "Parameter_178", "Parameter_179", "Parameter_180", "Parameter_181", "Parameter_182", "Parameter_183", "Parameter_184", "Parameter_185", "Parameter_186", "Parameter_187", "Parameter_188", "Parameter_189", "Parameter_190", "Parameter_191", "Parameter_192", "Parameter_193", "Parameter_194", "Parameter_195", "Parameter_196", "Parameter_197", "Parameter_198", "Parameter_199", "Parameter_200", "Parameter_201", "Parameter_202", "Parameter_203", "Parameter_204", "Parameter_205", "Parameter_206", "Parameter_207", "Parameter_208", "Parameter_209", "Parameter_210", "Parameter_211", "Parameter_212", "Parameter_213", "Parameter_214", "Parameter_215", "Parameter_216", "Parameter_217", "Parameter_218", "Parameter_219", "Parameter_220", "Parameter_221", "Parameter_222", "Parameter_223", "Parameter_224", "Parameter_225", "Parameter_226", "Parameter_227", "Parameter_228", "Parameter_229", "Parameter_230", "Parameter_231", "Parameter_232", "Parameter_233", "Parameter_234", "Parameter_235", "Parameter_236", "Parameter_237", "Parameter_238", "Parameter_239", "Parameter_240", "Parameter_241", "Parameter_242", "Parameter_243", "Parameter_244", "Parameter_245", "Parameter_246", "Parameter_247", "Parameter_248", "Parameter_249", "Parameter_250", "Parameter_251", "Parameter_252", "Parameter_253", "Parameter_254", "Parameter_255", }; 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_ControllerReplication { enum _enumerated { NodeId = 0, Function = 1, Replicate = 2 }; _enumerated _value; ValueID_Index_ControllerReplication(_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 = 3; static const int* _values() { static const int values[] = { (ignore_assign)NodeId = 0, (ignore_assign)Function = 1, (ignore_assign)Replicate = 2, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "NodeId = 0", "Function = 1", "Replicate = 2", }; 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_DoorLock { enum _enumerated { 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 }; _enumerated _value; ValueID_Index_DoorLock(_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 = 7; static const int* _values() { static const int values[] = { (ignore_assign)Lock = 0, (ignore_assign)Lock_Mode = 1, (ignore_assign)System_Config_Mode = 2, (ignore_assign)System_Config_Minutes = 3, (ignore_assign)System_Config_Seconds = 4, (ignore_assign)System_Config_OutsideHandles = 5, (ignore_assign)System_Config_InsideHandles = 6, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "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", }; 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_DoorLockLogging { enum _enumerated { System_Config_MaxRecords = 0, GetRecordNo = 1, LogRecord = 2 }; _enumerated _value; ValueID_Index_DoorLockLogging(_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 = 3; static const int* _values() { static const int values[] = { (ignore_assign)System_Config_MaxRecords = 0, (ignore_assign)GetRecordNo = 1, (ignore_assign)LogRecord = 2, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "System_Config_MaxRecords = 0", "GetRecordNo = 1", "LogRecord = 2", }; 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_EnergyProduction { enum _enumerated { Instant = 0, Total = 1, Today = 2, Time = 3 }; _enumerated _value; ValueID_Index_EnergyProduction(_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)Instant = 0, (ignore_assign)Total = 1, (ignore_assign)Today = 2, (ignore_assign)Time = 3, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Instant = 0", "Total = 1", "Today = 2", "Time = 3", }; 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_Indicator { enum _enumerated { Indicator = 0, Armed = 1, Not_Armed, Ready, Fault, Busy, Enter_ID, Enter_PIN, Code_Accepted, Code_Not_Accepted, Armed_Stay, Armed_Away, Alarming, Alarming_Burglar, Alarming_Smoke_Fire, Alarming_Carbon_Monoxide, Bypass_Challenge, Entry_Delay, Exit_Delay, Alarming_Medical, Alarming_Freeze_Warning, Alarming_Water_Leak, Alarming_Panic, Zone_1_Armed = 0x20, Zone_2_Armed, Zone_3_Armed, Zone_4_Armed, Zone_5_Armed, Zone_6_Armed, Zone_7_Armed, Zone_8_Armed, LCD_Backlight = 0x30, Button_Backlight_Letters = 0x40, Button_Backlight_Digits, Button_Backlight_Command, Button_1_Indication, Button_2_Indication, Button_3_Indication, Button_4_Indication, Button_5_Indication, Button_6_Indication, Button_7_Indication, Button_8_Indication, Button_9_Indication, Button_10_Indication, Button_11_Indication, Button_12_Indication, Node_Identify = 0x50, Generic_Event_Sound_Notification_1 = 0x60, Generic_Event_Sound_Notification_2, Generic_Event_Sound_Notification_3, Generic_Event_Sound_Notification_4, Generic_Event_Sound_Notification_5, Generic_Event_Sound_Notification_6, Generic_Event_Sound_Notification_7, Generic_Event_Sound_Notification_8, Generic_Event_Sound_Notification_9, Generic_Event_Sound_Notification_10, Generic_Event_Sound_Notification_11, Generic_Event_Sound_Notification_12, Generic_Event_Sound_Notification_13, Generic_Event_Sound_Notification_14, Generic_Event_Sound_Notification_15, Generic_Event_Sound_Notification_16, Generic_Event_Sound_Notification_17, Generic_Event_Sound_Notification_18, Generic_Event_Sound_Notification_19, Generic_Event_Sound_Notification_20, Generic_Event_Sound_Notification_21, Generic_Event_Sound_Notification_22, Generic_Event_Sound_Notification_23, Generic_Event_Sound_Notification_24, Generic_Event_Sound_Notification_25, Generic_Event_Sound_Notification_26, Generic_Event_Sound_Notification_27, Generic_Event_Sound_Notification_28, Generic_Event_Sound_Notification_29, Generic_Event_Sound_Notification_30, Generic_Event_Sound_Notification_31, Generic_Event_Sound_Notification_32, Manufacturer_Defined_Indicator_1 = 0x80, Manufacturer_Defined_Indicator_2, Manufacturer_Defined_Indicator_3, Manufacturer_Defined_Indicator_4, Manufacturer_Defined_Indicator_5, Manufacturer_Defined_Indicator_6, Manufacturer_Defined_Indicator_7, Manufacturer_Defined_Indicator_8, Manufacturer_Defined_Indicator_9, Manufacturer_Defined_Indicator_10, Manufacturer_Defined_Indicator_11, Manufacturer_Defined_Indicator_12, Manufacturer_Defined_Indicator_13, Manufacturer_Defined_Indicator_14, Manufacturer_Defined_Indicator_15, Manufacturer_Defined_Indicator_16, Manufacturer_Defined_Indicator_17, Manufacturer_Defined_Indicator_18, Manufacturer_Defined_Indicator_19, Manufacturer_Defined_Indicator_20, Manufacturer_Defined_Indicator_21, Manufacturer_Defined_Indicator_22, Manufacturer_Defined_Indicator_23, Manufacturer_Defined_Indicator_24, Manufacturer_Defined_Indicator_25, Manufacturer_Defined_Indicator_26, Manufacturer_Defined_Indicator_27, Manufacturer_Defined_Indicator_28, Manufacturer_Defined_Indicator_29, Manufacturer_Defined_Indicator_30, Manufacturer_Defined_Indicator_31, Manufacturer_Defined_Indicator_32, Buzzer = 0xF0 }; _enumerated _value; ValueID_Index_Indicator(_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 = 113; static const int* _values() { static const int values[] = { (ignore_assign)Indicator = 0, (ignore_assign)Armed = 1, (ignore_assign)Not_Armed, (ignore_assign)Ready, (ignore_assign)Fault, (ignore_assign)Busy, (ignore_assign)Enter_ID, (ignore_assign)Enter_PIN, (ignore_assign)Code_Accepted, (ignore_assign)Code_Not_Accepted, (ignore_assign)Armed_Stay, (ignore_assign)Armed_Away, (ignore_assign)Alarming, (ignore_assign)Alarming_Burglar, (ignore_assign)Alarming_Smoke_Fire, (ignore_assign)Alarming_Carbon_Monoxide, (ignore_assign)Bypass_Challenge, (ignore_assign)Entry_Delay, (ignore_assign)Exit_Delay, (ignore_assign)Alarming_Medical, (ignore_assign)Alarming_Freeze_Warning, (ignore_assign)Alarming_Water_Leak, (ignore_assign)Alarming_Panic, (ignore_assign)Zone_1_Armed = 0x20, (ignore_assign)Zone_2_Armed, (ignore_assign)Zone_3_Armed, (ignore_assign)Zone_4_Armed, (ignore_assign)Zone_5_Armed, (ignore_assign)Zone_6_Armed, (ignore_assign)Zone_7_Armed, (ignore_assign)Zone_8_Armed, (ignore_assign)LCD_Backlight = 0x30, (ignore_assign)Button_Backlight_Letters = 0x40, (ignore_assign)Button_Backlight_Digits, (ignore_assign)Button_Backlight_Command, (ignore_assign)Button_1_Indication, (ignore_assign)Button_2_Indication, (ignore_assign)Button_3_Indication, (ignore_assign)Button_4_Indication, (ignore_assign)Button_5_Indication, (ignore_assign)Button_6_Indication, (ignore_assign)Button_7_Indication, (ignore_assign)Button_8_Indication, (ignore_assign)Button_9_Indication, (ignore_assign)Button_10_Indication, (ignore_assign)Button_11_Indication, (ignore_assign)Button_12_Indication, (ignore_assign)Node_Identify = 0x50, (ignore_assign)Generic_Event_Sound_Notification_1 = 0x60, (ignore_assign)Generic_Event_Sound_Notification_2, (ignore_assign)Generic_Event_Sound_Notification_3, (ignore_assign)Generic_Event_Sound_Notification_4, (ignore_assign)Generic_Event_Sound_Notification_5, (ignore_assign)Generic_Event_Sound_Notification_6, (ignore_assign)Generic_Event_Sound_Notification_7, (ignore_assign)Generic_Event_Sound_Notification_8, (ignore_assign)Generic_Event_Sound_Notification_9, (ignore_assign)Generic_Event_Sound_Notification_10, (ignore_assign)Generic_Event_Sound_Notification_11, (ignore_assign)Generic_Event_Sound_Notification_12, (ignore_assign)Generic_Event_Sound_Notification_13, (ignore_assign)Generic_Event_Sound_Notification_14, (ignore_assign)Generic_Event_Sound_Notification_15, (ignore_assign)Generic_Event_Sound_Notification_16, (ignore_assign)Generic_Event_Sound_Notification_17, (ignore_assign)Generic_Event_Sound_Notification_18, (ignore_assign)Generic_Event_Sound_Notification_19, (ignore_assign)Generic_Event_Sound_Notification_20, (ignore_assign)Generic_Event_Sound_Notification_21, (ignore_assign)Generic_Event_Sound_Notification_22, (ignore_assign)Generic_Event_Sound_Notification_23, (ignore_assign)Generic_Event_Sound_Notification_24, (ignore_assign)Generic_Event_Sound_Notification_25, (ignore_assign)Generic_Event_Sound_Notification_26, (ignore_assign)Generic_Event_Sound_Notification_27, (ignore_assign)Generic_Event_Sound_Notification_28, (ignore_assign)Generic_Event_Sound_Notification_29, (ignore_assign)Generic_Event_Sound_Notification_30, (ignore_assign)Generic_Event_Sound_Notification_31, (ignore_assign)Generic_Event_Sound_Notification_32, (ignore_assign)Manufacturer_Defined_Indicator_1 = 0x80, (ignore_assign)Manufacturer_Defined_Indicator_2, (ignore_assign)Manufacturer_Defined_Indicator_3, (ignore_assign)Manufacturer_Defined_Indicator_4, (ignore_assign)Manufacturer_Defined_Indicator_5, (ignore_assign)Manufacturer_Defined_Indicator_6, (ignore_assign)Manufacturer_Defined_Indicator_7, (ignore_assign)Manufacturer_Defined_Indicator_8, (ignore_assign)Manufacturer_Defined_Indicator_9, (ignore_assign)Manufacturer_Defined_Indicator_10, (ignore_assign)Manufacturer_Defined_Indicator_11, (ignore_assign)Manufacturer_Defined_Indicator_12, (ignore_assign)Manufacturer_Defined_Indicator_13, (ignore_assign)Manufacturer_Defined_Indicator_14, (ignore_assign)Manufacturer_Defined_Indicator_15, (ignore_assign)Manufacturer_Defined_Indicator_16, (ignore_assign)Manufacturer_Defined_Indicator_17, (ignore_assign)Manufacturer_Defined_Indicator_18, (ignore_assign)Manufacturer_Defined_Indicator_19, (ignore_assign)Manufacturer_Defined_Indicator_20, (ignore_assign)Manufacturer_Defined_Indicator_21, (ignore_assign)Manufacturer_Defined_Indicator_22, (ignore_assign)Manufacturer_Defined_Indicator_23, (ignore_assign)Manufacturer_Defined_Indicator_24, (ignore_assign)Manufacturer_Defined_Indicator_25, (ignore_assign)Manufacturer_Defined_Indicator_26, (ignore_assign)Manufacturer_Defined_Indicator_27, (ignore_assign)Manufacturer_Defined_Indicator_28, (ignore_assign)Manufacturer_Defined_Indicator_29, (ignore_assign)Manufacturer_Defined_Indicator_30, (ignore_assign)Manufacturer_Defined_Indicator_31, (ignore_assign)Manufacturer_Defined_Indicator_32, (ignore_assign)Buzzer = 0xF0, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Indicator = 0", "Armed = 1", "Not_Armed", "Ready", "Fault", "Busy", "Enter_ID", "Enter_PIN", "Code_Accepted", "Code_Not_Accepted", "Armed_Stay", "Armed_Away", "Alarming", "Alarming_Burglar", "Alarming_Smoke_Fire", "Alarming_Carbon_Monoxide", "Bypass_Challenge", "Entry_Delay", "Exit_Delay", "Alarming_Medical", "Alarming_Freeze_Warning", "Alarming_Water_Leak", "Alarming_Panic", "Zone_1_Armed = 0x20", "Zone_2_Armed", "Zone_3_Armed", "Zone_4_Armed", "Zone_5_Armed", "Zone_6_Armed", "Zone_7_Armed", "Zone_8_Armed", "LCD_Backlight = 0x30", "Button_Backlight_Letters = 0x40", "Button_Backlight_Digits", "Button_Backlight_Command", "Button_1_Indication", "Button_2_Indication", "Button_3_Indication", "Button_4_Indication", "Button_5_Indication", "Button_6_Indication", "Button_7_Indication", "Button_8_Indication", "Button_9_Indication", "Button_10_Indication", "Button_11_Indication", "Button_12_Indication", "Node_Identify = 0x50", "Generic_Event_Sound_Notification_1 = 0x60", "Generic_Event_Sound_Notification_2", "Generic_Event_Sound_Notification_3", "Generic_Event_Sound_Notification_4", "Generic_Event_Sound_Notification_5", "Generic_Event_Sound_Notification_6", "Generic_Event_Sound_Notification_7", "Generic_Event_Sound_Notification_8", "Generic_Event_Sound_Notification_9", "Generic_Event_Sound_Notification_10", "Generic_Event_Sound_Notification_11", "Generic_Event_Sound_Notification_12", "Generic_Event_Sound_Notification_13", "Generic_Event_Sound_Notification_14", "Generic_Event_Sound_Notification_15", "Generic_Event_Sound_Notification_16", "Generic_Event_Sound_Notification_17", "Generic_Event_Sound_Notification_18", "Generic_Event_Sound_Notification_19", "Generic_Event_Sound_Notification_20", "Generic_Event_Sound_Notification_21", "Generic_Event_Sound_Notification_22", "Generic_Event_Sound_Notification_23", "Generic_Event_Sound_Notification_24", "Generic_Event_Sound_Notification_25", "Generic_Event_Sound_Notification_26", "Generic_Event_Sound_Notification_27", "Generic_Event_Sound_Notification_28", "Generic_Event_Sound_Notification_29", "Generic_Event_Sound_Notification_30", "Generic_Event_Sound_Notification_31", "Generic_Event_Sound_Notification_32", "Manufacturer_Defined_Indicator_1 = 0x80", "Manufacturer_Defined_Indicator_2", "Manufacturer_Defined_Indicator_3", "Manufacturer_Defined_Indicator_4", "Manufacturer_Defined_Indicator_5", "Manufacturer_Defined_Indicator_6", "Manufacturer_Defined_Indicator_7", "Manufacturer_Defined_Indicator_8", "Manufacturer_Defined_Indicator_9", "Manufacturer_Defined_Indicator_10", "Manufacturer_Defined_Indicator_11", "Manufacturer_Defined_Indicator_12", "Manufacturer_Defined_Indicator_13", "Manufacturer_Defined_Indicator_14", "Manufacturer_Defined_Indicator_15", "Manufacturer_Defined_Indicator_16", "Manufacturer_Defined_Indicator_17", "Manufacturer_Defined_Indicator_18", "Manufacturer_Defined_Indicator_19", "Manufacturer_Defined_Indicator_20", "Manufacturer_Defined_Indicator_21", "Manufacturer_Defined_Indicator_22", "Manufacturer_Defined_Indicator_23", "Manufacturer_Defined_Indicator_24", "Manufacturer_Defined_Indicator_25", "Manufacturer_Defined_Indicator_26", "Manufacturer_Defined_Indicator_27", "Manufacturer_Defined_Indicator_28", "Manufacturer_Defined_Indicator_29", "Manufacturer_Defined_Indicator_30", "Manufacturer_Defined_Indicator_31", "Manufacturer_Defined_Indicator_32", "Buzzer = 0xF0", }; 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_Language { enum _enumerated { Language = 0, Country = 1 }; _enumerated _value; ValueID_Index_Language(_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 = 2; static const int* _values() { static const int values[] = { (ignore_assign)Language = 0, (ignore_assign)Country = 1, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Language = 0", "Country = 1", }; 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_Lock { enum _enumerated { Locked = 0 }; _enumerated _value; ValueID_Index_Lock(_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 = 1; static const int* _values() { static const int values[] = { (ignore_assign)Locked = 0, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Locked = 0", }; 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_ManufacturerProprietary { enum _enumerated { FibaroVenetianBlinds_Blinds = 0, FibaroVenetianBlinds_Tilt = 1 }; _enumerated _value; ValueID_Index_ManufacturerProprietary(_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 = 2; static const int* _values() { static const int values[] = { (ignore_assign)FibaroVenetianBlinds_Blinds = 0, (ignore_assign)FibaroVenetianBlinds_Tilt = 1, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "FibaroVenetianBlinds_Blinds = 0", "FibaroVenetianBlinds_Tilt = 1", }; 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_ManufacturerSpecific { enum _enumerated { LoadedConfig = 0, LocalConfig = 1, LatestConfig = 2, DeviceID = 3, SerialNumber = 4 }; _enumerated _value; ValueID_Index_ManufacturerSpecific(_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)LoadedConfig = 0, (ignore_assign)LocalConfig = 1, (ignore_assign)LatestConfig = 2, (ignore_assign)DeviceID = 3, (ignore_assign)SerialNumber = 4, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "LoadedConfig = 0", "LocalConfig = 1", "LatestConfig = 2", "DeviceID = 3", "SerialNumber = 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_Meter { enum _enumerated { Electric_kWh = 0, Electric_kVah, Electric_W, Electric_Pulse, Electric_V, Electric_A, Electric_PowerFactor, Electric_Unknown_1, Electric_kVar, Electric_kVarh, Electric_Unknown_2, Electric_Unknown_3, Electric_Unknown_4, Electric_Unknown_5, Electric_Unknown_6, Electric_Unknown_7, Gas_Cubic_Meters, Gas_Cubic_Feet, Gas_Unknown_1, Gas_Pulse, Gas_Unknown_2, Gas_Unknown_3, Gas_Unknown_4, Gas_Unknown_5, Gas_Unknown_6, Gas_Unknown_7, Gas_Unknown_8, Gas_Unknown_9, Gas_Unknown_10, Gas_Unknown_11, Gas_Unknown_12, Gas_Unknown_13, Water_Cubic_Meters, Water_Cubic_Feet, Water_Cubic_US_Gallons, Water_Cubic_Pulse, Water_Unknown_1, Water_Unknown_2, Water_Unknown_3, Water_Unknown_4, Water_Unknown_5, Water_Unknown_6, Water_Unknown_7, Water_Unknown_8, Water_Unknown_9, Water_Unknown_10, Water_Unknown_11, Water_Unknown_12, Heating_kWh, Heating_Unknown_1, Heating_Unknown_2, Heating_Unknown_3, Heating_Unknown_4, Heating_Unknown_5, Heating_Unknown_6, Heating_Unknown_7, Heating_Unknown_8, Heating_Unknown_9, Heating_Unknown_10, Heating_Unknown_11, Heating_Unknown_12, Heating_Unknown_13, Heating_Unknown_14, Heating_Unknown_15, Cooling_kWh, Cooling_Unknown_1, Cooling_Unknown_2, Cooling_Unknown_3, Cooling_Unknown_4, Cooling_Unknown_5, Cooling_Unknown_6, Cooling_Unknown_7, Cooling_Unknown_8, Cooling_Unknown_9, Cooling_Unknown_10, Cooling_Unknown_11, Cooling_Unknown_12, Cooling_Unknown_13, Cooling_Unknown_14, Cooling_Unknown_15, Exporting = 256, Reset = 257 }; _enumerated _value; ValueID_Index_Meter(_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 = 82; static const int* _values() { static const int values[] = { (ignore_assign)Electric_kWh = 0, (ignore_assign)Electric_kVah, (ignore_assign)Electric_W, (ignore_assign)Electric_Pulse, (ignore_assign)Electric_V, (ignore_assign)Electric_A, (ignore_assign)Electric_PowerFactor, (ignore_assign)Electric_Unknown_1, (ignore_assign)Electric_kVar, (ignore_assign)Electric_kVarh, (ignore_assign)Electric_Unknown_2, (ignore_assign)Electric_Unknown_3, (ignore_assign)Electric_Unknown_4, (ignore_assign)Electric_Unknown_5, (ignore_assign)Electric_Unknown_6, (ignore_assign)Electric_Unknown_7, (ignore_assign)Gas_Cubic_Meters, (ignore_assign)Gas_Cubic_Feet, (ignore_assign)Gas_Unknown_1, (ignore_assign)Gas_Pulse, (ignore_assign)Gas_Unknown_2, (ignore_assign)Gas_Unknown_3, (ignore_assign)Gas_Unknown_4, (ignore_assign)Gas_Unknown_5, (ignore_assign)Gas_Unknown_6, (ignore_assign)Gas_Unknown_7, (ignore_assign)Gas_Unknown_8, (ignore_assign)Gas_Unknown_9, (ignore_assign)Gas_Unknown_10, (ignore_assign)Gas_Unknown_11, (ignore_assign)Gas_Unknown_12, (ignore_assign)Gas_Unknown_13, (ignore_assign)Water_Cubic_Meters, (ignore_assign)Water_Cubic_Feet, (ignore_assign)Water_Cubic_US_Gallons, (ignore_assign)Water_Cubic_Pulse, (ignore_assign)Water_Unknown_1, (ignore_assign)Water_Unknown_2, (ignore_assign)Water_Unknown_3, (ignore_assign)Water_Unknown_4, (ignore_assign)Water_Unknown_5, (ignore_assign)Water_Unknown_6, (ignore_assign)Water_Unknown_7, (ignore_assign)Water_Unknown_8, (ignore_assign)Water_Unknown_9, (ignore_assign)Water_Unknown_10, (ignore_assign)Water_Unknown_11, (ignore_assign)Water_Unknown_12, (ignore_assign)Heating_kWh, (ignore_assign)Heating_Unknown_1, (ignore_assign)Heating_Unknown_2, (ignore_assign)Heating_Unknown_3, (ignore_assign)Heating_Unknown_4, (ignore_assign)Heating_Unknown_5, (ignore_assign)Heating_Unknown_6, (ignore_assign)Heating_Unknown_7, (ignore_assign)Heating_Unknown_8, (ignore_assign)Heating_Unknown_9, (ignore_assign)Heating_Unknown_10, (ignore_assign)Heating_Unknown_11, (ignore_assign)Heating_Unknown_12, (ignore_assign)Heating_Unknown_13, (ignore_assign)Heating_Unknown_14, (ignore_assign)Heating_Unknown_15, (ignore_assign)Cooling_kWh, (ignore_assign)Cooling_Unknown_1, (ignore_assign)Cooling_Unknown_2, (ignore_assign)Cooling_Unknown_3, (ignore_assign)Cooling_Unknown_4, (ignore_assign)Cooling_Unknown_5, (ignore_assign)Cooling_Unknown_6, (ignore_assign)Cooling_Unknown_7, (ignore_assign)Cooling_Unknown_8, (ignore_assign)Cooling_Unknown_9, (ignore_assign)Cooling_Unknown_10, (ignore_assign)Cooling_Unknown_11, (ignore_assign)Cooling_Unknown_12, (ignore_assign)Cooling_Unknown_13, (ignore_assign)Cooling_Unknown_14, (ignore_assign)Cooling_Unknown_15, (ignore_assign)Exporting = 256, (ignore_assign)Reset = 257, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Electric_kWh = 0", "Electric_kVah", "Electric_W", "Electric_Pulse", "Electric_V", "Electric_A", "Electric_PowerFactor", "Electric_Unknown_1", "Electric_kVar", "Electric_kVarh", "Electric_Unknown_2", "Electric_Unknown_3", "Electric_Unknown_4", "Electric_Unknown_5", "Electric_Unknown_6", "Electric_Unknown_7", "Gas_Cubic_Meters", "Gas_Cubic_Feet", "Gas_Unknown_1", "Gas_Pulse", "Gas_Unknown_2", "Gas_Unknown_3", "Gas_Unknown_4", "Gas_Unknown_5", "Gas_Unknown_6", "Gas_Unknown_7", "Gas_Unknown_8", "Gas_Unknown_9", "Gas_Unknown_10", "Gas_Unknown_11", "Gas_Unknown_12", "Gas_Unknown_13", "Water_Cubic_Meters", "Water_Cubic_Feet", "Water_Cubic_US_Gallons", "Water_Cubic_Pulse", "Water_Unknown_1", "Water_Unknown_2", "Water_Unknown_3", "Water_Unknown_4", "Water_Unknown_5", "Water_Unknown_6", "Water_Unknown_7", "Water_Unknown_8", "Water_Unknown_9", "Water_Unknown_10", "Water_Unknown_11", "Water_Unknown_12", "Heating_kWh", "Heating_Unknown_1", "Heating_Unknown_2", "Heating_Unknown_3", "Heating_Unknown_4", "Heating_Unknown_5", "Heating_Unknown_6", "Heating_Unknown_7", "Heating_Unknown_8", "Heating_Unknown_9", "Heating_Unknown_10", "Heating_Unknown_11", "Heating_Unknown_12", "Heating_Unknown_13", "Heating_Unknown_14", "Heating_Unknown_15", "Cooling_kWh", "Cooling_Unknown_1", "Cooling_Unknown_2", "Cooling_Unknown_3", "Cooling_Unknown_4", "Cooling_Unknown_5", "Cooling_Unknown_6", "Cooling_Unknown_7", "Cooling_Unknown_8", "Cooling_Unknown_9", "Cooling_Unknown_10", "Cooling_Unknown_11", "Cooling_Unknown_12", "Cooling_Unknown_13", "Cooling_Unknown_14", "Cooling_Unknown_15", "Exporting = 256", "Reset = 257", }; 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_MeterPulse { enum _enumerated { Count = 0 }; _enumerated _value; ValueID_Index_MeterPulse(_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 = 1; static const int* _values() { static const int values[] = { (ignore_assign)Count = 0, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Count = 0", }; 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_PowerLevel { enum _enumerated { Powerlevel = 0, Timeout = 1, Set = 2, TestNode = 3, TestPowerlevel = 4, TestFrames = 5, Test = 6, Report = 7, TestStatus = 8, TestAckFrames = 9 }; _enumerated _value; ValueID_Index_PowerLevel(_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 = 10; static const int* _values() { static const int values[] = { (ignore_assign)Powerlevel = 0, (ignore_assign)Timeout = 1, (ignore_assign)Set = 2, (ignore_assign)TestNode = 3, (ignore_assign)TestPowerlevel = 4, (ignore_assign)TestFrames = 5, (ignore_assign)Test = 6, (ignore_assign)Report = 7, (ignore_assign)TestStatus = 8, (ignore_assign)TestAckFrames = 9, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Powerlevel = 0", "Timeout = 1", "Set = 2", "TestNode = 3", "TestPowerlevel = 4", "TestFrames = 5", "Test = 6", "Report = 7", "TestStatus = 8", "TestAckFrames = 9", }; 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_Protection { enum _enumerated { Protection = 0 }; _enumerated _value; ValueID_Index_Protection(_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 = 1; static const int* _values() { static const int values[] = { (ignore_assign)Protection = 0, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Protection = 0", }; 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_SceneActivation { enum _enumerated { SceneID = 0, Duration = 1 }; _enumerated _value; ValueID_Index_SceneActivation(_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 = 2; static const int* _values() { static const int values[] = { (ignore_assign)SceneID = 0, (ignore_assign)Duration = 1, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "SceneID = 0", "Duration = 1", }; 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_Security { enum _enumerated { Secured = 0 }; _enumerated _value; ValueID_Index_Security(_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 = 1; static const int* _values() { static const int values[] = { (ignore_assign)Secured = 0, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Secured = 0", }; 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_SensorAlarm { enum _enumerated { Sensor_1, Sensor_2, Sensor_3, Sensor_4, Sensor_5, Sensor_6, Sensor_7, Sensor_8, Sensor_9, Sensor_10, Sensor_11, Sensor_12, Sensor_13, Sensor_14, Sensor_15, Sensor_16, Sensor_17, Sensor_18, Sensor_19, Sensor_20, Sensor_21, Sensor_22, Sensor_23, Sensor_24, Sensor_25, Sensor_26, Sensor_27, Sensor_28, Sensor_29, Sensor_30, Sensor_31, Sensor_32, Sensor_33, Sensor_34, Sensor_35, Sensor_36, Sensor_37, Sensor_38, Sensor_39, Sensor_40, Sensor_41, Sensor_42, Sensor_43, Sensor_44, Sensor_45, Sensor_46, Sensor_47, Sensor_48, Sensor_49, Sensor_50, Sensor_51, Sensor_52, Sensor_53, Sensor_54, Sensor_55, Sensor_56, Sensor_57, Sensor_58, Sensor_59, Sensor_60, Sensor_61, Sensor_62, Sensor_63, Sensor_64, Sensor_65, Sensor_66, Sensor_67, Sensor_68, Sensor_69, Sensor_70, Sensor_71, Sensor_72, Sensor_73, Sensor_74, Sensor_75, Sensor_76, Sensor_77, Sensor_78, Sensor_79, Sensor_80, Sensor_81, Sensor_82, Sensor_83, Sensor_84, Sensor_85, Sensor_86, Sensor_87, Sensor_88, Sensor_89, Sensor_90, Sensor_91, Sensor_92, Sensor_93, Sensor_94, Sensor_95, Sensor_96, Sensor_97, Sensor_98, Sensor_99, Sensor_100, Sensor_101, Sensor_102, Sensor_103, Sensor_104, Sensor_105, Sensor_106, Sensor_107, Sensor_108, Sensor_109, Sensor_110, Sensor_111, Sensor_112, Sensor_113, Sensor_114, Sensor_115, Sensor_116, Sensor_117, Sensor_118, Sensor_119, Sensor_120, Sensor_121, Sensor_122, Sensor_123, Sensor_124, Sensor_125, Sensor_126, Sensor_127, Sensor_128, Sensor_129, Sensor_130, Sensor_131, Sensor_132, Sensor_133, Sensor_134, Sensor_135, Sensor_136, Sensor_137, Sensor_138, Sensor_139, Sensor_140, Sensor_141, Sensor_142, Sensor_143, Sensor_144, Sensor_145, Sensor_146, Sensor_147, Sensor_148, Sensor_149, Sensor_150, Sensor_151, Sensor_152, Sensor_153, Sensor_154, Sensor_155, Sensor_156, Sensor_157, Sensor_158, Sensor_159, Sensor_160, Sensor_161, Sensor_162, Sensor_163, Sensor_164, Sensor_165, Sensor_166, Sensor_167, Sensor_168, Sensor_169, Sensor_170, Sensor_171, Sensor_172, Sensor_173, Sensor_174, Sensor_175, Sensor_176, Sensor_177, Sensor_178, Sensor_179, Sensor_180, Sensor_181, Sensor_182, Sensor_183, Sensor_184, Sensor_185, Sensor_186, Sensor_187, Sensor_188, Sensor_189, Sensor_190, Sensor_191, Sensor_192, Sensor_193, Sensor_194, Sensor_195, Sensor_196, Sensor_197, Sensor_198, Sensor_199, Sensor_200, Sensor_201, Sensor_202, Sensor_203, Sensor_204, Sensor_205, Sensor_206, Sensor_207, Sensor_208, Sensor_209, Sensor_210, Sensor_211, Sensor_212, Sensor_213, Sensor_214, Sensor_215, Sensor_216, Sensor_217, Sensor_218, Sensor_219, Sensor_220, Sensor_221, Sensor_222, Sensor_223, Sensor_224, Sensor_225, Sensor_226, Sensor_227, Sensor_228, Sensor_229, Sensor_230, Sensor_231, Sensor_232, Sensor_233, Sensor_234, Sensor_235, Sensor_236, Sensor_237, Sensor_238, Sensor_239, Sensor_240, Sensor_241, Sensor_242, Sensor_243, Sensor_244, Sensor_245, Sensor_246, Sensor_247, Sensor_248, Sensor_249, Sensor_250, Sensor_251, Sensor_252, Sensor_253, Sensor_254, Sensor_255 }; _enumerated _value; ValueID_Index_SensorAlarm(_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 = 255; static const int* _values() { static const int values[] = { (ignore_assign)Sensor_1, (ignore_assign)Sensor_2, (ignore_assign)Sensor_3, (ignore_assign)Sensor_4, (ignore_assign)Sensor_5, (ignore_assign)Sensor_6, (ignore_assign)Sensor_7, (ignore_assign)Sensor_8, (ignore_assign)Sensor_9, (ignore_assign)Sensor_10, (ignore_assign)Sensor_11, (ignore_assign)Sensor_12, (ignore_assign)Sensor_13, (ignore_assign)Sensor_14, (ignore_assign)Sensor_15, (ignore_assign)Sensor_16, (ignore_assign)Sensor_17, (ignore_assign)Sensor_18, (ignore_assign)Sensor_19, (ignore_assign)Sensor_20, (ignore_assign)Sensor_21, (ignore_assign)Sensor_22, (ignore_assign)Sensor_23, (ignore_assign)Sensor_24, (ignore_assign)Sensor_25, (ignore_assign)Sensor_26, (ignore_assign)Sensor_27, (ignore_assign)Sensor_28, (ignore_assign)Sensor_29, (ignore_assign)Sensor_30, (ignore_assign)Sensor_31, (ignore_assign)Sensor_32, (ignore_assign)Sensor_33, (ignore_assign)Sensor_34, (ignore_assign)Sensor_35, (ignore_assign)Sensor_36, (ignore_assign)Sensor_37, (ignore_assign)Sensor_38, (ignore_assign)Sensor_39, (ignore_assign)Sensor_40, (ignore_assign)Sensor_41, (ignore_assign)Sensor_42, (ignore_assign)Sensor_43, (ignore_assign)Sensor_44, (ignore_assign)Sensor_45, (ignore_assign)Sensor_46, (ignore_assign)Sensor_47, (ignore_assign)Sensor_48, (ignore_assign)Sensor_49, (ignore_assign)Sensor_50, (ignore_assign)Sensor_51, (ignore_assign)Sensor_52, (ignore_assign)Sensor_53, (ignore_assign)Sensor_54, (ignore_assign)Sensor_55, (ignore_assign)Sensor_56, (ignore_assign)Sensor_57, (ignore_assign)Sensor_58, (ignore_assign)Sensor_59, (ignore_assign)Sensor_60, (ignore_assign)Sensor_61, (ignore_assign)Sensor_62, (ignore_assign)Sensor_63, (ignore_assign)Sensor_64, (ignore_assign)Sensor_65, (ignore_assign)Sensor_66, (ignore_assign)Sensor_67, (ignore_assign)Sensor_68, (ignore_assign)Sensor_69, (ignore_assign)Sensor_70, (ignore_assign)Sensor_71, (ignore_assign)Sensor_72, (ignore_assign)Sensor_73, (ignore_assign)Sensor_74, (ignore_assign)Sensor_75, (ignore_assign)Sensor_76, (ignore_assign)Sensor_77, (ignore_assign)Sensor_78, (ignore_assign)Sensor_79, (ignore_assign)Sensor_80, (ignore_assign)Sensor_81, (ignore_assign)Sensor_82, (ignore_assign)Sensor_83, (ignore_assign)Sensor_84, (ignore_assign)Sensor_85, (ignore_assign)Sensor_86, (ignore_assign)Sensor_87, (ignore_assign)Sensor_88, (ignore_assign)Sensor_89, (ignore_assign)Sensor_90, (ignore_assign)Sensor_91, (ignore_assign)Sensor_92, (ignore_assign)Sensor_93, (ignore_assign)Sensor_94, (ignore_assign)Sensor_95, (ignore_assign)Sensor_96, (ignore_assign)Sensor_97, (ignore_assign)Sensor_98, (ignore_assign)Sensor_99, (ignore_assign)Sensor_100, (ignore_assign)Sensor_101, (ignore_assign)Sensor_102, (ignore_assign)Sensor_103, (ignore_assign)Sensor_104, (ignore_assign)Sensor_105, (ignore_assign)Sensor_106, (ignore_assign)Sensor_107, (ignore_assign)Sensor_108, (ignore_assign)Sensor_109, (ignore_assign)Sensor_110, (ignore_assign)Sensor_111, (ignore_assign)Sensor_112, (ignore_assign)Sensor_113, (ignore_assign)Sensor_114, (ignore_assign)Sensor_115, (ignore_assign)Sensor_116, (ignore_assign)Sensor_117, (ignore_assign)Sensor_118, (ignore_assign)Sensor_119, (ignore_assign)Sensor_120, (ignore_assign)Sensor_121, (ignore_assign)Sensor_122, (ignore_assign)Sensor_123, (ignore_assign)Sensor_124, (ignore_assign)Sensor_125, (ignore_assign)Sensor_126, (ignore_assign)Sensor_127, (ignore_assign)Sensor_128, (ignore_assign)Sensor_129, (ignore_assign)Sensor_130, (ignore_assign)Sensor_131, (ignore_assign)Sensor_132, (ignore_assign)Sensor_133, (ignore_assign)Sensor_134, (ignore_assign)Sensor_135, (ignore_assign)Sensor_136, (ignore_assign)Sensor_137, (ignore_assign)Sensor_138, (ignore_assign)Sensor_139, (ignore_assign)Sensor_140, (ignore_assign)Sensor_141, (ignore_assign)Sensor_142, (ignore_assign)Sensor_143, (ignore_assign)Sensor_144, (ignore_assign)Sensor_145, (ignore_assign)Sensor_146, (ignore_assign)Sensor_147, (ignore_assign)Sensor_148, (ignore_assign)Sensor_149, (ignore_assign)Sensor_150, (ignore_assign)Sensor_151, (ignore_assign)Sensor_152, (ignore_assign)Sensor_153, (ignore_assign)Sensor_154, (ignore_assign)Sensor_155, (ignore_assign)Sensor_156, (ignore_assign)Sensor_157, (ignore_assign)Sensor_158, (ignore_assign)Sensor_159, (ignore_assign)Sensor_160, (ignore_assign)Sensor_161, (ignore_assign)Sensor_162, (ignore_assign)Sensor_163, (ignore_assign)Sensor_164, (ignore_assign)Sensor_165, (ignore_assign)Sensor_166, (ignore_assign)Sensor_167, (ignore_assign)Sensor_168, (ignore_assign)Sensor_169, (ignore_assign)Sensor_170, (ignore_assign)Sensor_171, (ignore_assign)Sensor_172, (ignore_assign)Sensor_173, (ignore_assign)Sensor_174, (ignore_assign)Sensor_175, (ignore_assign)Sensor_176, (ignore_assign)Sensor_177, (ignore_assign)Sensor_178, (ignore_assign)Sensor_179, (ignore_assign)Sensor_180, (ignore_assign)Sensor_181, (ignore_assign)Sensor_182, (ignore_assign)Sensor_183, (ignore_assign)Sensor_184, (ignore_assign)Sensor_185, (ignore_assign)Sensor_186, (ignore_assign)Sensor_187, (ignore_assign)Sensor_188, (ignore_assign)Sensor_189, (ignore_assign)Sensor_190, (ignore_assign)Sensor_191, (ignore_assign)Sensor_192, (ignore_assign)Sensor_193, (ignore_assign)Sensor_194, (ignore_assign)Sensor_195, (ignore_assign)Sensor_196, (ignore_assign)Sensor_197, (ignore_assign)Sensor_198, (ignore_assign)Sensor_199, (ignore_assign)Sensor_200, (ignore_assign)Sensor_201, (ignore_assign)Sensor_202, (ignore_assign)Sensor_203, (ignore_assign)Sensor_204, (ignore_assign)Sensor_205, (ignore_assign)Sensor_206, (ignore_assign)Sensor_207, (ignore_assign)Sensor_208, (ignore_assign)Sensor_209, (ignore_assign)Sensor_210, (ignore_assign)Sensor_211, (ignore_assign)Sensor_212, (ignore_assign)Sensor_213, (ignore_assign)Sensor_214, (ignore_assign)Sensor_215, (ignore_assign)Sensor_216, (ignore_assign)Sensor_217, (ignore_assign)Sensor_218, (ignore_assign)Sensor_219, (ignore_assign)Sensor_220, (ignore_assign)Sensor_221, (ignore_assign)Sensor_222, (ignore_assign)Sensor_223, (ignore_assign)Sensor_224, (ignore_assign)Sensor_225, (ignore_assign)Sensor_226, (ignore_assign)Sensor_227, (ignore_assign)Sensor_228, (ignore_assign)Sensor_229, (ignore_assign)Sensor_230, (ignore_assign)Sensor_231, (ignore_assign)Sensor_232, (ignore_assign)Sensor_233, (ignore_assign)Sensor_234, (ignore_assign)Sensor_235, (ignore_assign)Sensor_236, (ignore_assign)Sensor_237, (ignore_assign)Sensor_238, (ignore_assign)Sensor_239, (ignore_assign)Sensor_240, (ignore_assign)Sensor_241, (ignore_assign)Sensor_242, (ignore_assign)Sensor_243, (ignore_assign)Sensor_244, (ignore_assign)Sensor_245, (ignore_assign)Sensor_246, (ignore_assign)Sensor_247, (ignore_assign)Sensor_248, (ignore_assign)Sensor_249, (ignore_assign)Sensor_250, (ignore_assign)Sensor_251, (ignore_assign)Sensor_252, (ignore_assign)Sensor_253, (ignore_assign)Sensor_254, (ignore_assign)Sensor_255, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Sensor_1", "Sensor_2", "Sensor_3", "Sensor_4", "Sensor_5", "Sensor_6", "Sensor_7", "Sensor_8", "Sensor_9", "Sensor_10", "Sensor_11", "Sensor_12", "Sensor_13", "Sensor_14", "Sensor_15", "Sensor_16", "Sensor_17", "Sensor_18", "Sensor_19", "Sensor_20", "Sensor_21", "Sensor_22", "Sensor_23", "Sensor_24", "Sensor_25", "Sensor_26", "Sensor_27", "Sensor_28", "Sensor_29", "Sensor_30", "Sensor_31", "Sensor_32", "Sensor_33", "Sensor_34", "Sensor_35", "Sensor_36", "Sensor_37", "Sensor_38", "Sensor_39", "Sensor_40", "Sensor_41", "Sensor_42", "Sensor_43", "Sensor_44", "Sensor_45", "Sensor_46", "Sensor_47", "Sensor_48", "Sensor_49", "Sensor_50", "Sensor_51", "Sensor_52", "Sensor_53", "Sensor_54", "Sensor_55", "Sensor_56", "Sensor_57", "Sensor_58", "Sensor_59", "Sensor_60", "Sensor_61", "Sensor_62", "Sensor_63", "Sensor_64", "Sensor_65", "Sensor_66", "Sensor_67", "Sensor_68", "Sensor_69", "Sensor_70", "Sensor_71", "Sensor_72", "Sensor_73", "Sensor_74", "Sensor_75", "Sensor_76", "Sensor_77", "Sensor_78", "Sensor_79", "Sensor_80", "Sensor_81", "Sensor_82", "Sensor_83", "Sensor_84", "Sensor_85", "Sensor_86", "Sensor_87", "Sensor_88", "Sensor_89", "Sensor_90", "Sensor_91", "Sensor_92", "Sensor_93", "Sensor_94", "Sensor_95", "Sensor_96", "Sensor_97", "Sensor_98", "Sensor_99", "Sensor_100", "Sensor_101", "Sensor_102", "Sensor_103", "Sensor_104", "Sensor_105", "Sensor_106", "Sensor_107", "Sensor_108", "Sensor_109", "Sensor_110", "Sensor_111", "Sensor_112", "Sensor_113", "Sensor_114", "Sensor_115", "Sensor_116", "Sensor_117", "Sensor_118", "Sensor_119", "Sensor_120", "Sensor_121", "Sensor_122", "Sensor_123", "Sensor_124", "Sensor_125", "Sensor_126", "Sensor_127", "Sensor_128", "Sensor_129", "Sensor_130", "Sensor_131", "Sensor_132", "Sensor_133", "Sensor_134", "Sensor_135", "Sensor_136", "Sensor_137", "Sensor_138", "Sensor_139", "Sensor_140", "Sensor_141", "Sensor_142", "Sensor_143", "Sensor_144", "Sensor_145", "Sensor_146", "Sensor_147", "Sensor_148", "Sensor_149", "Sensor_150", "Sensor_151", "Sensor_152", "Sensor_153", "Sensor_154", "Sensor_155", "Sensor_156", "Sensor_157", "Sensor_158", "Sensor_159", "Sensor_160", "Sensor_161", "Sensor_162", "Sensor_163", "Sensor_164", "Sensor_165", "Sensor_166", "Sensor_167", "Sensor_168", "Sensor_169", "Sensor_170", "Sensor_171", "Sensor_172", "Sensor_173", "Sensor_174", "Sensor_175", "Sensor_176", "Sensor_177", "Sensor_178", "Sensor_179", "Sensor_180", "Sensor_181", "Sensor_182", "Sensor_183", "Sensor_184", "Sensor_185", "Sensor_186", "Sensor_187", "Sensor_188", "Sensor_189", "Sensor_190", "Sensor_191", "Sensor_192", "Sensor_193", "Sensor_194", "Sensor_195", "Sensor_196", "Sensor_197", "Sensor_198", "Sensor_199", "Sensor_200", "Sensor_201", "Sensor_202", "Sensor_203", "Sensor_204", "Sensor_205", "Sensor_206", "Sensor_207", "Sensor_208", "Sensor_209", "Sensor_210", "Sensor_211", "Sensor_212", "Sensor_213", "Sensor_214", "Sensor_215", "Sensor_216", "Sensor_217", "Sensor_218", "Sensor_219", "Sensor_220", "Sensor_221", "Sensor_222", "Sensor_223", "Sensor_224", "Sensor_225", "Sensor_226", "Sensor_227", "Sensor_228", "Sensor_229", "Sensor_230", "Sensor_231", "Sensor_232", "Sensor_233", "Sensor_234", "Sensor_235", "Sensor_236", "Sensor_237", "Sensor_238", "Sensor_239", "Sensor_240", "Sensor_241", "Sensor_242", "Sensor_243", "Sensor_244", "Sensor_245", "Sensor_246", "Sensor_247", "Sensor_248", "Sensor_249", "Sensor_250", "Sensor_251", "Sensor_252", "Sensor_253", "Sensor_254", "Sensor_255", }; 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_SensorBinary { enum _enumerated { Sensor_1, Sensor_2, Sensor_3, Sensor_4, Sensor_5, Sensor_6, Sensor_7, Sensor_8, Sensor_9, Sensor_10, Sensor_11, Sensor_12, Sensor_13, Sensor_14, Sensor_15, Sensor_16, Sensor_17, Sensor_18, Sensor_19, Sensor_20, Sensor_21, Sensor_22, Sensor_23, Sensor_24, Sensor_25, Sensor_26, Sensor_27, Sensor_28, Sensor_29, Sensor_30, Sensor_31, Sensor_32, Sensor_33, Sensor_34, Sensor_35, Sensor_36, Sensor_37, Sensor_38, Sensor_39, Sensor_40, Sensor_41, Sensor_42, Sensor_43, Sensor_44, Sensor_45, Sensor_46, Sensor_47, Sensor_48, Sensor_49, Sensor_50, Sensor_51, Sensor_52, Sensor_53, Sensor_54, Sensor_55, Sensor_56, Sensor_57, Sensor_58, Sensor_59, Sensor_60, Sensor_61, Sensor_62, Sensor_63, Sensor_64, Sensor_65, Sensor_66, Sensor_67, Sensor_68, Sensor_69, Sensor_70, Sensor_71, Sensor_72, Sensor_73, Sensor_74, Sensor_75, Sensor_76, Sensor_77, Sensor_78, Sensor_79, Sensor_80, Sensor_81, Sensor_82, Sensor_83, Sensor_84, Sensor_85, Sensor_86, Sensor_87, Sensor_88, Sensor_89, Sensor_90, Sensor_91, Sensor_92, Sensor_93, Sensor_94, Sensor_95, Sensor_96, Sensor_97, Sensor_98, Sensor_99, Sensor_100, Sensor_101, Sensor_102, Sensor_103, Sensor_104, Sensor_105, Sensor_106, Sensor_107, Sensor_108, Sensor_109, Sensor_110, Sensor_111, Sensor_112, Sensor_113, Sensor_114, Sensor_115, Sensor_116, Sensor_117, Sensor_118, Sensor_119, Sensor_120, Sensor_121, Sensor_122, Sensor_123, Sensor_124, Sensor_125, Sensor_126, Sensor_127, Sensor_128, Sensor_129, Sensor_130, Sensor_131, Sensor_132, Sensor_133, Sensor_134, Sensor_135, Sensor_136, Sensor_137, Sensor_138, Sensor_139, Sensor_140, Sensor_141, Sensor_142, Sensor_143, Sensor_144, Sensor_145, Sensor_146, Sensor_147, Sensor_148, Sensor_149, Sensor_150, Sensor_151, Sensor_152, Sensor_153, Sensor_154, Sensor_155, Sensor_156, Sensor_157, Sensor_158, Sensor_159, Sensor_160, Sensor_161, Sensor_162, Sensor_163, Sensor_164, Sensor_165, Sensor_166, Sensor_167, Sensor_168, Sensor_169, Sensor_170, Sensor_171, Sensor_172, Sensor_173, Sensor_174, Sensor_175, Sensor_176, Sensor_177, Sensor_178, Sensor_179, Sensor_180, Sensor_181, Sensor_182, Sensor_183, Sensor_184, Sensor_185, Sensor_186, Sensor_187, Sensor_188, Sensor_189, Sensor_190, Sensor_191, Sensor_192, Sensor_193, Sensor_194, Sensor_195, Sensor_196, Sensor_197, Sensor_198, Sensor_199, Sensor_200, Sensor_201, Sensor_202, Sensor_203, Sensor_204, Sensor_205, Sensor_206, Sensor_207, Sensor_208, Sensor_209, Sensor_210, Sensor_211, Sensor_212, Sensor_213, Sensor_214, Sensor_215, Sensor_216, Sensor_217, Sensor_218, Sensor_219, Sensor_220, Sensor_221, Sensor_222, Sensor_223, Sensor_224, Sensor_225, Sensor_226, Sensor_227, Sensor_228, Sensor_229, Sensor_230, Sensor_231, Sensor_232, Sensor_233, Sensor_234, Sensor_235, Sensor_236, Sensor_237, Sensor_238, Sensor_239, Sensor_240, Sensor_241, Sensor_242, Sensor_243, Sensor_244, Sensor_245, Sensor_246, Sensor_247, Sensor_248, Sensor_249, Sensor_250, Sensor_251, Sensor_252, Sensor_253, Sensor_254, Sensor_255 }; _enumerated _value; ValueID_Index_SensorBinary(_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 = 255; static const int* _values() { static const int values[] = { (ignore_assign)Sensor_1, (ignore_assign)Sensor_2, (ignore_assign)Sensor_3, (ignore_assign)Sensor_4, (ignore_assign)Sensor_5, (ignore_assign)Sensor_6, (ignore_assign)Sensor_7, (ignore_assign)Sensor_8, (ignore_assign)Sensor_9, (ignore_assign)Sensor_10, (ignore_assign)Sensor_11, (ignore_assign)Sensor_12, (ignore_assign)Sensor_13, (ignore_assign)Sensor_14, (ignore_assign)Sensor_15, (ignore_assign)Sensor_16, (ignore_assign)Sensor_17, (ignore_assign)Sensor_18, (ignore_assign)Sensor_19, (ignore_assign)Sensor_20, (ignore_assign)Sensor_21, (ignore_assign)Sensor_22, (ignore_assign)Sensor_23, (ignore_assign)Sensor_24, (ignore_assign)Sensor_25, (ignore_assign)Sensor_26, (ignore_assign)Sensor_27, (ignore_assign)Sensor_28, (ignore_assign)Sensor_29, (ignore_assign)Sensor_30, (ignore_assign)Sensor_31, (ignore_assign)Sensor_32, (ignore_assign)Sensor_33, (ignore_assign)Sensor_34, (ignore_assign)Sensor_35, (ignore_assign)Sensor_36, (ignore_assign)Sensor_37, (ignore_assign)Sensor_38, (ignore_assign)Sensor_39, (ignore_assign)Sensor_40, (ignore_assign)Sensor_41, (ignore_assign)Sensor_42, (ignore_assign)Sensor_43, (ignore_assign)Sensor_44, (ignore_assign)Sensor_45, (ignore_assign)Sensor_46, (ignore_assign)Sensor_47, (ignore_assign)Sensor_48, (ignore_assign)Sensor_49, (ignore_assign)Sensor_50, (ignore_assign)Sensor_51, (ignore_assign)Sensor_52, (ignore_assign)Sensor_53, (ignore_assign)Sensor_54, (ignore_assign)Sensor_55, (ignore_assign)Sensor_56, (ignore_assign)Sensor_57, (ignore_assign)Sensor_58, (ignore_assign)Sensor_59, (ignore_assign)Sensor_60, (ignore_assign)Sensor_61, (ignore_assign)Sensor_62, (ignore_assign)Sensor_63, (ignore_assign)Sensor_64, (ignore_assign)Sensor_65, (ignore_assign)Sensor_66, (ignore_assign)Sensor_67, (ignore_assign)Sensor_68, (ignore_assign)Sensor_69, (ignore_assign)Sensor_70, (ignore_assign)Sensor_71, (ignore_assign)Sensor_72, (ignore_assign)Sensor_73, (ignore_assign)Sensor_74, (ignore_assign)Sensor_75, (ignore_assign)Sensor_76, (ignore_assign)Sensor_77, (ignore_assign)Sensor_78, (ignore_assign)Sensor_79, (ignore_assign)Sensor_80, (ignore_assign)Sensor_81, (ignore_assign)Sensor_82, (ignore_assign)Sensor_83, (ignore_assign)Sensor_84, (ignore_assign)Sensor_85, (ignore_assign)Sensor_86, (ignore_assign)Sensor_87, (ignore_assign)Sensor_88, (ignore_assign)Sensor_89, (ignore_assign)Sensor_90, (ignore_assign)Sensor_91, (ignore_assign)Sensor_92, (ignore_assign)Sensor_93, (ignore_assign)Sensor_94, (ignore_assign)Sensor_95, (ignore_assign)Sensor_96, (ignore_assign)Sensor_97, (ignore_assign)Sensor_98, (ignore_assign)Sensor_99, (ignore_assign)Sensor_100, (ignore_assign)Sensor_101, (ignore_assign)Sensor_102, (ignore_assign)Sensor_103, (ignore_assign)Sensor_104, (ignore_assign)Sensor_105, (ignore_assign)Sensor_106, (ignore_assign)Sensor_107, (ignore_assign)Sensor_108, (ignore_assign)Sensor_109, (ignore_assign)Sensor_110, (ignore_assign)Sensor_111, (ignore_assign)Sensor_112, (ignore_assign)Sensor_113, (ignore_assign)Sensor_114, (ignore_assign)Sensor_115, (ignore_assign)Sensor_116, (ignore_assign)Sensor_117, (ignore_assign)Sensor_118, (ignore_assign)Sensor_119, (ignore_assign)Sensor_120, (ignore_assign)Sensor_121, (ignore_assign)Sensor_122, (ignore_assign)Sensor_123, (ignore_assign)Sensor_124, (ignore_assign)Sensor_125, (ignore_assign)Sensor_126, (ignore_assign)Sensor_127, (ignore_assign)Sensor_128, (ignore_assign)Sensor_129, (ignore_assign)Sensor_130, (ignore_assign)Sensor_131, (ignore_assign)Sensor_132, (ignore_assign)Sensor_133, (ignore_assign)Sensor_134, (ignore_assign)Sensor_135, (ignore_assign)Sensor_136, (ignore_assign)Sensor_137, (ignore_assign)Sensor_138, (ignore_assign)Sensor_139, (ignore_assign)Sensor_140, (ignore_assign)Sensor_141, (ignore_assign)Sensor_142, (ignore_assign)Sensor_143, (ignore_assign)Sensor_144, (ignore_assign)Sensor_145, (ignore_assign)Sensor_146, (ignore_assign)Sensor_147, (ignore_assign)Sensor_148, (ignore_assign)Sensor_149, (ignore_assign)Sensor_150, (ignore_assign)Sensor_151, (ignore_assign)Sensor_152, (ignore_assign)Sensor_153, (ignore_assign)Sensor_154, (ignore_assign)Sensor_155, (ignore_assign)Sensor_156, (ignore_assign)Sensor_157, (ignore_assign)Sensor_158, (ignore_assign)Sensor_159, (ignore_assign)Sensor_160, (ignore_assign)Sensor_161, (ignore_assign)Sensor_162, (ignore_assign)Sensor_163, (ignore_assign)Sensor_164, (ignore_assign)Sensor_165, (ignore_assign)Sensor_166, (ignore_assign)Sensor_167, (ignore_assign)Sensor_168, (ignore_assign)Sensor_169, (ignore_assign)Sensor_170, (ignore_assign)Sensor_171, (ignore_assign)Sensor_172, (ignore_assign)Sensor_173, (ignore_assign)Sensor_174, (ignore_assign)Sensor_175, (ignore_assign)Sensor_176, (ignore_assign)Sensor_177, (ignore_assign)Sensor_178, (ignore_assign)Sensor_179, (ignore_assign)Sensor_180, (ignore_assign)Sensor_181, (ignore_assign)Sensor_182, (ignore_assign)Sensor_183, (ignore_assign)Sensor_184, (ignore_assign)Sensor_185, (ignore_assign)Sensor_186, (ignore_assign)Sensor_187, (ignore_assign)Sensor_188, (ignore_assign)Sensor_189, (ignore_assign)Sensor_190, (ignore_assign)Sensor_191, (ignore_assign)Sensor_192, (ignore_assign)Sensor_193, (ignore_assign)Sensor_194, (ignore_assign)Sensor_195, (ignore_assign)Sensor_196, (ignore_assign)Sensor_197, (ignore_assign)Sensor_198, (ignore_assign)Sensor_199, (ignore_assign)Sensor_200, (ignore_assign)Sensor_201, (ignore_assign)Sensor_202, (ignore_assign)Sensor_203, (ignore_assign)Sensor_204, (ignore_assign)Sensor_205, (ignore_assign)Sensor_206, (ignore_assign)Sensor_207, (ignore_assign)Sensor_208, (ignore_assign)Sensor_209, (ignore_assign)Sensor_210, (ignore_assign)Sensor_211, (ignore_assign)Sensor_212, (ignore_assign)Sensor_213, (ignore_assign)Sensor_214, (ignore_assign)Sensor_215, (ignore_assign)Sensor_216, (ignore_assign)Sensor_217, (ignore_assign)Sensor_218, (ignore_assign)Sensor_219, (ignore_assign)Sensor_220, (ignore_assign)Sensor_221, (ignore_assign)Sensor_222, (ignore_assign)Sensor_223, (ignore_assign)Sensor_224, (ignore_assign)Sensor_225, (ignore_assign)Sensor_226, (ignore_assign)Sensor_227, (ignore_assign)Sensor_228, (ignore_assign)Sensor_229, (ignore_assign)Sensor_230, (ignore_assign)Sensor_231, (ignore_assign)Sensor_232, (ignore_assign)Sensor_233, (ignore_assign)Sensor_234, (ignore_assign)Sensor_235, (ignore_assign)Sensor_236, (ignore_assign)Sensor_237, (ignore_assign)Sensor_238, (ignore_assign)Sensor_239, (ignore_assign)Sensor_240, (ignore_assign)Sensor_241, (ignore_assign)Sensor_242, (ignore_assign)Sensor_243, (ignore_assign)Sensor_244, (ignore_assign)Sensor_245, (ignore_assign)Sensor_246, (ignore_assign)Sensor_247, (ignore_assign)Sensor_248, (ignore_assign)Sensor_249, (ignore_assign)Sensor_250, (ignore_assign)Sensor_251, (ignore_assign)Sensor_252, (ignore_assign)Sensor_253, (ignore_assign)Sensor_254, (ignore_assign)Sensor_255, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Sensor_1", "Sensor_2", "Sensor_3", "Sensor_4", "Sensor_5", "Sensor_6", "Sensor_7", "Sensor_8", "Sensor_9", "Sensor_10", "Sensor_11", "Sensor_12", "Sensor_13", "Sensor_14", "Sensor_15", "Sensor_16", "Sensor_17", "Sensor_18", "Sensor_19", "Sensor_20", "Sensor_21", "Sensor_22", "Sensor_23", "Sensor_24", "Sensor_25", "Sensor_26", "Sensor_27", "Sensor_28", "Sensor_29", "Sensor_30", "Sensor_31", "Sensor_32", "Sensor_33", "Sensor_34", "Sensor_35", "Sensor_36", "Sensor_37", "Sensor_38", "Sensor_39", "Sensor_40", "Sensor_41", "Sensor_42", "Sensor_43", "Sensor_44", "Sensor_45", "Sensor_46", "Sensor_47", "Sensor_48", "Sensor_49", "Sensor_50", "Sensor_51", "Sensor_52", "Sensor_53", "Sensor_54", "Sensor_55", "Sensor_56", "Sensor_57", "Sensor_58", "Sensor_59", "Sensor_60", "Sensor_61", "Sensor_62", "Sensor_63", "Sensor_64", "Sensor_65", "Sensor_66", "Sensor_67", "Sensor_68", "Sensor_69", "Sensor_70", "Sensor_71", "Sensor_72", "Sensor_73", "Sensor_74", "Sensor_75", "Sensor_76", "Sensor_77", "Sensor_78", "Sensor_79", "Sensor_80", "Sensor_81", "Sensor_82", "Sensor_83", "Sensor_84", "Sensor_85", "Sensor_86", "Sensor_87", "Sensor_88", "Sensor_89", "Sensor_90", "Sensor_91", "Sensor_92", "Sensor_93", "Sensor_94", "Sensor_95", "Sensor_96", "Sensor_97", "Sensor_98", "Sensor_99", "Sensor_100", "Sensor_101", "Sensor_102", "Sensor_103", "Sensor_104", "Sensor_105", "Sensor_106", "Sensor_107", "Sensor_108", "Sensor_109", "Sensor_110", "Sensor_111", "Sensor_112", "Sensor_113", "Sensor_114", "Sensor_115", "Sensor_116", "Sensor_117", "Sensor_118", "Sensor_119", "Sensor_120", "Sensor_121", "Sensor_122", "Sensor_123", "Sensor_124", "Sensor_125", "Sensor_126", "Sensor_127", "Sensor_128", "Sensor_129", "Sensor_130", "Sensor_131", "Sensor_132", "Sensor_133", "Sensor_134", "Sensor_135", "Sensor_136", "Sensor_137", "Sensor_138", "Sensor_139", "Sensor_140", "Sensor_141", "Sensor_142", "Sensor_143", "Sensor_144", "Sensor_145", "Sensor_146", "Sensor_147", "Sensor_148", "Sensor_149", "Sensor_150", "Sensor_151", "Sensor_152", "Sensor_153", "Sensor_154", "Sensor_155", "Sensor_156", "Sensor_157", "Sensor_158", "Sensor_159", "Sensor_160", "Sensor_161", "Sensor_162", "Sensor_163", "Sensor_164", "Sensor_165", "Sensor_166", "Sensor_167", "Sensor_168", "Sensor_169", "Sensor_170", "Sensor_171", "Sensor_172", "Sensor_173", "Sensor_174", "Sensor_175", "Sensor_176", "Sensor_177", "Sensor_178", "Sensor_179", "Sensor_180", "Sensor_181", "Sensor_182", "Sensor_183", "Sensor_184", "Sensor_185", "Sensor_186", "Sensor_187", "Sensor_188", "Sensor_189", "Sensor_190", "Sensor_191", "Sensor_192", "Sensor_193", "Sensor_194", "Sensor_195", "Sensor_196", "Sensor_197", "Sensor_198", "Sensor_199", "Sensor_200", "Sensor_201", "Sensor_202", "Sensor_203", "Sensor_204", "Sensor_205", "Sensor_206", "Sensor_207", "Sensor_208", "Sensor_209", "Sensor_210", "Sensor_211", "Sensor_212", "Sensor_213", "Sensor_214", "Sensor_215", "Sensor_216", "Sensor_217", "Sensor_218", "Sensor_219", "Sensor_220", "Sensor_221", "Sensor_222", "Sensor_223", "Sensor_224", "Sensor_225", "Sensor_226", "Sensor_227", "Sensor_228", "Sensor_229", "Sensor_230", "Sensor_231", "Sensor_232", "Sensor_233", "Sensor_234", "Sensor_235", "Sensor_236", "Sensor_237", "Sensor_238", "Sensor_239", "Sensor_240", "Sensor_241", "Sensor_242", "Sensor_243", "Sensor_244", "Sensor_245", "Sensor_246", "Sensor_247", "Sensor_248", "Sensor_249", "Sensor_250", "Sensor_251", "Sensor_252", "Sensor_253", "Sensor_254", "Sensor_255", }; 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_SensorMultiLevel { enum _enumerated { Air_Temperature = 1, General_Purpose, Luminance, Power, Humidity, Velocity, Direction, Atmospheric_Pressure, Barometric_Pressure, Solar_Radiation, Dew_Point, Rain_Rate, Tide_Level, Weight, Voltage, Current, Carbon_Dioxide, Air_Flow, Tank_Capacity, Distance, Angle_Position, Rotation, Water_Temperature, Soil_Temperature, Seismic_Intensity, Seismic_Magnitude, Ultraviolet, Electrical_Resistivity, Electrical_Conductivity, Loudness, Moisture, Frequency, Time, Target_Temperature, Particulate_Mater_2_5, Formaldehyde_CH20_Level, Radon_Concentration, Methane_Density, Volatile_Organic_Compound, Carbon_Monoxide, Soil_Humidity, Soil_Reactivity, Soil_Salinity, Heart_Beat, Blood_Pressure, Muscle_Mass, Fat_Mass, Bone_Mass, Total_Body_Water, Basic_Metabolic_Rate, Body_Mass_Index, X_Axis_Acceleration, Y_Axis_Acceleration, Z_Axis_Acceleration, Smoke_Density, Water_Flow, Water_Pressure, RF_Signal_Strength, Particulate_Matter, Respiratory_Rate, Relative_Modulation, Boiler_Water_Temperature, Domestic_Hot_Water_Temperature, Outside_Temperature, Exhaust_Temperature, Water_Chlorine, Water_Acidity, Water_Oxidation_Reduction_Potential, Heart_Rate_LF_HF_Ratio, Motion_Direction, Applied_Force, Return_Air_Temperature, Supply_Air_Temperature, Condenser_Coil_Temperature, Evaporator_Coil_Temperature, Liquid_Line_Temperature, Discharge_Line_Temperature, Suction, Discharge, Defrost_Temperature, Ozone, Sulfur_Dioxide, Nitrogen_Dioxide, Ammonia, Lead, Particulate_Matter_v2, Air_Temperature_Units = 256, General_Purpose_Units, Luminance_Units, Power_Units, Humidity_Units, Velocity_Units, Direction_Units, Atmospheric_Pressure_Units, Barometric_Pressure_Units, Solar_Radiation_Units, Dew_Point_Units, Rain_Rate_Units, Tide_Level_Units, Weight_Units, Voltage_Units, Current_Units, Carbon_Dioxide_Units, Air_Flow_Units, Tank_Capacity_Units, Distance_Units, Angle_Position_Units, Rotation_Units, Water_Temperature_Units, Soil_Temperature_Units, Seismic_Intensity_Units, Seismic_Magnitude_Units, Ultraviolet_Units, Electrical_Resistivity_Units, Electrical_Conductivity_Units, Loudness_Units, Moisture_Units, Frequency_Units, Time_Units, Target_Temperature_Units, Particulate_Mater_2_5_Units, Formaldehyde_CH20_Level_Units, Radon_Concentration_Units, Methane_Density_Units, Volatile_Organic_Compound_Units, Carbon_Monoxide_Units, Soil_Humidity_Units, Soil_Reactivity_Units, Soil_Salinity_Units, Heart_Beat_Units, Blood_Pressure_Units, Muscle_Mass_Units, Fat_Mass_Units, Bone_Mass_Units, Total_Body_Water_Units, Basic_Metabolic_Rate_Units, Body_Mass_Index_Units, X_Axis_Acceleration_Units, Y_Axis_Acceleration_Units, Z_Axis_Acceleration_Units, Smoke_Density_Units, Water_Flow_Units, Water_Pressure_Units, RF_Signal_Strength_Units, Particulate_Matter_Units, Respiratory_Rate_Units, Relative_Modulation_Units, Boiler_Water_Temperature_Units, Domestic_Hot_Water_Temperature_Units, Outside_Temperature_Units, Exhaust_Temperature_Units, Water_Chlorine_Units, Water_Acidity_Units, Water_Oxidation_Reduction_Potential_Units, Heart_Rate_LF_HF_Ratio_Units, Motion_Direction_Units, Applied_Force_Units, Return_Air_Temperature_Units, Supply_Air_Temperature_Units, Condenser_Coil_Temperature_Units, Evaporator_Coil_Temperature_Units, Liquid_Line_Temperature_Units, Discharge_Line_Temperature_Units, Suction_Units, Discharge_Units, Defrost_Temperature_Units, Ozone_Units, Sulfur_Dioxide_Units, Nitrogen_Dioxide_Units, Ammonia_Units, Lead_Units, Particulate_Matter_v2_Units }; _enumerated _value; ValueID_Index_SensorMultiLevel(_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 = 172; static const int* _values() { static const int values[] = { (ignore_assign)Air_Temperature = 1, (ignore_assign)General_Purpose, (ignore_assign)Luminance, (ignore_assign)Power, (ignore_assign)Humidity, (ignore_assign)Velocity, (ignore_assign)Direction, (ignore_assign)Atmospheric_Pressure, (ignore_assign)Barometric_Pressure, (ignore_assign)Solar_Radiation, (ignore_assign)Dew_Point, (ignore_assign)Rain_Rate, (ignore_assign)Tide_Level, (ignore_assign)Weight, (ignore_assign)Voltage, (ignore_assign)Current, (ignore_assign)Carbon_Dioxide, (ignore_assign)Air_Flow, (ignore_assign)Tank_Capacity, (ignore_assign)Distance, (ignore_assign)Angle_Position, (ignore_assign)Rotation, (ignore_assign)Water_Temperature, (ignore_assign)Soil_Temperature, (ignore_assign)Seismic_Intensity, (ignore_assign)Seismic_Magnitude, (ignore_assign)Ultraviolet, (ignore_assign)Electrical_Resistivity, (ignore_assign)Electrical_Conductivity, (ignore_assign)Loudness, (ignore_assign)Moisture, (ignore_assign)Frequency, (ignore_assign)Time, (ignore_assign)Target_Temperature, (ignore_assign)Particulate_Mater_2_5, (ignore_assign)Formaldehyde_CH20_Level, (ignore_assign)Radon_Concentration, (ignore_assign)Methane_Density, (ignore_assign)Volatile_Organic_Compound, (ignore_assign)Carbon_Monoxide, (ignore_assign)Soil_Humidity, (ignore_assign)Soil_Reactivity, (ignore_assign)Soil_Salinity, (ignore_assign)Heart_Beat, (ignore_assign)Blood_Pressure, (ignore_assign)Muscle_Mass, (ignore_assign)Fat_Mass, (ignore_assign)Bone_Mass, (ignore_assign)Total_Body_Water, (ignore_assign)Basic_Metabolic_Rate, (ignore_assign)Body_Mass_Index, (ignore_assign)X_Axis_Acceleration, (ignore_assign)Y_Axis_Acceleration, (ignore_assign)Z_Axis_Acceleration, (ignore_assign)Smoke_Density, (ignore_assign)Water_Flow, (ignore_assign)Water_Pressure, (ignore_assign)RF_Signal_Strength, (ignore_assign)Particulate_Matter, (ignore_assign)Respiratory_Rate, (ignore_assign)Relative_Modulation, (ignore_assign)Boiler_Water_Temperature, (ignore_assign)Domestic_Hot_Water_Temperature, (ignore_assign)Outside_Temperature, (ignore_assign)Exhaust_Temperature, (ignore_assign)Water_Chlorine, (ignore_assign)Water_Acidity, (ignore_assign)Water_Oxidation_Reduction_Potential, (ignore_assign)Heart_Rate_LF_HF_Ratio, (ignore_assign)Motion_Direction, (ignore_assign)Applied_Force, (ignore_assign)Return_Air_Temperature, (ignore_assign)Supply_Air_Temperature, (ignore_assign)Condenser_Coil_Temperature, (ignore_assign)Evaporator_Coil_Temperature, (ignore_assign)Liquid_Line_Temperature, (ignore_assign)Discharge_Line_Temperature, (ignore_assign)Suction, (ignore_assign)Discharge, (ignore_assign)Defrost_Temperature, (ignore_assign)Ozone, (ignore_assign)Sulfur_Dioxide, (ignore_assign)Nitrogen_Dioxide, (ignore_assign)Ammonia, (ignore_assign)Lead, (ignore_assign)Particulate_Matter_v2, (ignore_assign)Air_Temperature_Units = 256, (ignore_assign)General_Purpose_Units, (ignore_assign)Luminance_Units, (ignore_assign)Power_Units, (ignore_assign)Humidity_Units, (ignore_assign)Velocity_Units, (ignore_assign)Direction_Units, (ignore_assign)Atmospheric_Pressure_Units, (ignore_assign)Barometric_Pressure_Units, (ignore_assign)Solar_Radiation_Units, (ignore_assign)Dew_Point_Units, (ignore_assign)Rain_Rate_Units, (ignore_assign)Tide_Level_Units, (ignore_assign)Weight_Units, (ignore_assign)Voltage_Units, (ignore_assign)Current_Units, (ignore_assign)Carbon_Dioxide_Units, (ignore_assign)Air_Flow_Units, (ignore_assign)Tank_Capacity_Units, (ignore_assign)Distance_Units, (ignore_assign)Angle_Position_Units, (ignore_assign)Rotation_Units, (ignore_assign)Water_Temperature_Units, (ignore_assign)Soil_Temperature_Units, (ignore_assign)Seismic_Intensity_Units, (ignore_assign)Seismic_Magnitude_Units, (ignore_assign)Ultraviolet_Units, (ignore_assign)Electrical_Resistivity_Units, (ignore_assign)Electrical_Conductivity_Units, (ignore_assign)Loudness_Units, (ignore_assign)Moisture_Units, (ignore_assign)Frequency_Units, (ignore_assign)Time_Units, (ignore_assign)Target_Temperature_Units, (ignore_assign)Particulate_Mater_2_5_Units, (ignore_assign)Formaldehyde_CH20_Level_Units, (ignore_assign)Radon_Concentration_Units, (ignore_assign)Methane_Density_Units, (ignore_assign)Volatile_Organic_Compound_Units, (ignore_assign)Carbon_Monoxide_Units, (ignore_assign)Soil_Humidity_Units, (ignore_assign)Soil_Reactivity_Units, (ignore_assign)Soil_Salinity_Units, (ignore_assign)Heart_Beat_Units, (ignore_assign)Blood_Pressure_Units, (ignore_assign)Muscle_Mass_Units, (ignore_assign)Fat_Mass_Units, (ignore_assign)Bone_Mass_Units, (ignore_assign)Total_Body_Water_Units, (ignore_assign)Basic_Metabolic_Rate_Units, (ignore_assign)Body_Mass_Index_Units, (ignore_assign)X_Axis_Acceleration_Units, (ignore_assign)Y_Axis_Acceleration_Units, (ignore_assign)Z_Axis_Acceleration_Units, (ignore_assign)Smoke_Density_Units, (ignore_assign)Water_Flow_Units, (ignore_assign)Water_Pressure_Units, (ignore_assign)RF_Signal_Strength_Units, (ignore_assign)Particulate_Matter_Units, (ignore_assign)Respiratory_Rate_Units, (ignore_assign)Relative_Modulation_Units, (ignore_assign)Boiler_Water_Temperature_Units, (ignore_assign)Domestic_Hot_Water_Temperature_Units, (ignore_assign)Outside_Temperature_Units, (ignore_assign)Exhaust_Temperature_Units, (ignore_assign)Water_Chlorine_Units, (ignore_assign)Water_Acidity_Units, (ignore_assign)Water_Oxidation_Reduction_Potential_Units, (ignore_assign)Heart_Rate_LF_HF_Ratio_Units, (ignore_assign)Motion_Direction_Units, (ignore_assign)Applied_Force_Units, (ignore_assign)Return_Air_Temperature_Units, (ignore_assign)Supply_Air_Temperature_Units, (ignore_assign)Condenser_Coil_Temperature_Units, (ignore_assign)Evaporator_Coil_Temperature_Units, (ignore_assign)Liquid_Line_Temperature_Units, (ignore_assign)Discharge_Line_Temperature_Units, (ignore_assign)Suction_Units, (ignore_assign)Discharge_Units, (ignore_assign)Defrost_Temperature_Units, (ignore_assign)Ozone_Units, (ignore_assign)Sulfur_Dioxide_Units, (ignore_assign)Nitrogen_Dioxide_Units, (ignore_assign)Ammonia_Units, (ignore_assign)Lead_Units, (ignore_assign)Particulate_Matter_v2_Units, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Air_Temperature = 1", "General_Purpose", "Luminance", "Power", "Humidity", "Velocity", "Direction", "Atmospheric_Pressure", "Barometric_Pressure", "Solar_Radiation", "Dew_Point", "Rain_Rate", "Tide_Level", "Weight", "Voltage", "Current", "Carbon_Dioxide", "Air_Flow", "Tank_Capacity", "Distance", "Angle_Position", "Rotation", "Water_Temperature", "Soil_Temperature", "Seismic_Intensity", "Seismic_Magnitude", "Ultraviolet", "Electrical_Resistivity", "Electrical_Conductivity", "Loudness", "Moisture", "Frequency", "Time", "Target_Temperature", "Particulate_Mater_2_5", "Formaldehyde_CH20_Level", "Radon_Concentration", "Methane_Density", "Volatile_Organic_Compound", "Carbon_Monoxide", "Soil_Humidity", "Soil_Reactivity", "Soil_Salinity", "Heart_Beat", "Blood_Pressure", "Muscle_Mass", "Fat_Mass", "Bone_Mass", "Total_Body_Water", "Basic_Metabolic_Rate", "Body_Mass_Index", "X_Axis_Acceleration", "Y_Axis_Acceleration", "Z_Axis_Acceleration", "Smoke_Density", "Water_Flow", "Water_Pressure", "RF_Signal_Strength", "Particulate_Matter", "Respiratory_Rate", "Relative_Modulation", "Boiler_Water_Temperature", "Domestic_Hot_Water_Temperature", "Outside_Temperature", "Exhaust_Temperature", "Water_Chlorine", "Water_Acidity", "Water_Oxidation_Reduction_Potential", "Heart_Rate_LF_HF_Ratio", "Motion_Direction", "Applied_Force", "Return_Air_Temperature", "Supply_Air_Temperature", "Condenser_Coil_Temperature", "Evaporator_Coil_Temperature", "Liquid_Line_Temperature", "Discharge_Line_Temperature", "Suction", "Discharge", "Defrost_Temperature", "Ozone", "Sulfur_Dioxide", "Nitrogen_Dioxide", "Ammonia", "Lead", "Particulate_Matter_v2", "Air_Temperature_Units = 256", "General_Purpose_Units", "Luminance_Units", "Power_Units", "Humidity_Units", "Velocity_Units", "Direction_Units", "Atmospheric_Pressure_Units", "Barometric_Pressure_Units", "Solar_Radiation_Units", "Dew_Point_Units", "Rain_Rate_Units", "Tide_Level_Units", "Weight_Units", "Voltage_Units", "Current_Units", "Carbon_Dioxide_Units", "Air_Flow_Units", "Tank_Capacity_Units", "Distance_Units", "Angle_Position_Units", "Rotation_Units", "Water_Temperature_Units", "Soil_Temperature_Units", "Seismic_Intensity_Units", "Seismic_Magnitude_Units", "Ultraviolet_Units", "Electrical_Resistivity_Units", "Electrical_Conductivity_Units", "Loudness_Units", "Moisture_Units", "Frequency_Units", "Time_Units", "Target_Temperature_Units", "Particulate_Mater_2_5_Units", "Formaldehyde_CH20_Level_Units", "Radon_Concentration_Units", "Methane_Density_Units", "Volatile_Organic_Compound_Units", "Carbon_Monoxide_Units", "Soil_Humidity_Units", "Soil_Reactivity_Units", "Soil_Salinity_Units", "Heart_Beat_Units", "Blood_Pressure_Units", "Muscle_Mass_Units", "Fat_Mass_Units", "Bone_Mass_Units", "Total_Body_Water_Units", "Basic_Metabolic_Rate_Units", "Body_Mass_Index_Units", "X_Axis_Acceleration_Units", "Y_Axis_Acceleration_Units", "Z_Axis_Acceleration_Units", "Smoke_Density_Units", "Water_Flow_Units", "Water_Pressure_Units", "RF_Signal_Strength_Units", "Particulate_Matter_Units", "Respiratory_Rate_Units", "Relative_Modulation_Units", "Boiler_Water_Temperature_Units", "Domestic_Hot_Water_Temperature_Units", "Outside_Temperature_Units", "Exhaust_Temperature_Units", "Water_Chlorine_Units", "Water_Acidity_Units", "Water_Oxidation_Reduction_Potential_Units", "Heart_Rate_LF_HF_Ratio_Units", "Motion_Direction_Units", "Applied_Force_Units", "Return_Air_Temperature_Units", "Supply_Air_Temperature_Units", "Condenser_Coil_Temperature_Units", "Evaporator_Coil_Temperature_Units", "Liquid_Line_Temperature_Units", "Discharge_Line_Temperature_Units", "Suction_Units", "Discharge_Units", "Defrost_Temperature_Units", "Ozone_Units", "Sulfur_Dioxide_Units", "Nitrogen_Dioxide_Units", "Ammonia_Units", "Lead_Units", "Particulate_Matter_v2_Units", }; 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_SimpleAV { enum _enumerated { Command = 0 }; _enumerated _value; ValueID_Index_SimpleAV(_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 = 1; static const int* _values() { static const int values[] = { (ignore_assign)Command = 0, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Command = 0", }; 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_SoundSwitch { enum _enumerated { Tone_Count = 0, Tones = 1, Volume = 2, Default_Tone = 3 }; _enumerated _value; ValueID_Index_SoundSwitch(_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)Tone_Count = 0, (ignore_assign)Tones = 1, (ignore_assign)Volume = 2, (ignore_assign)Default_Tone = 3, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Tone_Count = 0", "Tones = 1", "Volume = 2", "Default_Tone = 3", }; 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_SwitchAll { enum _enumerated { SwitchAll = 0 }; _enumerated _value; ValueID_Index_SwitchAll(_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 = 1; static const int* _values() { static const int values[] = { (ignore_assign)SwitchAll = 0, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "SwitchAll = 0", }; 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_SwitchBinary { enum _enumerated { Level = 0, TargetState = 1, Duration = 2 }; _enumerated _value; ValueID_Index_SwitchBinary(_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 = 3; static const int* _values() { static const int values[] = { (ignore_assign)Level = 0, (ignore_assign)TargetState = 1, (ignore_assign)Duration = 2, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Level = 0", "TargetState = 1", "Duration = 2", }; 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_SwitchMultiLevel { enum _enumerated { Level = 0, Bright = 1, Dim = 2, IgnoreStartLevel = 3, StartLevel = 4, Duration = 5, Step = 6, Inc = 7, Dec = 8, TargetValue = 9 }; _enumerated _value; ValueID_Index_SwitchMultiLevel(_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 = 10; static const int* _values() { static const int values[] = { (ignore_assign)Level = 0, (ignore_assign)Bright = 1, (ignore_assign)Dim = 2, (ignore_assign)IgnoreStartLevel = 3, (ignore_assign)StartLevel = 4, (ignore_assign)Duration = 5, (ignore_assign)Step = 6, (ignore_assign)Inc = 7, (ignore_assign)Dec = 8, (ignore_assign)TargetValue = 9, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Level = 0", "Bright = 1", "Dim = 2", "IgnoreStartLevel = 3", "StartLevel = 4", "Duration = 5", "Step = 6", "Inc = 7", "Dec = 8", "TargetValue = 9", }; 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_SwitchToggleBinary { enum _enumerated { ToggleSwitch = 0 }; _enumerated _value; ValueID_Index_SwitchToggleBinary(_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 = 1; static const int* _values() { static const int values[] = { (ignore_assign)ToggleSwitch = 0, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "ToggleSwitch = 0", }; 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_SwitchToggleMultilevel { enum _enumerated { Level = 0 }; _enumerated _value; ValueID_Index_SwitchToggleMultilevel(_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 = 1; static const int* _values() { static const int values[] = { (ignore_assign)Level = 0, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Level = 0", }; 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_ThermostatFanMode { enum _enumerated { FanMode = 0 }; _enumerated _value; ValueID_Index_ThermostatFanMode(_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 = 1; static const int* _values() { static const int values[] = { (ignore_assign)FanMode = 0, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "FanMode = 0", }; 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_ThermostatFanState { enum _enumerated { FanState = 0 }; _enumerated _value; ValueID_Index_ThermostatFanState(_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 = 1; static const int* _values() { static const int values[] = { (ignore_assign)FanState = 0, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "FanState = 0", }; 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_ThermostatMode { enum _enumerated { Mode = 0 }; _enumerated _value; ValueID_Index_ThermostatMode(_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 = 1; static const int* _values() { static const int values[] = { (ignore_assign)Mode = 0, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Mode = 0", }; 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_ThermostatOperatingState { enum _enumerated { OperatingState = 0 }; _enumerated _value; ValueID_Index_ThermostatOperatingState(_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 = 1; static const int* _values() { static const int values[] = { (ignore_assign)OperatingState = 0, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "OperatingState = 0", }; 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_ThermostatSetpoint { enum _enumerated { Unused_0 = 0, Heating, Cooling, Unused_3, Unused_4, Unused_5, Unused_6, Furnace, DryAir, MoistAir, AutoChangeover, HeatingEcon, CoolingEcon, AwayHeating, CoolingHeating, Unused_0_Minimum = 100, Heating_Minimum, Cooling_Minimum, Unused_3_Minimum, Unused_4_Minimum, Unused_5_Minimum, Unused_6_Minimum, Furnace_Minimum, DryAir_Minimum, MoistAir_Minimum, AutoChangeOver_Minimum, Heating_Econ_Minimum, Cooling_Econ_Minimum, Away_Heating_Minimum, Cooling_Heating_Minimum, Unused_0_Maximum = 200, Heating_Maximum, Cooling_Maximum, Unused_3_Maximum, Unused_4_Maximum, Unused_5_Maximum, Unused_6_Maximum, Furnace_Maximum, DryAir_Maximum, MoistAir_Maximum, AutoChangeOver_Maximum, Heating_Econ_Maximum, Cooling_Econ_Maximum, Away_Heating_Maximum, Cooling_Heating_Maximum }; _enumerated _value; ValueID_Index_ThermostatSetpoint(_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 = 45; static const int* _values() { static const int values[] = { (ignore_assign)Unused_0 = 0, (ignore_assign)Heating, (ignore_assign)Cooling, (ignore_assign)Unused_3, (ignore_assign)Unused_4, (ignore_assign)Unused_5, (ignore_assign)Unused_6, (ignore_assign)Furnace, (ignore_assign)DryAir, (ignore_assign)MoistAir, (ignore_assign)AutoChangeover, (ignore_assign)HeatingEcon, (ignore_assign)CoolingEcon, (ignore_assign)AwayHeating, (ignore_assign)CoolingHeating, (ignore_assign)Unused_0_Minimum = 100, (ignore_assign)Heating_Minimum, (ignore_assign)Cooling_Minimum, (ignore_assign)Unused_3_Minimum, (ignore_assign)Unused_4_Minimum, (ignore_assign)Unused_5_Minimum, (ignore_assign)Unused_6_Minimum, (ignore_assign)Furnace_Minimum, (ignore_assign)DryAir_Minimum, (ignore_assign)MoistAir_Minimum, (ignore_assign)AutoChangeOver_Minimum, (ignore_assign)Heating_Econ_Minimum, (ignore_assign)Cooling_Econ_Minimum, (ignore_assign)Away_Heating_Minimum, (ignore_assign)Cooling_Heating_Minimum, (ignore_assign)Unused_0_Maximum = 200, (ignore_assign)Heating_Maximum, (ignore_assign)Cooling_Maximum, (ignore_assign)Unused_3_Maximum, (ignore_assign)Unused_4_Maximum, (ignore_assign)Unused_5_Maximum, (ignore_assign)Unused_6_Maximum, (ignore_assign)Furnace_Maximum, (ignore_assign)DryAir_Maximum, (ignore_assign)MoistAir_Maximum, (ignore_assign)AutoChangeOver_Maximum, (ignore_assign)Heating_Econ_Maximum, (ignore_assign)Cooling_Econ_Maximum, (ignore_assign)Away_Heating_Maximum, (ignore_assign)Cooling_Heating_Maximum, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Unused_0 = 0", "Heating", "Cooling", "Unused_3", "Unused_4", "Unused_5", "Unused_6", "Furnace", "DryAir", "MoistAir", "AutoChangeover", "HeatingEcon", "CoolingEcon", "AwayHeating", "CoolingHeating", "Unused_0_Minimum = 100", "Heating_Minimum", "Cooling_Minimum", "Unused_3_Minimum", "Unused_4_Minimum", "Unused_5_Minimum", "Unused_6_Minimum", "Furnace_Minimum", "DryAir_Minimum", "MoistAir_Minimum", "AutoChangeOver_Minimum", "Heating_Econ_Minimum", "Cooling_Econ_Minimum", "Away_Heating_Minimum", "Cooling_Heating_Minimum", "Unused_0_Maximum = 200", "Heating_Maximum", "Cooling_Maximum", "Unused_3_Maximum", "Unused_4_Maximum", "Unused_5_Maximum", "Unused_6_Maximum", "Furnace_Maximum", "DryAir_Maximum", "MoistAir_Maximum", "AutoChangeOver_Maximum", "Heating_Econ_Maximum", "Cooling_Econ_Maximum", "Away_Heating_Maximum", "Cooling_Heating_Maximum", }; 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_ThermostatSetpoint { enum _enumerated { Unused_0 = 0, Heating, Cooling, Unused_3, Unused_4, Unused_5, Unused_6, Furnace, DryAir, MoistAir, AutoChangeover, HeatingEcon, CoolingEcon, AwayHeating, CoolingHeating, SetPointMinSize, Unused_0_Minimum = 100, Heating_Minimum, Cooling_Minimum, Unused_3_Minimum, Unused_4_Minimum, Unused_5_Minimum, Unused_6_Minimum, Furnace_Minimum, DryAir_Minimum, MoistAir_Minimum, AutoChangeOver_Minimum, Heating_Econ_Minimum, Cooling_Econ_Minimum, Away_Heating_Minimum, Cooling_Heating_Minimum, Unused_0_Maximum = 200, Heating_Maximum, Cooling_Maximum, Unused_3_Maximum, Unused_4_Maximum, Unused_5_Maximum, Unused_6_Maximum, Furnace_Maximum, DryAir_Maximum, MoistAir_Maximum, AutoChangeOver_Maximum, Heating_Econ_Maximum, Cooling_Econ_Maximum, Away_Heating_Maximum, Cooling_Heating_Maximum }; _enumerated _value; ValueID_Index_ThermostatSetpoint(_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 = 46; static const int* _values() { static const int values[] = { (ignore_assign)Unused_0 = 0, (ignore_assign)Heating, (ignore_assign)Cooling, (ignore_assign)Unused_3, (ignore_assign)Unused_4, (ignore_assign)Unused_5, (ignore_assign)Unused_6, (ignore_assign)Furnace, (ignore_assign)DryAir, (ignore_assign)MoistAir, (ignore_assign)AutoChangeover, (ignore_assign)HeatingEcon, (ignore_assign)CoolingEcon, (ignore_assign)AwayHeating, (ignore_assign)CoolingHeating, (ignore_assign)SetPointMinSize, (ignore_assign)Unused_0_Minimum = 100, (ignore_assign)Heating_Minimum, (ignore_assign)Cooling_Minimum, (ignore_assign)Unused_3_Minimum, (ignore_assign)Unused_4_Minimum, (ignore_assign)Unused_5_Minimum, (ignore_assign)Unused_6_Minimum, (ignore_assign)Furnace_Minimum, (ignore_assign)DryAir_Minimum, (ignore_assign)MoistAir_Minimum, (ignore_assign)AutoChangeOver_Minimum, (ignore_assign)Heating_Econ_Minimum, (ignore_assign)Cooling_Econ_Minimum, (ignore_assign)Away_Heating_Minimum, (ignore_assign)Cooling_Heating_Minimum, (ignore_assign)Unused_0_Maximum = 200, (ignore_assign)Heating_Maximum, (ignore_assign)Cooling_Maximum, (ignore_assign)Unused_3_Maximum, (ignore_assign)Unused_4_Maximum, (ignore_assign)Unused_5_Maximum, (ignore_assign)Unused_6_Maximum, (ignore_assign)Furnace_Maximum, (ignore_assign)DryAir_Maximum, (ignore_assign)MoistAir_Maximum, (ignore_assign)AutoChangeOver_Maximum, (ignore_assign)Heating_Econ_Maximum, (ignore_assign)Cooling_Econ_Maximum, (ignore_assign)Away_Heating_Maximum, (ignore_assign)Cooling_Heating_Maximum, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Unused_0 = 0", "Heating", "Cooling", "Unused_3", "Unused_4", "Unused_5", "Unused_6", "Furnace", "DryAir", "MoistAir", "AutoChangeover", "HeatingEcon", "CoolingEcon", "AwayHeating", "CoolingHeating", "SetPointMinSize", "Unused_0_Minimum = 100", "Heating_Minimum", "Cooling_Minimum", "Unused_3_Minimum", "Unused_4_Minimum", "Unused_5_Minimum", "Unused_6_Minimum", "Furnace_Minimum", "DryAir_Minimum", "MoistAir_Minimum", "AutoChangeOver_Minimum", "Heating_Econ_Minimum", "Cooling_Econ_Minimum", "Away_Heating_Minimum", "Cooling_Heating_Minimum", "Unused_0_Maximum = 200", "Heating_Maximum", "Cooling_Maximum", "Unused_3_Maximum", "Unused_4_Maximum", "Unused_5_Maximum", "Unused_6_Maximum", "Furnace_Maximum", "DryAir_Maximum", "MoistAir_Maximum", "AutoChangeOver_Maximum", "Heating_Econ_Maximum", "Cooling_Econ_Maximum", "Away_Heating_Maximum", "Cooling_Heating_Maximum", }; 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_TimeParameters { enum _enumerated { Date = 0, Time = 1, Set = 2, Refresh = 3 }; _enumerated _value; ValueID_Index_TimeParameters(_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)Date = 0, (ignore_assign)Time = 1, (ignore_assign)Set = 2, (ignore_assign)Refresh = 3, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Date = 0", "Time = 1", "Set = 2", "Refresh = 3", }; 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_UserCode { enum _enumerated { Enrollment_Code = 0, Code_1, Code_2, Code_3, Code_4, Code_5, Code_6, Code_7, Code_8, Code_9, Code_10, Code_11, Code_12, Code_13, Code_14, Code_15, Code_16, Code_17, Code_18, Code_19, Code_20, Code_21, Code_22, Code_23, Code_24, Code_25, Code_26, Code_27, Code_28, Code_29, Code_30, Code_31, Code_32, Code_33, Code_34, Code_35, Code_36, Code_37, Code_38, Code_39, Code_40, Code_41, Code_42, Code_43, Code_44, Code_45, Code_46, Code_47, Code_48, Code_49, Code_50, Code_51, Code_52, Code_53, Code_54, Code_55, Code_56, Code_57, Code_58, Code_59, Code_60, Code_61, Code_62, Code_63, Code_64, Code_65, Code_66, Code_67, Code_68, Code_69, Code_70, Code_71, Code_72, Code_73, Code_74, Code_75, Code_76, Code_77, Code_78, Code_79, Code_80, Code_81, Code_82, Code_83, Code_84, Code_85, Code_86, Code_87, Code_88, Code_89, Code_90, Code_91, Code_92, Code_93, Code_94, Code_95, Code_96, Code_97, Code_98, Code_99, Code_100, Code_101, Code_102, Code_103, Code_104, Code_105, Code_106, Code_107, Code_108, Code_109, Code_110, Code_111, Code_112, Code_113, Code_114, Code_115, Code_116, Code_117, Code_118, Code_119, Code_120, Code_121, Code_122, Code_123, Code_124, Code_125, Code_126, Code_127, Code_128, Code_129, Code_130, Code_131, Code_132, Code_133, Code_134, Code_135, Code_136, Code_137, Code_138, Code_139, Code_140, Code_141, Code_142, Code_143, Code_144, Code_145, Code_146, Code_147, Code_148, Code_149, Code_150, Code_151, Code_152, Code_153, Code_154, Code_155, Code_156, Code_157, Code_158, Code_159, Code_160, Code_161, Code_162, Code_163, Code_164, Code_165, Code_166, Code_167, Code_168, Code_169, Code_170, Code_171, Code_172, Code_173, Code_174, Code_175, Code_176, Code_177, Code_178, Code_179, Code_180, Code_181, Code_182, Code_183, Code_184, Code_185, Code_186, Code_187, Code_188, Code_189, Code_190, Code_191, Code_192, Code_193, Code_194, Code_195, Code_196, Code_197, Code_198, Code_199, Code_200, Code_201, Code_202, Code_203, Code_204, Code_205, Code_206, Code_207, Code_208, Code_209, Code_210, Code_211, Code_212, Code_213, Code_214, Code_215, Code_216, Code_217, Code_218, Code_219, Code_220, Code_221, Code_222, Code_223, Code_224, Code_225, Code_226, Code_227, Code_228, Code_229, Code_230, Code_231, Code_232, Code_233, Code_234, Code_235, Code_236, Code_237, Code_238, Code_239, Code_240, Code_241, Code_242, Code_243, Code_244, Code_245, Code_246, Code_247, Code_248, Code_249, Code_250, Code_251, Code_252, Code_253, Refresh = 255, RemoveCode = 256, Count = 257, RawValue = 258, RawValueIndex = 259 }; _enumerated _value; ValueID_Index_UserCode(_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 = 259; static const int* _values() { static const int values[] = { (ignore_assign)Enrollment_Code = 0, (ignore_assign)Code_1, (ignore_assign)Code_2, (ignore_assign)Code_3, (ignore_assign)Code_4, (ignore_assign)Code_5, (ignore_assign)Code_6, (ignore_assign)Code_7, (ignore_assign)Code_8, (ignore_assign)Code_9, (ignore_assign)Code_10, (ignore_assign)Code_11, (ignore_assign)Code_12, (ignore_assign)Code_13, (ignore_assign)Code_14, (ignore_assign)Code_15, (ignore_assign)Code_16, (ignore_assign)Code_17, (ignore_assign)Code_18, (ignore_assign)Code_19, (ignore_assign)Code_20, (ignore_assign)Code_21, (ignore_assign)Code_22, (ignore_assign)Code_23, (ignore_assign)Code_24, (ignore_assign)Code_25, (ignore_assign)Code_26, (ignore_assign)Code_27, (ignore_assign)Code_28, (ignore_assign)Code_29, (ignore_assign)Code_30, (ignore_assign)Code_31, (ignore_assign)Code_32, (ignore_assign)Code_33, (ignore_assign)Code_34, (ignore_assign)Code_35, (ignore_assign)Code_36, (ignore_assign)Code_37, (ignore_assign)Code_38, (ignore_assign)Code_39, (ignore_assign)Code_40, (ignore_assign)Code_41, (ignore_assign)Code_42, (ignore_assign)Code_43, (ignore_assign)Code_44, (ignore_assign)Code_45, (ignore_assign)Code_46, (ignore_assign)Code_47, (ignore_assign)Code_48, (ignore_assign)Code_49, (ignore_assign)Code_50, (ignore_assign)Code_51, (ignore_assign)Code_52, (ignore_assign)Code_53, (ignore_assign)Code_54, (ignore_assign)Code_55, (ignore_assign)Code_56, (ignore_assign)Code_57, (ignore_assign)Code_58, (ignore_assign)Code_59, (ignore_assign)Code_60, (ignore_assign)Code_61, (ignore_assign)Code_62, (ignore_assign)Code_63, (ignore_assign)Code_64, (ignore_assign)Code_65, (ignore_assign)Code_66, (ignore_assign)Code_67, (ignore_assign)Code_68, (ignore_assign)Code_69, (ignore_assign)Code_70, (ignore_assign)Code_71, (ignore_assign)Code_72, (ignore_assign)Code_73, (ignore_assign)Code_74, (ignore_assign)Code_75, (ignore_assign)Code_76, (ignore_assign)Code_77, (ignore_assign)Code_78, (ignore_assign)Code_79, (ignore_assign)Code_80, (ignore_assign)Code_81, (ignore_assign)Code_82, (ignore_assign)Code_83, (ignore_assign)Code_84, (ignore_assign)Code_85, (ignore_assign)Code_86, (ignore_assign)Code_87, (ignore_assign)Code_88, (ignore_assign)Code_89, (ignore_assign)Code_90, (ignore_assign)Code_91, (ignore_assign)Code_92, (ignore_assign)Code_93, (ignore_assign)Code_94, (ignore_assign)Code_95, (ignore_assign)Code_96, (ignore_assign)Code_97, (ignore_assign)Code_98, (ignore_assign)Code_99, (ignore_assign)Code_100, (ignore_assign)Code_101, (ignore_assign)Code_102, (ignore_assign)Code_103, (ignore_assign)Code_104, (ignore_assign)Code_105, (ignore_assign)Code_106, (ignore_assign)Code_107, (ignore_assign)Code_108, (ignore_assign)Code_109, (ignore_assign)Code_110, (ignore_assign)Code_111, (ignore_assign)Code_112, (ignore_assign)Code_113, (ignore_assign)Code_114, (ignore_assign)Code_115, (ignore_assign)Code_116, (ignore_assign)Code_117, (ignore_assign)Code_118, (ignore_assign)Code_119, (ignore_assign)Code_120, (ignore_assign)Code_121, (ignore_assign)Code_122, (ignore_assign)Code_123, (ignore_assign)Code_124, (ignore_assign)Code_125, (ignore_assign)Code_126, (ignore_assign)Code_127, (ignore_assign)Code_128, (ignore_assign)Code_129, (ignore_assign)Code_130, (ignore_assign)Code_131, (ignore_assign)Code_132, (ignore_assign)Code_133, (ignore_assign)Code_134, (ignore_assign)Code_135, (ignore_assign)Code_136, (ignore_assign)Code_137, (ignore_assign)Code_138, (ignore_assign)Code_139, (ignore_assign)Code_140, (ignore_assign)Code_141, (ignore_assign)Code_142, (ignore_assign)Code_143, (ignore_assign)Code_144, (ignore_assign)Code_145, (ignore_assign)Code_146, (ignore_assign)Code_147, (ignore_assign)Code_148, (ignore_assign)Code_149, (ignore_assign)Code_150, (ignore_assign)Code_151, (ignore_assign)Code_152, (ignore_assign)Code_153, (ignore_assign)Code_154, (ignore_assign)Code_155, (ignore_assign)Code_156, (ignore_assign)Code_157, (ignore_assign)Code_158, (ignore_assign)Code_159, (ignore_assign)Code_160, (ignore_assign)Code_161, (ignore_assign)Code_162, (ignore_assign)Code_163, (ignore_assign)Code_164, (ignore_assign)Code_165, (ignore_assign)Code_166, (ignore_assign)Code_167, (ignore_assign)Code_168, (ignore_assign)Code_169, (ignore_assign)Code_170, (ignore_assign)Code_171, (ignore_assign)Code_172, (ignore_assign)Code_173, (ignore_assign)Code_174, (ignore_assign)Code_175, (ignore_assign)Code_176, (ignore_assign)Code_177, (ignore_assign)Code_178, (ignore_assign)Code_179, (ignore_assign)Code_180, (ignore_assign)Code_181, (ignore_assign)Code_182, (ignore_assign)Code_183, (ignore_assign)Code_184, (ignore_assign)Code_185, (ignore_assign)Code_186, (ignore_assign)Code_187, (ignore_assign)Code_188, (ignore_assign)Code_189, (ignore_assign)Code_190, (ignore_assign)Code_191, (ignore_assign)Code_192, (ignore_assign)Code_193, (ignore_assign)Code_194, (ignore_assign)Code_195, (ignore_assign)Code_196, (ignore_assign)Code_197, (ignore_assign)Code_198, (ignore_assign)Code_199, (ignore_assign)Code_200, (ignore_assign)Code_201, (ignore_assign)Code_202, (ignore_assign)Code_203, (ignore_assign)Code_204, (ignore_assign)Code_205, (ignore_assign)Code_206, (ignore_assign)Code_207, (ignore_assign)Code_208, (ignore_assign)Code_209, (ignore_assign)Code_210, (ignore_assign)Code_211, (ignore_assign)Code_212, (ignore_assign)Code_213, (ignore_assign)Code_214, (ignore_assign)Code_215, (ignore_assign)Code_216, (ignore_assign)Code_217, (ignore_assign)Code_218, (ignore_assign)Code_219, (ignore_assign)Code_220, (ignore_assign)Code_221, (ignore_assign)Code_222, (ignore_assign)Code_223, (ignore_assign)Code_224, (ignore_assign)Code_225, (ignore_assign)Code_226, (ignore_assign)Code_227, (ignore_assign)Code_228, (ignore_assign)Code_229, (ignore_assign)Code_230, (ignore_assign)Code_231, (ignore_assign)Code_232, (ignore_assign)Code_233, (ignore_assign)Code_234, (ignore_assign)Code_235, (ignore_assign)Code_236, (ignore_assign)Code_237, (ignore_assign)Code_238, (ignore_assign)Code_239, (ignore_assign)Code_240, (ignore_assign)Code_241, (ignore_assign)Code_242, (ignore_assign)Code_243, (ignore_assign)Code_244, (ignore_assign)Code_245, (ignore_assign)Code_246, (ignore_assign)Code_247, (ignore_assign)Code_248, (ignore_assign)Code_249, (ignore_assign)Code_250, (ignore_assign)Code_251, (ignore_assign)Code_252, (ignore_assign)Code_253, (ignore_assign)Refresh = 255, (ignore_assign)RemoveCode = 256, (ignore_assign)Count = 257, (ignore_assign)RawValue = 258, (ignore_assign)RawValueIndex = 259, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Enrollment_Code = 0", "Code_1", "Code_2", "Code_3", "Code_4", "Code_5", "Code_6", "Code_7", "Code_8", "Code_9", "Code_10", "Code_11", "Code_12", "Code_13", "Code_14", "Code_15", "Code_16", "Code_17", "Code_18", "Code_19", "Code_20", "Code_21", "Code_22", "Code_23", "Code_24", "Code_25", "Code_26", "Code_27", "Code_28", "Code_29", "Code_30", "Code_31", "Code_32", "Code_33", "Code_34", "Code_35", "Code_36", "Code_37", "Code_38", "Code_39", "Code_40", "Code_41", "Code_42", "Code_43", "Code_44", "Code_45", "Code_46", "Code_47", "Code_48", "Code_49", "Code_50", "Code_51", "Code_52", "Code_53", "Code_54", "Code_55", "Code_56", "Code_57", "Code_58", "Code_59", "Code_60", "Code_61", "Code_62", "Code_63", "Code_64", "Code_65", "Code_66", "Code_67", "Code_68", "Code_69", "Code_70", "Code_71", "Code_72", "Code_73", "Code_74", "Code_75", "Code_76", "Code_77", "Code_78", "Code_79", "Code_80", "Code_81", "Code_82", "Code_83", "Code_84", "Code_85", "Code_86", "Code_87", "Code_88", "Code_89", "Code_90", "Code_91", "Code_92", "Code_93", "Code_94", "Code_95", "Code_96", "Code_97", "Code_98", "Code_99", "Code_100", "Code_101", "Code_102", "Code_103", "Code_104", "Code_105", "Code_106", "Code_107", "Code_108", "Code_109", "Code_110", "Code_111", "Code_112", "Code_113", "Code_114", "Code_115", "Code_116", "Code_117", "Code_118", "Code_119", "Code_120", "Code_121", "Code_122", "Code_123", "Code_124", "Code_125", "Code_126", "Code_127", "Code_128", "Code_129", "Code_130", "Code_131", "Code_132", "Code_133", "Code_134", "Code_135", "Code_136", "Code_137", "Code_138", "Code_139", "Code_140", "Code_141", "Code_142", "Code_143", "Code_144", "Code_145", "Code_146", "Code_147", "Code_148", "Code_149", "Code_150", "Code_151", "Code_152", "Code_153", "Code_154", "Code_155", "Code_156", "Code_157", "Code_158", "Code_159", "Code_160", "Code_161", "Code_162", "Code_163", "Code_164", "Code_165", "Code_166", "Code_167", "Code_168", "Code_169", "Code_170", "Code_171", "Code_172", "Code_173", "Code_174", "Code_175", "Code_176", "Code_177", "Code_178", "Code_179", "Code_180", "Code_181", "Code_182", "Code_183", "Code_184", "Code_185", "Code_186", "Code_187", "Code_188", "Code_189", "Code_190", "Code_191", "Code_192", "Code_193", "Code_194", "Code_195", "Code_196", "Code_197", "Code_198", "Code_199", "Code_200", "Code_201", "Code_202", "Code_203", "Code_204", "Code_205", "Code_206", "Code_207", "Code_208", "Code_209", "Code_210", "Code_211", "Code_212", "Code_213", "Code_214", "Code_215", "Code_216", "Code_217", "Code_218", "Code_219", "Code_220", "Code_221", "Code_222", "Code_223", "Code_224", "Code_225", "Code_226", "Code_227", "Code_228", "Code_229", "Code_230", "Code_231", "Code_232", "Code_233", "Code_234", "Code_235", "Code_236", "Code_237", "Code_238", "Code_239", "Code_240", "Code_241", "Code_242", "Code_243", "Code_244", "Code_245", "Code_246", "Code_247", "Code_248", "Code_249", "Code_250", "Code_251", "Code_252", "Code_253", "Refresh = 255", "RemoveCode = 256", "Count = 257", "RawValue = 258", "RawValueIndex = 259", }; 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_Version { enum _enumerated { Library = 0, Protocol = 1, Application = 2 }; _enumerated _value; ValueID_Index_Version(_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 = 3; static const int* _values() { static const int values[] = { (ignore_assign)Library = 0, (ignore_assign)Protocol = 1, (ignore_assign)Application = 2, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Library = 0", "Protocol = 1", "Application = 2", }; 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_WakeUp { enum _enumerated { Interval = 0, Min_Interval = 1, Max_Interval = 2, Default_Interval = 3, Interval_Step = 4 }; _enumerated _value; ValueID_Index_WakeUp(_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)Interval = 0, (ignore_assign)Min_Interval = 1, (ignore_assign)Max_Interval = 2, (ignore_assign)Default_Interval = 3, (ignore_assign)Interval_Step = 4, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Interval = 0", "Min_Interval = 1", "Max_Interval = 2", "Default_Interval = 3", "Interval_Step = 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_ZWavePlusInfo { enum _enumerated { Version = 0, InstallerIcon = 1, UserIcon = 2 }; _enumerated _value; ValueID_Index_ZWavePlusInfo(_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 = 3; static const int* _values() { static const int values[] = { (ignore_assign)Version = 0, (ignore_assign)InstallerIcon = 1, (ignore_assign)UserIcon = 2, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Version = 0", "InstallerIcon = 1", "UserIcon = 2", }; 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; } };; diff --git a/cpp/src/command_classes/CommandClass.cpp b/cpp/src/command_classes/CommandClass.cpp index e222d69d61..8f71b67d6f 100644 --- a/cpp/src/command_classes/CommandClass.cpp +++ b/cpp/src/command_classes/CommandClass.cpp @@ -597,11 +597,12 @@ namespace OpenZWave // // Add a value to a message as a sequence of bytes //----------------------------------------------------------------------------- - void CommandClass::AppendValue(Msg* _msg, std::string const& _value, uint8 const _scale) const + void CommandClass::AppendValue(Msg* _msg, std::string const& _value, uint8 const _scale, uint8 const _minsize) const { uint8 precision; uint8 size; int32 val = ValueToInteger(_value, &precision, &size); + if(size < _minsize) size = _minsize; _msg->Append((precision << c_precisionShift) | (_scale << c_scaleShift) | size); diff --git a/cpp/src/command_classes/CommandClass.h b/cpp/src/command_classes/CommandClass.h index 92b382691e..dd75ee9a9a 100644 --- a/cpp/src/command_classes/CommandClass.h +++ b/cpp/src/command_classes/CommandClass.h @@ -210,9 +210,10 @@ namespace OpenZWave * \param _msg The message to which the value should be appended. * \param _value A string containing a decimal number to be appended. * \param _scale A byte indicating the scale corresponding to this value (e.g., 1=F and 0=C for temperatures). + * \param _minsize Indicating the minimum size in bytes to pass the field value (default 0 to use the smallest size possible) * \see Msg */ - void AppendValue(Msg* _msg, string const& _value, uint8 const _scale) const; + void AppendValue(Msg* _msg, string const& _value, uint8 const _scale, uint8 const _minsize = 0) const; uint8 const GetAppendValueSize(string const& _value) const; int32 ValueToInteger(string const& _value, uint8* o_precision, uint8* o_size) const; diff --git a/cpp/src/command_classes/ThermostatSetpoint.cpp b/cpp/src/command_classes/ThermostatSetpoint.cpp index 9dde0ca533..34a6bc00b7 100644 --- a/cpp/src/command_classes/ThermostatSetpoint.cpp +++ b/cpp/src/command_classes/ThermostatSetpoint.cpp @@ -34,6 +34,7 @@ #include "platform/Log.h" #include "value_classes/ValueDecimal.h" +#include "value_classes/ValueByte.h" #include "tinyxml.h" @@ -241,14 +242,15 @@ namespace OpenZWave string minValue = ExtractValue(&_data[2], &scale, &precision); string maxValue = ExtractValue(&_data[2 + size + 1], &scale, &precision); - Log::Write(LogLevel_Info, GetNodeId(), "Received capabilities of thermostat setpoint type %d, min %s max %s", (int) _data[1], minValue.c_str(), maxValue.c_str()); + Log::Write(LogLevel_Info, GetNodeId(), "Received capabilities of thermostat setpoint type %d, min %s (field size: %i) max %s", (int) _data[1], minValue.c_str(), size, maxValue.c_str()); uint8 index = _data[1]; // Add supported setpoint if (index < ThermostatSetpoint_Count) { string setpointName = c_setpointName[index]; - + // Retain the size of the minimum temperature as the minimum field size for the temperature + node->CreateValueByte(ValueID::ValueGenre_User, GetCommandClassId(), _instance, ValueID_Index_ThermostatSetpoint::SetPointMinSize, setpointName + "_setpointminsize", "B", true, false, 0, 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()); @@ -270,6 +272,14 @@ namespace OpenZWave { Internal::VC::ValueDecimal const* value = static_cast(&_value); uint8 scale = strcmp("C", value->GetUnits().c_str()) ? 1 : 0; + int8 setpointminsize = 0; + uint8 _instance = 1; // FIXME where is the instance ID supposed to come from? + + if (Node* node = GetNodeUnsafe()) { + Internal::VC::Value const* _minsizeValue = node->GetValue(GetCommandClassId(), _instance, ValueID_Index_ThermostatSetpoint::SetPointMinSize); + Internal::VC::ValueByte const* minsizeValue = static_cast(_minsizeValue); + setpointminsize = minsizeValue->GetValue(); + } Msg* msg = new Msg("ThermostatSetpointCmd_Set", GetNodeId(), REQUEST, FUNC_ID_ZW_SEND_DATA, true); msg->SetInstance(this, _value.GetID().GetInstance()); @@ -278,7 +288,7 @@ namespace OpenZWave msg->Append(GetCommandClassId()); msg->Append(ThermostatSetpointCmd_Set); msg->Append((uint8_t) (value->GetID().GetIndex() & 0xFF)); - AppendValue(msg, value->GetValue(), scale); + AppendValue(msg, value->GetValue(), scale, setpointminsize); msg->Append(GetDriver()->GetTransmitOptions()); GetDriver()->SendMsg(msg, Driver::MsgQueue_Send); return true; From 2202abf8f2f24945c2f4c80357fdd1bcc07d1d33 Mon Sep 17 00:00:00 2001 From: Cyberwizzard Date: Mon, 2 Nov 2020 16:08:30 +0100 Subject: [PATCH 02/15] Update ThermostatSetpoint.cpp Added missing value for the CreateValueByte call to actually retain the size of the field --- cpp/src/command_classes/ThermostatSetpoint.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/src/command_classes/ThermostatSetpoint.cpp b/cpp/src/command_classes/ThermostatSetpoint.cpp index 34a6bc00b7..4e3653406a 100644 --- a/cpp/src/command_classes/ThermostatSetpoint.cpp +++ b/cpp/src/command_classes/ThermostatSetpoint.cpp @@ -250,7 +250,7 @@ namespace OpenZWave { string setpointName = c_setpointName[index]; // Retain the size of the minimum temperature as the minimum field size for the temperature - node->CreateValueByte(ValueID::ValueGenre_User, GetCommandClassId(), _instance, ValueID_Index_ThermostatSetpoint::SetPointMinSize, setpointName + "_setpointminsize", "B", true, false, 0, 0); + node->CreateValueByte(ValueID::ValueGenre_User, GetCommandClassId(), _instance, ValueID_Index_ThermostatSetpoint::SetPointMinSize, setpointName + "_setpointminsize", "B", true, false, size, 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()); From 99034702455600c38b2c721ad698e0dff90c51d7 Mon Sep 17 00:00:00 2001 From: Cyberwizzard Date: Mon, 2 Nov 2020 22:28:20 +0100 Subject: [PATCH 03/15] Update CommandClass.cpp Added precision override support --- cpp/src/command_classes/CommandClass.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cpp/src/command_classes/CommandClass.cpp b/cpp/src/command_classes/CommandClass.cpp index 8f71b67d6f..fbbde330a1 100644 --- a/cpp/src/command_classes/CommandClass.cpp +++ b/cpp/src/command_classes/CommandClass.cpp @@ -597,12 +597,20 @@ namespace OpenZWave // // Add a value to a message as a sequence of bytes //----------------------------------------------------------------------------- - void CommandClass::AppendValue(Msg* _msg, std::string const& _value, uint8 const _scale, uint8 const _minsize) const + void CommandClass::AppendValue(Msg* _msg, std::string const& _value, uint8 const _scale, uint8 const _minsize, uint8 const _minprecision) const { uint8 precision; uint8 size; int32 val = ValueToInteger(_value, &precision, &size); if(size < _minsize) size = _minsize; + if(precision < _minprecision) + { + Log::Write(LogLevel_Info, GetNodeId(), "Increasing precision on integer value %i, obtained from %s, from %i decimals to %i decimals", val, _value, precision, _minprecision); + int8 const delta = _minprecision - precision; + for(uint8 i=0; iAppend((precision << c_precisionShift) | (_scale << c_scaleShift) | size); From 5267692d7bb841b8766c5ffedafd8abb555b1a5f Mon Sep 17 00:00:00 2001 From: Cyberwizzard Date: Mon, 2 Nov 2020 22:30:59 +0100 Subject: [PATCH 04/15] Update CommandClass.h Augmented AppendValue to have a precision override --- cpp/src/command_classes/CommandClass.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpp/src/command_classes/CommandClass.h b/cpp/src/command_classes/CommandClass.h index dd75ee9a9a..20ba341612 100644 --- a/cpp/src/command_classes/CommandClass.h +++ b/cpp/src/command_classes/CommandClass.h @@ -211,9 +211,10 @@ namespace OpenZWave * \param _value A string containing a decimal number to be appended. * \param _scale A byte indicating the scale corresponding to this value (e.g., 1=F and 0=C for temperatures). * \param _minsize Indicating the minimum size in bytes to pass the field value (default 0 to use the smallest size possible) + * \param _minprecision Indicating the minimum precision for the value, if the computed precision is lower it will be increased to this number of decimals and the raw value will be adjusted to match (default 0 to leave at computed value) * \see Msg */ - void AppendValue(Msg* _msg, string const& _value, uint8 const _scale, uint8 const _minsize = 0) const; + void AppendValue(Msg* _msg, string const& _value, uint8 const _scale, uint8 const _minsize = 0, uint8 const _minprecision = 0) const; uint8 const GetAppendValueSize(string const& _value) const; int32 ValueToInteger(string const& _value, uint8* o_precision, uint8* o_size) const; From e2599785d25d37eb42196fdd4c1eb598f5f796dd Mon Sep 17 00:00:00 2001 From: Cyberwizzard Date: Mon, 2 Nov 2020 22:34:07 +0100 Subject: [PATCH 05/15] Update ThermostatSetpoint.cpp Apply cached setpoint precision setting to the setpoint command --- .../command_classes/ThermostatSetpoint.cpp | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/cpp/src/command_classes/ThermostatSetpoint.cpp b/cpp/src/command_classes/ThermostatSetpoint.cpp index 4e3653406a..8cc36f0355 100644 --- a/cpp/src/command_classes/ThermostatSetpoint.cpp +++ b/cpp/src/command_classes/ThermostatSetpoint.cpp @@ -237,20 +237,22 @@ namespace OpenZWave { // We have received the capabilities for supported setpoint Type uint8 scale; - uint8 precision = 0; + uint8 min_precision = 0; + uint8 max_precision = 0; uint8 size = _data[2] & 0x07; - string minValue = ExtractValue(&_data[2], &scale, &precision); - string maxValue = ExtractValue(&_data[2 + size + 1], &scale, &precision); + string minValue = ExtractValue(&_data[2], &scale, &min_precision); + string maxValue = ExtractValue(&_data[2 + size + 1], &scale, &max_precision); - Log::Write(LogLevel_Info, GetNodeId(), "Received capabilities of thermostat setpoint type %d, min %s (field size: %i) max %s", (int) _data[1], minValue.c_str(), size, maxValue.c_str()); + Log::Write(LogLevel_Info, GetNodeId(), "Received capabilities of thermostat setpoint type %d, min %s (field size: %i bytes, precision: %i decimals) max %s", (int) _data[1], minValue.c_str(), size, min_precision, maxValue.c_str()); uint8 index = _data[1]; // Add supported setpoint if (index < ThermostatSetpoint_Count) { string setpointName = c_setpointName[index]; - // Retain the size of the minimum temperature as the minimum field size for the temperature - node->CreateValueByte(ValueID::ValueGenre_User, GetCommandClassId(), _instance, ValueID_Index_ThermostatSetpoint::SetPointMinSize, setpointName + "_setpointminsize", "B", true, false, size, 0); + // Retain the size of the minimum temperature as the minimum field size for the temperature and the minimum precision as the base precision for future communication + node->CreateValueByte(ValueID::ValueGenre_User, GetCommandClassId(), _instance, ValueID_Index_ThermostatSetpoint::SetPointMinSize, setpointName + "_setpointminsize", "B", false, false, size, 0); + node->CreateValueByte(ValueID::ValueGenre_User, GetCommandClassId(), _instance, ValueID_Index_ThermostatSetpoint::SetPointPrecision, setpointName + "_setpointprecision", "D", false, false, min_precision, 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()); @@ -272,13 +274,17 @@ namespace OpenZWave { Internal::VC::ValueDecimal const* value = static_cast(&_value); uint8 scale = strcmp("C", value->GetUnits().c_str()) ? 1 : 0; - int8 setpointminsize = 0; + int8 setpointminsize = 0; // Minimum number of bytes to express the setpoint value, cached from the capabilities report + int8 setpointprecision = 0; // Minimum precision express the setpoint value, cached from the capabilities report uint8 _instance = 1; // FIXME where is the instance ID supposed to come from? if (Node* node = GetNodeUnsafe()) { Internal::VC::Value const* _minsizeValue = node->GetValue(GetCommandClassId(), _instance, ValueID_Index_ThermostatSetpoint::SetPointMinSize); + Internal::VC::Value const* _precisionValue = node->GetValue(GetCommandClassId(), _instance, ValueID_Index_ThermostatSetpoint::SetPointPrecision); Internal::VC::ValueByte const* minsizeValue = static_cast(_minsizeValue); + Internal::VC::ValueByte const* precisionValue = static_cast(_precisionValue); setpointminsize = minsizeValue->GetValue(); + setpointprecision = precisionValue->GetValue(); } Msg* msg = new Msg("ThermostatSetpointCmd_Set", GetNodeId(), REQUEST, FUNC_ID_ZW_SEND_DATA, true); @@ -288,7 +294,7 @@ namespace OpenZWave msg->Append(GetCommandClassId()); msg->Append(ThermostatSetpointCmd_Set); msg->Append((uint8_t) (value->GetID().GetIndex() & 0xFF)); - AppendValue(msg, value->GetValue(), scale, setpointminsize); + AppendValue(msg, value->GetValue(), scale, setpointminsize, setpointprecision); msg->Append(GetDriver()->GetTransmitOptions()); GetDriver()->SendMsg(msg, Driver::MsgQueue_Send); return true; From 07ec3f22717a94a8cd2f17acfba661da303a81c5 Mon Sep 17 00:00:00 2001 From: Cyberwizzard Date: Mon, 2 Nov 2020 22:36:30 +0100 Subject: [PATCH 06/15] Update ValueIDIndexesDefines.def Added SetPointPrecision type to the thermostat enum to hold the minimum precision required by the thermostat --- cpp/src/ValueIDIndexesDefines.def | 1 + 1 file changed, 1 insertion(+) diff --git a/cpp/src/ValueIDIndexesDefines.def b/cpp/src/ValueIDIndexesDefines.def index 37c3897cdc..c6b734cef4 100644 --- a/cpp/src/ValueIDIndexesDefines.def +++ b/cpp/src/ValueIDIndexesDefines.def @@ -3167,6 +3167,7 @@ ENUM(ValueID_Index_ThermostatSetpoint, AwayHeating, CoolingHeating, SetPointMinSize, + SetPointPrecision, Unused_0_Minimum = 100, Heating_Minimum, Cooling_Minimum, From 4cdcc0d7e8df6600228ddebe013445c88ff10240 Mon Sep 17 00:00:00 2001 From: Cyberwizzard Date: Mon, 2 Nov 2020 22:55:48 +0100 Subject: [PATCH 07/15] Updated generated defines --- cpp/src/ValueIDIndexesDefines.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/src/ValueIDIndexesDefines.h b/cpp/src/ValueIDIndexesDefines.h index 876a56dea9..dd3cc006c4 100644 --- a/cpp/src/ValueIDIndexesDefines.h +++ b/cpp/src/ValueIDIndexesDefines.h @@ -44,7 +44,7 @@ struct ValueID_Index_ThermostatFanMode { enum _enumerated { FanMode = 0 }; _enum struct ValueID_Index_ThermostatFanState { enum _enumerated { FanState = 0 }; _enumerated _value; ValueID_Index_ThermostatFanState(_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 = 1; static const int* _values() { static const int values[] = { (ignore_assign)FanState = 0, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "FanState = 0", }; 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_ThermostatMode { enum _enumerated { Mode = 0 }; _enumerated _value; ValueID_Index_ThermostatMode(_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 = 1; static const int* _values() { static const int values[] = { (ignore_assign)Mode = 0, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Mode = 0", }; 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_ThermostatOperatingState { enum _enumerated { OperatingState = 0 }; _enumerated _value; ValueID_Index_ThermostatOperatingState(_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 = 1; static const int* _values() { static const int values[] = { (ignore_assign)OperatingState = 0, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "OperatingState = 0", }; 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_ThermostatSetpoint { enum _enumerated { Unused_0 = 0, Heating, Cooling, Unused_3, Unused_4, Unused_5, Unused_6, Furnace, DryAir, MoistAir, AutoChangeover, HeatingEcon, CoolingEcon, AwayHeating, CoolingHeating, SetPointMinSize, Unused_0_Minimum = 100, Heating_Minimum, Cooling_Minimum, Unused_3_Minimum, Unused_4_Minimum, Unused_5_Minimum, Unused_6_Minimum, Furnace_Minimum, DryAir_Minimum, MoistAir_Minimum, AutoChangeOver_Minimum, Heating_Econ_Minimum, Cooling_Econ_Minimum, Away_Heating_Minimum, Cooling_Heating_Minimum, Unused_0_Maximum = 200, Heating_Maximum, Cooling_Maximum, Unused_3_Maximum, Unused_4_Maximum, Unused_5_Maximum, Unused_6_Maximum, Furnace_Maximum, DryAir_Maximum, MoistAir_Maximum, AutoChangeOver_Maximum, Heating_Econ_Maximum, Cooling_Econ_Maximum, Away_Heating_Maximum, Cooling_Heating_Maximum }; _enumerated _value; ValueID_Index_ThermostatSetpoint(_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 = 46; static const int* _values() { static const int values[] = { (ignore_assign)Unused_0 = 0, (ignore_assign)Heating, (ignore_assign)Cooling, (ignore_assign)Unused_3, (ignore_assign)Unused_4, (ignore_assign)Unused_5, (ignore_assign)Unused_6, (ignore_assign)Furnace, (ignore_assign)DryAir, (ignore_assign)MoistAir, (ignore_assign)AutoChangeover, (ignore_assign)HeatingEcon, (ignore_assign)CoolingEcon, (ignore_assign)AwayHeating, (ignore_assign)CoolingHeating, (ignore_assign)SetPointMinSize, (ignore_assign)Unused_0_Minimum = 100, (ignore_assign)Heating_Minimum, (ignore_assign)Cooling_Minimum, (ignore_assign)Unused_3_Minimum, (ignore_assign)Unused_4_Minimum, (ignore_assign)Unused_5_Minimum, (ignore_assign)Unused_6_Minimum, (ignore_assign)Furnace_Minimum, (ignore_assign)DryAir_Minimum, (ignore_assign)MoistAir_Minimum, (ignore_assign)AutoChangeOver_Minimum, (ignore_assign)Heating_Econ_Minimum, (ignore_assign)Cooling_Econ_Minimum, (ignore_assign)Away_Heating_Minimum, (ignore_assign)Cooling_Heating_Minimum, (ignore_assign)Unused_0_Maximum = 200, (ignore_assign)Heating_Maximum, (ignore_assign)Cooling_Maximum, (ignore_assign)Unused_3_Maximum, (ignore_assign)Unused_4_Maximum, (ignore_assign)Unused_5_Maximum, (ignore_assign)Unused_6_Maximum, (ignore_assign)Furnace_Maximum, (ignore_assign)DryAir_Maximum, (ignore_assign)MoistAir_Maximum, (ignore_assign)AutoChangeOver_Maximum, (ignore_assign)Heating_Econ_Maximum, (ignore_assign)Cooling_Econ_Maximum, (ignore_assign)Away_Heating_Maximum, (ignore_assign)Cooling_Heating_Maximum, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Unused_0 = 0", "Heating", "Cooling", "Unused_3", "Unused_4", "Unused_5", "Unused_6", "Furnace", "DryAir", "MoistAir", "AutoChangeover", "HeatingEcon", "CoolingEcon", "AwayHeating", "CoolingHeating", "SetPointMinSize", "Unused_0_Minimum = 100", "Heating_Minimum", "Cooling_Minimum", "Unused_3_Minimum", "Unused_4_Minimum", "Unused_5_Minimum", "Unused_6_Minimum", "Furnace_Minimum", "DryAir_Minimum", "MoistAir_Minimum", "AutoChangeOver_Minimum", "Heating_Econ_Minimum", "Cooling_Econ_Minimum", "Away_Heating_Minimum", "Cooling_Heating_Minimum", "Unused_0_Maximum = 200", "Heating_Maximum", "Cooling_Maximum", "Unused_3_Maximum", "Unused_4_Maximum", "Unused_5_Maximum", "Unused_6_Maximum", "Furnace_Maximum", "DryAir_Maximum", "MoistAir_Maximum", "AutoChangeOver_Maximum", "Heating_Econ_Maximum", "Cooling_Econ_Maximum", "Away_Heating_Maximum", "Cooling_Heating_Maximum", }; 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_ThermostatSetpoint { enum _enumerated { Unused_0 = 0, Heating, Cooling, Unused_3, Unused_4, Unused_5, Unused_6, Furnace, DryAir, MoistAir, AutoChangeover, HeatingEcon, CoolingEcon, AwayHeating, CoolingHeating, SetPointMinSize, SetPointPrecision, Unused_0_Minimum = 100, Heating_Minimum, Cooling_Minimum, Unused_3_Minimum, Unused_4_Minimum, Unused_5_Minimum, Unused_6_Minimum, Furnace_Minimum, DryAir_Minimum, MoistAir_Minimum, AutoChangeOver_Minimum, Heating_Econ_Minimum, Cooling_Econ_Minimum, Away_Heating_Minimum, Cooling_Heating_Minimum, Unused_0_Maximum = 200, Heating_Maximum, Cooling_Maximum, Unused_3_Maximum, Unused_4_Maximum, Unused_5_Maximum, Unused_6_Maximum, Furnace_Maximum, DryAir_Maximum, MoistAir_Maximum, AutoChangeOver_Maximum, Heating_Econ_Maximum, Cooling_Econ_Maximum, Away_Heating_Maximum, Cooling_Heating_Maximum }; _enumerated _value; ValueID_Index_ThermostatSetpoint(_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 = 47; static const int* _values() { static const int values[] = { (ignore_assign)Unused_0 = 0, (ignore_assign)Heating, (ignore_assign)Cooling, (ignore_assign)Unused_3, (ignore_assign)Unused_4, (ignore_assign)Unused_5, (ignore_assign)Unused_6, (ignore_assign)Furnace, (ignore_assign)DryAir, (ignore_assign)MoistAir, (ignore_assign)AutoChangeover, (ignore_assign)HeatingEcon, (ignore_assign)CoolingEcon, (ignore_assign)AwayHeating, (ignore_assign)CoolingHeating, (ignore_assign)SetPointMinSize, (ignore_assign)SetPointPrecision, (ignore_assign)Unused_0_Minimum = 100, (ignore_assign)Heating_Minimum, (ignore_assign)Cooling_Minimum, (ignore_assign)Unused_3_Minimum, (ignore_assign)Unused_4_Minimum, (ignore_assign)Unused_5_Minimum, (ignore_assign)Unused_6_Minimum, (ignore_assign)Furnace_Minimum, (ignore_assign)DryAir_Minimum, (ignore_assign)MoistAir_Minimum, (ignore_assign)AutoChangeOver_Minimum, (ignore_assign)Heating_Econ_Minimum, (ignore_assign)Cooling_Econ_Minimum, (ignore_assign)Away_Heating_Minimum, (ignore_assign)Cooling_Heating_Minimum, (ignore_assign)Unused_0_Maximum = 200, (ignore_assign)Heating_Maximum, (ignore_assign)Cooling_Maximum, (ignore_assign)Unused_3_Maximum, (ignore_assign)Unused_4_Maximum, (ignore_assign)Unused_5_Maximum, (ignore_assign)Unused_6_Maximum, (ignore_assign)Furnace_Maximum, (ignore_assign)DryAir_Maximum, (ignore_assign)MoistAir_Maximum, (ignore_assign)AutoChangeOver_Maximum, (ignore_assign)Heating_Econ_Maximum, (ignore_assign)Cooling_Econ_Maximum, (ignore_assign)Away_Heating_Maximum, (ignore_assign)Cooling_Heating_Maximum, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Unused_0 = 0", "Heating", "Cooling", "Unused_3", "Unused_4", "Unused_5", "Unused_6", "Furnace", "DryAir", "MoistAir", "AutoChangeover", "HeatingEcon", "CoolingEcon", "AwayHeating", "CoolingHeating", "SetPointMinSize", "SetPointPrecision", "Unused_0_Minimum = 100", "Heating_Minimum", "Cooling_Minimum", "Unused_3_Minimum", "Unused_4_Minimum", "Unused_5_Minimum", "Unused_6_Minimum", "Furnace_Minimum", "DryAir_Minimum", "MoistAir_Minimum", "AutoChangeOver_Minimum", "Heating_Econ_Minimum", "Cooling_Econ_Minimum", "Away_Heating_Minimum", "Cooling_Heating_Minimum", "Unused_0_Maximum = 200", "Heating_Maximum", "Cooling_Maximum", "Unused_3_Maximum", "Unused_4_Maximum", "Unused_5_Maximum", "Unused_6_Maximum", "Furnace_Maximum", "DryAir_Maximum", "MoistAir_Maximum", "AutoChangeOver_Maximum", "Heating_Econ_Maximum", "Cooling_Econ_Maximum", "Away_Heating_Maximum", "Cooling_Heating_Maximum", }; 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_TimeParameters { enum _enumerated { Date = 0, Time = 1, Set = 2, Refresh = 3 }; _enumerated _value; ValueID_Index_TimeParameters(_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)Date = 0, (ignore_assign)Time = 1, (ignore_assign)Set = 2, (ignore_assign)Refresh = 3, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Date = 0", "Time = 1", "Set = 2", "Refresh = 3", }; 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_UserCode { enum _enumerated { Enrollment_Code = 0, Code_1, Code_2, Code_3, Code_4, Code_5, Code_6, Code_7, Code_8, Code_9, Code_10, Code_11, Code_12, Code_13, Code_14, Code_15, Code_16, Code_17, Code_18, Code_19, Code_20, Code_21, Code_22, Code_23, Code_24, Code_25, Code_26, Code_27, Code_28, Code_29, Code_30, Code_31, Code_32, Code_33, Code_34, Code_35, Code_36, Code_37, Code_38, Code_39, Code_40, Code_41, Code_42, Code_43, Code_44, Code_45, Code_46, Code_47, Code_48, Code_49, Code_50, Code_51, Code_52, Code_53, Code_54, Code_55, Code_56, Code_57, Code_58, Code_59, Code_60, Code_61, Code_62, Code_63, Code_64, Code_65, Code_66, Code_67, Code_68, Code_69, Code_70, Code_71, Code_72, Code_73, Code_74, Code_75, Code_76, Code_77, Code_78, Code_79, Code_80, Code_81, Code_82, Code_83, Code_84, Code_85, Code_86, Code_87, Code_88, Code_89, Code_90, Code_91, Code_92, Code_93, Code_94, Code_95, Code_96, Code_97, Code_98, Code_99, Code_100, Code_101, Code_102, Code_103, Code_104, Code_105, Code_106, Code_107, Code_108, Code_109, Code_110, Code_111, Code_112, Code_113, Code_114, Code_115, Code_116, Code_117, Code_118, Code_119, Code_120, Code_121, Code_122, Code_123, Code_124, Code_125, Code_126, Code_127, Code_128, Code_129, Code_130, Code_131, Code_132, Code_133, Code_134, Code_135, Code_136, Code_137, Code_138, Code_139, Code_140, Code_141, Code_142, Code_143, Code_144, Code_145, Code_146, Code_147, Code_148, Code_149, Code_150, Code_151, Code_152, Code_153, Code_154, Code_155, Code_156, Code_157, Code_158, Code_159, Code_160, Code_161, Code_162, Code_163, Code_164, Code_165, Code_166, Code_167, Code_168, Code_169, Code_170, Code_171, Code_172, Code_173, Code_174, Code_175, Code_176, Code_177, Code_178, Code_179, Code_180, Code_181, Code_182, Code_183, Code_184, Code_185, Code_186, Code_187, Code_188, Code_189, Code_190, Code_191, Code_192, Code_193, Code_194, Code_195, Code_196, Code_197, Code_198, Code_199, Code_200, Code_201, Code_202, Code_203, Code_204, Code_205, Code_206, Code_207, Code_208, Code_209, Code_210, Code_211, Code_212, Code_213, Code_214, Code_215, Code_216, Code_217, Code_218, Code_219, Code_220, Code_221, Code_222, Code_223, Code_224, Code_225, Code_226, Code_227, Code_228, Code_229, Code_230, Code_231, Code_232, Code_233, Code_234, Code_235, Code_236, Code_237, Code_238, Code_239, Code_240, Code_241, Code_242, Code_243, Code_244, Code_245, Code_246, Code_247, Code_248, Code_249, Code_250, Code_251, Code_252, Code_253, Refresh = 255, RemoveCode = 256, Count = 257, RawValue = 258, RawValueIndex = 259 }; _enumerated _value; ValueID_Index_UserCode(_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 = 259; static const int* _values() { static const int values[] = { (ignore_assign)Enrollment_Code = 0, (ignore_assign)Code_1, (ignore_assign)Code_2, (ignore_assign)Code_3, (ignore_assign)Code_4, (ignore_assign)Code_5, (ignore_assign)Code_6, (ignore_assign)Code_7, (ignore_assign)Code_8, (ignore_assign)Code_9, (ignore_assign)Code_10, (ignore_assign)Code_11, (ignore_assign)Code_12, (ignore_assign)Code_13, (ignore_assign)Code_14, (ignore_assign)Code_15, (ignore_assign)Code_16, (ignore_assign)Code_17, (ignore_assign)Code_18, (ignore_assign)Code_19, (ignore_assign)Code_20, (ignore_assign)Code_21, (ignore_assign)Code_22, (ignore_assign)Code_23, (ignore_assign)Code_24, (ignore_assign)Code_25, (ignore_assign)Code_26, (ignore_assign)Code_27, (ignore_assign)Code_28, (ignore_assign)Code_29, (ignore_assign)Code_30, (ignore_assign)Code_31, (ignore_assign)Code_32, (ignore_assign)Code_33, (ignore_assign)Code_34, (ignore_assign)Code_35, (ignore_assign)Code_36, (ignore_assign)Code_37, (ignore_assign)Code_38, (ignore_assign)Code_39, (ignore_assign)Code_40, (ignore_assign)Code_41, (ignore_assign)Code_42, (ignore_assign)Code_43, (ignore_assign)Code_44, (ignore_assign)Code_45, (ignore_assign)Code_46, (ignore_assign)Code_47, (ignore_assign)Code_48, (ignore_assign)Code_49, (ignore_assign)Code_50, (ignore_assign)Code_51, (ignore_assign)Code_52, (ignore_assign)Code_53, (ignore_assign)Code_54, (ignore_assign)Code_55, (ignore_assign)Code_56, (ignore_assign)Code_57, (ignore_assign)Code_58, (ignore_assign)Code_59, (ignore_assign)Code_60, (ignore_assign)Code_61, (ignore_assign)Code_62, (ignore_assign)Code_63, (ignore_assign)Code_64, (ignore_assign)Code_65, (ignore_assign)Code_66, (ignore_assign)Code_67, (ignore_assign)Code_68, (ignore_assign)Code_69, (ignore_assign)Code_70, (ignore_assign)Code_71, (ignore_assign)Code_72, (ignore_assign)Code_73, (ignore_assign)Code_74, (ignore_assign)Code_75, (ignore_assign)Code_76, (ignore_assign)Code_77, (ignore_assign)Code_78, (ignore_assign)Code_79, (ignore_assign)Code_80, (ignore_assign)Code_81, (ignore_assign)Code_82, (ignore_assign)Code_83, (ignore_assign)Code_84, (ignore_assign)Code_85, (ignore_assign)Code_86, (ignore_assign)Code_87, (ignore_assign)Code_88, (ignore_assign)Code_89, (ignore_assign)Code_90, (ignore_assign)Code_91, (ignore_assign)Code_92, (ignore_assign)Code_93, (ignore_assign)Code_94, (ignore_assign)Code_95, (ignore_assign)Code_96, (ignore_assign)Code_97, (ignore_assign)Code_98, (ignore_assign)Code_99, (ignore_assign)Code_100, (ignore_assign)Code_101, (ignore_assign)Code_102, (ignore_assign)Code_103, (ignore_assign)Code_104, (ignore_assign)Code_105, (ignore_assign)Code_106, (ignore_assign)Code_107, (ignore_assign)Code_108, (ignore_assign)Code_109, (ignore_assign)Code_110, (ignore_assign)Code_111, (ignore_assign)Code_112, (ignore_assign)Code_113, (ignore_assign)Code_114, (ignore_assign)Code_115, (ignore_assign)Code_116, (ignore_assign)Code_117, (ignore_assign)Code_118, (ignore_assign)Code_119, (ignore_assign)Code_120, (ignore_assign)Code_121, (ignore_assign)Code_122, (ignore_assign)Code_123, (ignore_assign)Code_124, (ignore_assign)Code_125, (ignore_assign)Code_126, (ignore_assign)Code_127, (ignore_assign)Code_128, (ignore_assign)Code_129, (ignore_assign)Code_130, (ignore_assign)Code_131, (ignore_assign)Code_132, (ignore_assign)Code_133, (ignore_assign)Code_134, (ignore_assign)Code_135, (ignore_assign)Code_136, (ignore_assign)Code_137, (ignore_assign)Code_138, (ignore_assign)Code_139, (ignore_assign)Code_140, (ignore_assign)Code_141, (ignore_assign)Code_142, (ignore_assign)Code_143, (ignore_assign)Code_144, (ignore_assign)Code_145, (ignore_assign)Code_146, (ignore_assign)Code_147, (ignore_assign)Code_148, (ignore_assign)Code_149, (ignore_assign)Code_150, (ignore_assign)Code_151, (ignore_assign)Code_152, (ignore_assign)Code_153, (ignore_assign)Code_154, (ignore_assign)Code_155, (ignore_assign)Code_156, (ignore_assign)Code_157, (ignore_assign)Code_158, (ignore_assign)Code_159, (ignore_assign)Code_160, (ignore_assign)Code_161, (ignore_assign)Code_162, (ignore_assign)Code_163, (ignore_assign)Code_164, (ignore_assign)Code_165, (ignore_assign)Code_166, (ignore_assign)Code_167, (ignore_assign)Code_168, (ignore_assign)Code_169, (ignore_assign)Code_170, (ignore_assign)Code_171, (ignore_assign)Code_172, (ignore_assign)Code_173, (ignore_assign)Code_174, (ignore_assign)Code_175, (ignore_assign)Code_176, (ignore_assign)Code_177, (ignore_assign)Code_178, (ignore_assign)Code_179, (ignore_assign)Code_180, (ignore_assign)Code_181, (ignore_assign)Code_182, (ignore_assign)Code_183, (ignore_assign)Code_184, (ignore_assign)Code_185, (ignore_assign)Code_186, (ignore_assign)Code_187, (ignore_assign)Code_188, (ignore_assign)Code_189, (ignore_assign)Code_190, (ignore_assign)Code_191, (ignore_assign)Code_192, (ignore_assign)Code_193, (ignore_assign)Code_194, (ignore_assign)Code_195, (ignore_assign)Code_196, (ignore_assign)Code_197, (ignore_assign)Code_198, (ignore_assign)Code_199, (ignore_assign)Code_200, (ignore_assign)Code_201, (ignore_assign)Code_202, (ignore_assign)Code_203, (ignore_assign)Code_204, (ignore_assign)Code_205, (ignore_assign)Code_206, (ignore_assign)Code_207, (ignore_assign)Code_208, (ignore_assign)Code_209, (ignore_assign)Code_210, (ignore_assign)Code_211, (ignore_assign)Code_212, (ignore_assign)Code_213, (ignore_assign)Code_214, (ignore_assign)Code_215, (ignore_assign)Code_216, (ignore_assign)Code_217, (ignore_assign)Code_218, (ignore_assign)Code_219, (ignore_assign)Code_220, (ignore_assign)Code_221, (ignore_assign)Code_222, (ignore_assign)Code_223, (ignore_assign)Code_224, (ignore_assign)Code_225, (ignore_assign)Code_226, (ignore_assign)Code_227, (ignore_assign)Code_228, (ignore_assign)Code_229, (ignore_assign)Code_230, (ignore_assign)Code_231, (ignore_assign)Code_232, (ignore_assign)Code_233, (ignore_assign)Code_234, (ignore_assign)Code_235, (ignore_assign)Code_236, (ignore_assign)Code_237, (ignore_assign)Code_238, (ignore_assign)Code_239, (ignore_assign)Code_240, (ignore_assign)Code_241, (ignore_assign)Code_242, (ignore_assign)Code_243, (ignore_assign)Code_244, (ignore_assign)Code_245, (ignore_assign)Code_246, (ignore_assign)Code_247, (ignore_assign)Code_248, (ignore_assign)Code_249, (ignore_assign)Code_250, (ignore_assign)Code_251, (ignore_assign)Code_252, (ignore_assign)Code_253, (ignore_assign)Refresh = 255, (ignore_assign)RemoveCode = 256, (ignore_assign)Count = 257, (ignore_assign)RawValue = 258, (ignore_assign)RawValueIndex = 259, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Enrollment_Code = 0", "Code_1", "Code_2", "Code_3", "Code_4", "Code_5", "Code_6", "Code_7", "Code_8", "Code_9", "Code_10", "Code_11", "Code_12", "Code_13", "Code_14", "Code_15", "Code_16", "Code_17", "Code_18", "Code_19", "Code_20", "Code_21", "Code_22", "Code_23", "Code_24", "Code_25", "Code_26", "Code_27", "Code_28", "Code_29", "Code_30", "Code_31", "Code_32", "Code_33", "Code_34", "Code_35", "Code_36", "Code_37", "Code_38", "Code_39", "Code_40", "Code_41", "Code_42", "Code_43", "Code_44", "Code_45", "Code_46", "Code_47", "Code_48", "Code_49", "Code_50", "Code_51", "Code_52", "Code_53", "Code_54", "Code_55", "Code_56", "Code_57", "Code_58", "Code_59", "Code_60", "Code_61", "Code_62", "Code_63", "Code_64", "Code_65", "Code_66", "Code_67", "Code_68", "Code_69", "Code_70", "Code_71", "Code_72", "Code_73", "Code_74", "Code_75", "Code_76", "Code_77", "Code_78", "Code_79", "Code_80", "Code_81", "Code_82", "Code_83", "Code_84", "Code_85", "Code_86", "Code_87", "Code_88", "Code_89", "Code_90", "Code_91", "Code_92", "Code_93", "Code_94", "Code_95", "Code_96", "Code_97", "Code_98", "Code_99", "Code_100", "Code_101", "Code_102", "Code_103", "Code_104", "Code_105", "Code_106", "Code_107", "Code_108", "Code_109", "Code_110", "Code_111", "Code_112", "Code_113", "Code_114", "Code_115", "Code_116", "Code_117", "Code_118", "Code_119", "Code_120", "Code_121", "Code_122", "Code_123", "Code_124", "Code_125", "Code_126", "Code_127", "Code_128", "Code_129", "Code_130", "Code_131", "Code_132", "Code_133", "Code_134", "Code_135", "Code_136", "Code_137", "Code_138", "Code_139", "Code_140", "Code_141", "Code_142", "Code_143", "Code_144", "Code_145", "Code_146", "Code_147", "Code_148", "Code_149", "Code_150", "Code_151", "Code_152", "Code_153", "Code_154", "Code_155", "Code_156", "Code_157", "Code_158", "Code_159", "Code_160", "Code_161", "Code_162", "Code_163", "Code_164", "Code_165", "Code_166", "Code_167", "Code_168", "Code_169", "Code_170", "Code_171", "Code_172", "Code_173", "Code_174", "Code_175", "Code_176", "Code_177", "Code_178", "Code_179", "Code_180", "Code_181", "Code_182", "Code_183", "Code_184", "Code_185", "Code_186", "Code_187", "Code_188", "Code_189", "Code_190", "Code_191", "Code_192", "Code_193", "Code_194", "Code_195", "Code_196", "Code_197", "Code_198", "Code_199", "Code_200", "Code_201", "Code_202", "Code_203", "Code_204", "Code_205", "Code_206", "Code_207", "Code_208", "Code_209", "Code_210", "Code_211", "Code_212", "Code_213", "Code_214", "Code_215", "Code_216", "Code_217", "Code_218", "Code_219", "Code_220", "Code_221", "Code_222", "Code_223", "Code_224", "Code_225", "Code_226", "Code_227", "Code_228", "Code_229", "Code_230", "Code_231", "Code_232", "Code_233", "Code_234", "Code_235", "Code_236", "Code_237", "Code_238", "Code_239", "Code_240", "Code_241", "Code_242", "Code_243", "Code_244", "Code_245", "Code_246", "Code_247", "Code_248", "Code_249", "Code_250", "Code_251", "Code_252", "Code_253", "Refresh = 255", "RemoveCode = 256", "Count = 257", "RawValue = 258", "RawValueIndex = 259", }; 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_Version { enum _enumerated { Library = 0, Protocol = 1, Application = 2 }; _enumerated _value; ValueID_Index_Version(_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 = 3; static const int* _values() { static const int values[] = { (ignore_assign)Library = 0, (ignore_assign)Protocol = 1, (ignore_assign)Application = 2, }; return values; } static const char* const* _names() { static const char* const raw_names[] = { "Library = 0", "Protocol = 1", "Application = 2", }; 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; } };; From 75c7f7529759ebc46065e82a960384e14b2ad450 Mon Sep 17 00:00:00 2001 From: Cyberwizzard Date: Sun, 8 Nov 2020 13:58:47 +0100 Subject: [PATCH 08/15] Moved minsize and minprecision into ValueToInteger as its cleaner and reworked GetAppendValueSize --- cpp/src/command_classes/CommandClass.cpp | 33 +++++++++++-------- cpp/src/command_classes/CommandClass.h | 4 +-- .../command_classes/ThermostatSetpoint.cpp | 4 +-- 3 files changed, 24 insertions(+), 17 deletions(-) diff --git a/cpp/src/command_classes/CommandClass.cpp b/cpp/src/command_classes/CommandClass.cpp index fbbde330a1..2fe892726c 100644 --- a/cpp/src/command_classes/CommandClass.cpp +++ b/cpp/src/command_classes/CommandClass.cpp @@ -601,16 +601,17 @@ namespace OpenZWave { uint8 precision; uint8 size; - int32 val = ValueToInteger(_value, &precision, &size); - if(size < _minsize) size = _minsize; - if(precision < _minprecision) - { - Log::Write(LogLevel_Info, GetNodeId(), "Increasing precision on integer value %i, obtained from %s, from %i decimals to %i decimals", val, _value, precision, _minprecision); - int8 const delta = _minprecision - precision; - for(uint8 i=0; iAppend((precision << c_precisionShift) | (_scale << c_scaleShift) | size); @@ -625,10 +626,10 @@ namespace OpenZWave // // Get the number of bytes that would be added by a call to AppendValue //----------------------------------------------------------------------------- - uint8 const CommandClass::GetAppendValueSize(std::string const& _value) const + uint8 const CommandClass::GetAppendValueSize(std::string const& _value, uint8 const _minsize, uint8 const _minprecision ) const { uint8 size; - ValueToInteger(_value, NULL, &size); + ValueToInteger(_value, NULL, &size, _minsize, _minprecision); return size; } @@ -636,8 +637,9 @@ namespace OpenZWave // // Convert a decimal string to an integer and report the precision and // number of bytes required to store the value. +// If a minimum byte size or precisions is given, ensure the returned integer is using at least that precision and the reported o_size is at least _minsize //----------------------------------------------------------------------------- - int32 CommandClass::ValueToInteger(std::string const& _value, uint8* o_precision, uint8* o_size) const + int32 CommandClass::ValueToInteger(std::string const& _value, uint8* o_precision, uint8* o_size, uint8 const _minsize, uint8 const _minprecision) const { int32 val; uint8 precision; @@ -665,6 +667,7 @@ namespace OpenZWave } uint8_t orp = m_com.GetFlagByte(COMPAT_FLAG_OVERRIDEPRECISION); + if (orp == 0 && _minprecision > 0) orp = _minprecision; // Only if no override is given and a valid _minprecision is used, force the precision to _minprecision if (orp > 0) { while (precision < orp) @@ -703,8 +706,12 @@ namespace OpenZWave *o_size = 2; } } + + if(*o_size < _minsize && (_minsize == 1 || _minsize == 2 || _minsize == 4)) + *o_size = _minsize; } + return val; } diff --git a/cpp/src/command_classes/CommandClass.h b/cpp/src/command_classes/CommandClass.h index 20ba341612..bee6d600ff 100644 --- a/cpp/src/command_classes/CommandClass.h +++ b/cpp/src/command_classes/CommandClass.h @@ -215,8 +215,8 @@ namespace OpenZWave * \see Msg */ void AppendValue(Msg* _msg, string const& _value, uint8 const _scale, uint8 const _minsize = 0, uint8 const _minprecision = 0) const; - uint8 const GetAppendValueSize(string const& _value) const; - int32 ValueToInteger(string const& _value, uint8* o_precision, uint8* o_size) const; + uint8 const GetAppendValueSize(string const& _value, uint8 const _minsize = 0, uint8 const _minprecision = 0) const; + int32 ValueToInteger(string const& _value, uint8* o_precision, uint8* o_size, uint8 const _minsize = 0, uint8 const _minprecision = 0) const; void UpdateMappedClass(uint8 const _instance, uint8 const _classId, uint8 const _value); // Update mapped class's value from BASIC class diff --git a/cpp/src/command_classes/ThermostatSetpoint.cpp b/cpp/src/command_classes/ThermostatSetpoint.cpp index 8cc36f0355..2a81136ec8 100644 --- a/cpp/src/command_classes/ThermostatSetpoint.cpp +++ b/cpp/src/command_classes/ThermostatSetpoint.cpp @@ -243,7 +243,7 @@ namespace OpenZWave string minValue = ExtractValue(&_data[2], &scale, &min_precision); string maxValue = ExtractValue(&_data[2 + size + 1], &scale, &max_precision); - Log::Write(LogLevel_Info, GetNodeId(), "Received capabilities of thermostat setpoint type %d, min %s (field size: %i bytes, precision: %i decimals) max %s", (int) _data[1], minValue.c_str(), size, min_precision, maxValue.c_str()); + Log::Write(LogLevel_Info, GetNodeId(), "Received capabilities of thermostat setpoint type %d, min %s (field size: %i bytes, precision: %i decimals) max %s (precision: %i decimals)", (int) _data[1], minValue.c_str(), size, min_precision, maxValue.c_str(), max_precision); uint8 index = _data[1]; // Add supported setpoint @@ -290,7 +290,7 @@ namespace OpenZWave Msg* msg = new Msg("ThermostatSetpointCmd_Set", GetNodeId(), REQUEST, FUNC_ID_ZW_SEND_DATA, true); msg->SetInstance(this, _value.GetID().GetInstance()); msg->Append(GetNodeId()); - msg->Append(4 + GetAppendValueSize(value->GetValue())); + msg->Append(4 + GetAppendValueSize(value->GetValue(), setpointminsize, setpointprecision)); msg->Append(GetCommandClassId()); msg->Append(ThermostatSetpointCmd_Set); msg->Append((uint8_t) (value->GetID().GetIndex() & 0xFF)); From 884ab4e80629e5b86cb58073e8e371976d24008d Mon Sep 17 00:00:00 2001 From: Cyberwizzard Date: Sun, 8 Nov 2020 17:20:32 +0100 Subject: [PATCH 09/15] Added EnforceMinSizePrecision override to hide the HeatIt behavior until needed --- config/thermofloor/heatit058.xml | 1 + cpp/src/CompatOptionManager.cpp | 1 + cpp/src/CompatOptionManager.h | 1 + cpp/src/command_classes/ThermostatSetpoint.cpp | 11 ++++++++--- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/config/thermofloor/heatit058.xml b/config/thermofloor/heatit058.xml index a97cc9abe0..6e9d8e54e7 100644 --- a/config/thermofloor/heatit058.xml +++ b/config/thermofloor/heatit058.xml @@ -57,6 +57,7 @@ NB! Please use this procedure only when the primary controller/ gateway is missi + true 0 true diff --git a/cpp/src/CompatOptionManager.cpp b/cpp/src/CompatOptionManager.cpp index ef4271a5b2..60878c5a25 100644 --- a/cpp/src/CompatOptionManager.cpp +++ b/cpp/src/CompatOptionManager.cpp @@ -38,6 +38,7 @@ namespace OpenZWave { { "GetSupported", COMPAT_FLAG_GETSUPPORTED, COMPAT_FLAG_TYPE_BOOL }, { "OverridePrecision", COMPAT_FLAG_OVERRIDEPRECISION, COMPAT_FLAG_TYPE_BYTE }, + { "EnforceMinSizePrecision", COMPAT_FLAG_ENFORCE_MINSIZEPRECISION, COMPAT_FLAG_TYPE_BOOL }, // HeatIt thermostats rely on setting the minimum byte size and minimum precision of the setpoint command via the capability report, set this to adopt this behavior { "ForceVersion", COMPAT_FLAG_FORCEVERSION, COMPAT_FLAG_TYPE_BYTE }, { "CreateVars", COMPAT_FLAG_CREATEVARS, COMPAT_FLAG_TYPE_BOOL }, { "RefreshOnWakeup", COMPAT_FLAG_REFRESHONWAKEUP, COMPAT_FLAG_TYPE_BOOL }, diff --git a/cpp/src/CompatOptionManager.h b/cpp/src/CompatOptionManager.h index 237e11b204..fcdbabcfb6 100644 --- a/cpp/src/CompatOptionManager.h +++ b/cpp/src/CompatOptionManager.h @@ -69,6 +69,7 @@ namespace OpenZWave COMPAT_FLAG_NOT_ENABLECLEAR, COMPAT_FLAG_NOT_V1ALARMTYPES_ENABLED, COMPAT_FLAG_NO_REFRESH_AFTER_SET, + COMPAT_FLAG_ENFORCE_MINSIZEPRECISION, STATE_FLAG_CCVERSION, STATE_FLAG_STATIC_REQUESTS, STATE_FLAG_AFTERMARK, diff --git a/cpp/src/command_classes/ThermostatSetpoint.cpp b/cpp/src/command_classes/ThermostatSetpoint.cpp index 2a81136ec8..816b0884e3 100644 --- a/cpp/src/command_classes/ThermostatSetpoint.cpp +++ b/cpp/src/command_classes/ThermostatSetpoint.cpp @@ -70,6 +70,7 @@ namespace OpenZWave { m_com.EnableFlag(COMPAT_FLAG_TSSP_BASE, 1); m_com.EnableFlag(COMPAT_FLAG_TSSP_ALTTYPEINTERPRETATION, true); + m_com.EnableFlag(COMPAT_FLAG_ENFORCE_MINSIZEPRECISION, false); SetStaticRequest(StaticRequest_Values); } @@ -250,9 +251,13 @@ namespace OpenZWave if (index < ThermostatSetpoint_Count) { string setpointName = c_setpointName[index]; - // Retain the size of the minimum temperature as the minimum field size for the temperature and the minimum precision as the base precision for future communication - node->CreateValueByte(ValueID::ValueGenre_User, GetCommandClassId(), _instance, ValueID_Index_ThermostatSetpoint::SetPointMinSize, setpointName + "_setpointminsize", "B", false, false, size, 0); - node->CreateValueByte(ValueID::ValueGenre_User, GetCommandClassId(), _instance, ValueID_Index_ThermostatSetpoint::SetPointPrecision, setpointName + "_setpointprecision", "D", false, false, min_precision, 0); + + if (m_com.GetFlagBool(COMPAT_FLAG_ENFORCE_MINSIZEPRECISION)) { + // Retain the size of the minimum temperature as the minimum field size for the temperature and the minimum precision as the base precision for future communication + node->CreateValueByte(ValueID::ValueGenre_User, GetCommandClassId(), _instance, ValueID_Index_ThermostatSetpoint::SetPointMinSize, setpointName + "_setpointminsize", "B", false, false, size, 0); + node->CreateValueByte(ValueID::ValueGenre_User, GetCommandClassId(), _instance, ValueID_Index_ThermostatSetpoint::SetPointPrecision, setpointName + "_setpointprecision", "D", false, false, min_precision, 0); + Log::Write(LogLevel_Info, GetNodeId(), "EnforceMinSizePrecision enabled, retained min size and min precision from capability report for setpoint command"); + } 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()); From cb676b719c20f76dd530800b379202171e73c66e Mon Sep 17 00:00:00 2001 From: Cyberwizzard Date: Sun, 8 Nov 2020 22:44:03 +0100 Subject: [PATCH 10/15] Added missing enum for COMPAT_FLAG_ENFORCE_MINSIZEPRECISION --- cpp/src/CompatOptionManager.h | 1 + 1 file changed, 1 insertion(+) diff --git a/cpp/src/CompatOptionManager.h b/cpp/src/CompatOptionManager.h index fcdbabcfb6..96020f1a44 100644 --- a/cpp/src/CompatOptionManager.h +++ b/cpp/src/CompatOptionManager.h @@ -47,6 +47,7 @@ namespace OpenZWave { COMPAT_FLAG_GETSUPPORTED, COMPAT_FLAG_OVERRIDEPRECISION, + COMPAT_FLAG_ENFORCE_MINSIZEPRECISION, COMPAT_FLAG_FORCEVERSION, COMPAT_FLAG_CREATEVARS, COMPAT_FLAG_REFRESHONWAKEUP, From c18d6a3ce65090bde977d6d22adf93abc74f6953 Mon Sep 17 00:00:00 2001 From: Cyberwizzard Date: Mon, 9 Nov 2020 09:07:47 +0100 Subject: [PATCH 11/15] Revert "Added missing enum for COMPAT_FLAG_ENFORCE_MINSIZEPRECISION" This reverts commit 72a626bc6b9f2722396b49ec3e93ac2bb00832d3. --- cpp/src/CompatOptionManager.h | 1 - 1 file changed, 1 deletion(-) diff --git a/cpp/src/CompatOptionManager.h b/cpp/src/CompatOptionManager.h index 96020f1a44..fcdbabcfb6 100644 --- a/cpp/src/CompatOptionManager.h +++ b/cpp/src/CompatOptionManager.h @@ -47,7 +47,6 @@ namespace OpenZWave { COMPAT_FLAG_GETSUPPORTED, COMPAT_FLAG_OVERRIDEPRECISION, - COMPAT_FLAG_ENFORCE_MINSIZEPRECISION, COMPAT_FLAG_FORCEVERSION, COMPAT_FLAG_CREATEVARS, COMPAT_FLAG_REFRESHONWAKEUP, From cd04d792278b8ff4357de3c31b06a60bc7d8b804 Mon Sep 17 00:00:00 2001 From: Cyberwizzard Date: Wed, 11 Nov 2020 21:34:12 +0100 Subject: [PATCH 12/15] Reworked GetValue code to use the style used elsewhere and get rid of the hard-coded instance index --- cpp/src/command_classes/ThermostatSetpoint.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/cpp/src/command_classes/ThermostatSetpoint.cpp b/cpp/src/command_classes/ThermostatSetpoint.cpp index 816b0884e3..08363c2c78 100644 --- a/cpp/src/command_classes/ThermostatSetpoint.cpp +++ b/cpp/src/command_classes/ThermostatSetpoint.cpp @@ -252,7 +252,7 @@ namespace OpenZWave { string setpointName = c_setpointName[index]; - if (m_com.GetFlagBool(COMPAT_FLAG_ENFORCE_MINSIZEPRECISION)) { + if (m_com.GetFlagBool(COMPAT_FLAG_ENFORCE_MINSIZEPRECISION)) { // Retain the size of the minimum temperature as the minimum field size for the temperature and the minimum precision as the base precision for future communication node->CreateValueByte(ValueID::ValueGenre_User, GetCommandClassId(), _instance, ValueID_Index_ThermostatSetpoint::SetPointMinSize, setpointName + "_setpointminsize", "B", false, false, size, 0); node->CreateValueByte(ValueID::ValueGenre_User, GetCommandClassId(), _instance, ValueID_Index_ThermostatSetpoint::SetPointPrecision, setpointName + "_setpointprecision", "D", false, false, min_precision, 0); @@ -279,16 +279,15 @@ namespace OpenZWave { Internal::VC::ValueDecimal const* value = static_cast(&_value); uint8 scale = strcmp("C", value->GetUnits().c_str()) ? 1 : 0; - int8 setpointminsize = 0; // Minimum number of bytes to express the setpoint value, cached from the capabilities report - int8 setpointprecision = 0; // Minimum precision express the setpoint value, cached from the capabilities report - uint8 _instance = 1; // FIXME where is the instance ID supposed to come from? + int8 setpointminsize = 0; // Minimum number of bytes to express the setpoint value, optionally cached from the capabilities report + int8 setpointprecision = 0; // Minimum precision express the setpoint value, optionally cached from the capabilities report - if (Node* node = GetNodeUnsafe()) { - Internal::VC::Value const* _minsizeValue = node->GetValue(GetCommandClassId(), _instance, ValueID_Index_ThermostatSetpoint::SetPointMinSize); - Internal::VC::Value const* _precisionValue = node->GetValue(GetCommandClassId(), _instance, ValueID_Index_ThermostatSetpoint::SetPointPrecision); - Internal::VC::ValueByte const* minsizeValue = static_cast(_minsizeValue); - Internal::VC::ValueByte const* precisionValue = static_cast(_precisionValue); + if (Internal::VC::ValueByte const *minsizeValue = static_cast(GetValue(_value.GetID().GetInstance(), ValueID_Index_ThermostatSetpoint::SetPointMinSize))) + { setpointminsize = minsizeValue->GetValue(); + } + if (Internal::VC::ValueByte const *precisionValue = static_cast(GetValue(_value.GetID().GetInstance(), ValueID_Index_ThermostatSetpoint::SetPointPrecision))) + { setpointprecision = precisionValue->GetValue(); } From 9f5c901d989ad86318c24c3d7249c5ad8cfc5958 Mon Sep 17 00:00:00 2001 From: Cyberwizzard Date: Thu, 12 Nov 2020 08:50:23 +0100 Subject: [PATCH 13/15] Removed old commented code --- cpp/src/command_classes/CommandClass.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/cpp/src/command_classes/CommandClass.cpp b/cpp/src/command_classes/CommandClass.cpp index 2fe892726c..53cfa54e33 100644 --- a/cpp/src/command_classes/CommandClass.cpp +++ b/cpp/src/command_classes/CommandClass.cpp @@ -602,16 +602,6 @@ namespace OpenZWave uint8 precision; uint8 size; int32 val = ValueToInteger(_value, &precision, &size, _minsize, _minprecision); - // FIXME remove - logic moved into ValueToInteger to be shared from within there - //if(size < _minsize) size = _minsize; - //if(precision < _minprecision) - //{ - // Log::Write(LogLevel_Info, GetNodeId(), "Increasing precision on integer value %i, obtained from %s, from %i decimals to %i decimals", val, _value, precision, _minprecision); - // int8 const delta = _minprecision - precision; - // for(uint8 i=0; iAppend((precision << c_precisionShift) | (_scale << c_scaleShift) | size); From 0eab9cdfa9c24555c7868dc815c73c7886304f8a Mon Sep 17 00:00:00 2001 From: Cyberwizzard Date: Thu, 12 Nov 2020 09:06:55 +0100 Subject: [PATCH 14/15] Update device_configuration.xsd --- config/device_configuration.xsd | 1 + 1 file changed, 1 insertion(+) diff --git a/config/device_configuration.xsd b/config/device_configuration.xsd index d850a24aed..54d1abbf3f 100644 --- a/config/device_configuration.xsd +++ b/config/device_configuration.xsd @@ -88,6 +88,7 @@ + From 04af0c2d81f68ee96629272eea85069209440e8d Mon Sep 17 00:00:00 2001 From: Cyberwizzard Date: Thu, 12 Nov 2020 09:10:38 +0100 Subject: [PATCH 15/15] Update heatit058.xml --- config/thermofloor/heatit058.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/thermofloor/heatit058.xml b/config/thermofloor/heatit058.xml index 6e9d8e54e7..b740d37a5a 100644 --- a/config/thermofloor/heatit058.xml +++ b/config/thermofloor/heatit058.xml @@ -1,5 +1,5 @@ - + http://www.openzwave.com/device-database/019B:0203:0003 images/thermofloor/heatit058.png @@ -33,6 +33,7 @@ NB! Please use this procedure only when the primary controller/ gateway is missi Heatit Z-TRM3 Initial Metadata Import from Z-Wave Alliance Database - https://products.z-wavealliance.org/products/3802/xml + Enabled EnforceMinSizePrecision compatibility flag to fix the setpoint command