From 286e034214ceea3f56fa3765c4bd69b91fafb8bc Mon Sep 17 00:00:00 2001 From: BlueAndi Date: Sat, 2 Jan 2021 00:10:00 +0100 Subject: [PATCH] VSCP framework v1.2.0 integrated and copyright year updated. --- CHANGELOG.md | 4 + LICENSE.md | 2 +- README.md | 1 + library.json | 2 +- library.properties | 2 +- mdf_template.xml | 2 +- src/DigInDebounce.h | 2 +- src/SwTimer.h | 2 +- src/VSCP.h | 2 +- src/framework/core/vscp_class_l1.h | 5 +- src/framework/core/vscp_class_l1_l2.h | 2 +- src/framework/core/vscp_config.h | 2 +- src/framework/core/vscp_config_base.h | 2 +- src/framework/core/vscp_core.c | 2 +- src/framework/core/vscp_core.h | 4 +- src/framework/core/vscp_data_coding.c | 2 +- src/framework/core/vscp_data_coding.h | 2 +- src/framework/core/vscp_dev_data.c | 2 +- src/framework/core/vscp_dev_data.h | 2 +- src/framework/core/vscp_dev_data_config.h | 2 +- src/framework/core/vscp_dm.c | 2 +- src/framework/core/vscp_dm.h | 2 +- src/framework/core/vscp_dm_ng.c | 2 +- src/framework/core/vscp_dm_ng.h | 2 +- src/framework/core/vscp_logger.c | 2 +- src/framework/core/vscp_logger.h | 2 +- src/framework/core/vscp_ps.c | 2 +- src/framework/core/vscp_ps.h | 2 +- src/framework/core/vscp_transport.c | 2 +- src/framework/core/vscp_transport.h | 2 +- src/framework/core/vscp_type_alarm.h | 2 +- src/framework/core/vscp_type_aol.h | 2 +- src/framework/core/vscp_type_configuration.h | 258 +++++++ src/framework/core/vscp_type_control.h | 12 +- src/framework/core/vscp_type_data.h | 2 +- src/framework/core/vscp_type_diagnostic.h | 12 +- src/framework/core/vscp_type_display.h | 2 +- src/framework/core/vscp_type_error.h | 2 +- src/framework/core/vscp_type_gnss.h | 2 +- src/framework/core/vscp_type_information.h | 12 +- src/framework/core/vscp_type_ir.h | 2 +- src/framework/core/vscp_type_log.h | 2 +- src/framework/core/vscp_type_measurement.h | 25 +- src/framework/core/vscp_type_measurement32.h | 2 +- src/framework/core/vscp_type_measurement64.h | 2 +- src/framework/core/vscp_type_measurezone.h | 2 +- src/framework/core/vscp_type_multimedia.h | 2 +- src/framework/core/vscp_type_phone.h | 2 +- src/framework/core/vscp_type_protocol.h | 2 +- src/framework/core/vscp_type_remote.h | 2 +- src/framework/core/vscp_type_security.h | 22 +- src/framework/core/vscp_type_setvaluezone.h | 2 +- src/framework/core/vscp_type_weather.h | 2 +- .../core/vscp_type_weather_forecast.h | 2 +- src/framework/core/vscp_type_wireless.h | 2 +- src/framework/core/vscp_types.h | 2 +- src/framework/core/vscp_util.c | 2 +- src/framework/core/vscp_util.h | 2 +- src/framework/events/vscp_evt_alarm.c | 2 +- src/framework/events/vscp_evt_alarm.h | 2 +- src/framework/events/vscp_evt_aol.c | 2 +- src/framework/events/vscp_evt_aol.h | 2 +- src/framework/events/vscp_evt_configuration.c | 660 ++++++++++++++++++ src/framework/events/vscp_evt_configuration.h | 282 ++++++++ src/framework/events/vscp_evt_control.c | 100 ++- src/framework/events/vscp_evt_control.h | 32 +- src/framework/events/vscp_evt_data.c | 2 +- src/framework/events/vscp_evt_data.h | 2 +- src/framework/events/vscp_evt_diagnostic.c | 98 ++- src/framework/events/vscp_evt_diagnostic.h | 30 +- src/framework/events/vscp_evt_display.c | 2 +- src/framework/events/vscp_evt_display.h | 2 +- src/framework/events/vscp_evt_error.c | 2 +- src/framework/events/vscp_evt_error.h | 2 +- src/framework/events/vscp_evt_gnss.c | 2 +- src/framework/events/vscp_evt_gnss.h | 4 +- src/framework/events/vscp_evt_information.c | 98 ++- src/framework/events/vscp_evt_information.h | 30 +- src/framework/events/vscp_evt_ir.c | 2 +- src/framework/events/vscp_evt_ir.h | 2 +- src/framework/events/vscp_evt_log.c | 2 +- src/framework/events/vscp_evt_log.h | 2 +- src/framework/events/vscp_evt_measurement.c | 74 +- src/framework/events/vscp_evt_measurement.h | 38 +- src/framework/events/vscp_evt_measurement32.c | 2 +- src/framework/events/vscp_evt_measurement32.h | 2 +- src/framework/events/vscp_evt_measurement64.c | 2 +- src/framework/events/vscp_evt_measurement64.h | 2 +- src/framework/events/vscp_evt_measurezone.c | 2 +- src/framework/events/vscp_evt_measurezone.h | 2 +- src/framework/events/vscp_evt_multimedia.c | 2 +- src/framework/events/vscp_evt_multimedia.h | 2 +- src/framework/events/vscp_evt_phone.c | 2 +- src/framework/events/vscp_evt_phone.h | 2 +- src/framework/events/vscp_evt_protocol.c | 2 +- src/framework/events/vscp_evt_protocol.h | 2 +- src/framework/events/vscp_evt_security.c | 131 +++- src/framework/events/vscp_evt_security.h | 49 +- src/framework/events/vscp_evt_setvaluezone.c | 2 +- src/framework/events/vscp_evt_setvaluezone.h | 2 +- src/framework/events/vscp_evt_weather.c | 2 +- src/framework/events/vscp_evt_weather.h | 2 +- .../events/vscp_evt_weather_forecast.c | 2 +- .../events/vscp_evt_weather_forecast.h | 2 +- src/framework/events/vscp_evt_wireless.c | 2 +- src/framework/events/vscp_evt_wireless.h | 2 +- src/framework/user/vscp_action.c | 2 +- src/framework/user/vscp_action.h | 2 +- src/framework/user/vscp_app_reg.c | 2 +- src/framework/user/vscp_app_reg.h | 2 +- src/framework/user/vscp_config_overwrite.h | 2 +- .../user/vscp_dev_data_config_overwrite.h | 2 +- src/framework/user/vscp_platform.h | 2 +- src/framework/user/vscp_portable.c | 2 +- src/framework/user/vscp_portable.h | 2 +- src/framework/user/vscp_ps_access.c | 2 +- src/framework/user/vscp_ps_access.h | 2 +- src/framework/user/vscp_timer.c | 2 +- src/framework/user/vscp_timer.h | 2 +- src/framework/user/vscp_tp_adapter.c | 2 +- src/framework/user/vscp_tp_adapter.h | 2 +- 121 files changed, 2056 insertions(+), 121 deletions(-) create mode 100644 src/framework/core/vscp_type_configuration.h create mode 100644 src/framework/events/vscp_evt_configuration.c create mode 100644 src/framework/events/vscp_evt_configuration.h diff --git a/CHANGELOG.md b/CHANGELOG.md index ecdc8d9..6206738 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.2.0 + +- Update to VSCP framework v1.2.0, please see the ![changelog](https://github.com/BlueAndi/vscp-framework/releases/tag/v1.2.0) there. + ## 1.1.0 - Update to VSCP framework v1.1.0, please see the ![changelog](https://github.com/BlueAndi/vscp-framework/releases/tag/v1.1.0) there. diff --git a/LICENSE.md b/LICENSE.md index be38957..2c8a47f 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014 - 2020, Andreas Merkle +Copyright (c) 2014 - 2021, Andreas Merkle http://www.blue-andi.de vscp@blue-andi.de diff --git a/README.md b/README.md index e2e49bc..2402c87 100644 --- a/README.md +++ b/README.md @@ -156,6 +156,7 @@ You will find the type defines here: ``` src/framework/events/vscp_evt_alarm.h src/framework/events/vscp_evt_aol.h +src/framework/events/vscp_evt_configuration.h src/framework/events/vscp_evt_control.h src/framework/events/vscp_evt_data.h src/framework/events/vscp_evt_diagnostic.h diff --git a/library.json b/library.json index 40936bb..8f0d13f 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "vscp-arduino", - "version": "1.1.0", + "version": "1.2.0", "keywords": "vscp, arduino-library, vscp-arduino, automation, home automation", "description": "Very Simple Control Procotol (VSCP) Level 1 Library for the arduino IDE.", "repository": { diff --git a/library.properties b/library.properties index cfab459..bd06cc2 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=VSCP -version=1.1.0 +version=1.2.0 author=Andreas Merkle maintainer=Andreas Merkle sentence=Very Simple Control Protocol L1 framework for all Arduino boards. diff --git a/mdf_template.xml b/mdf_template.xml index 0909a87..ce1f2fa 100644 --- a/mdf_template.xml +++ b/mdf_template.xml @@ -4,7 +4,7 @@ The MIT License (MIT) -Copyright (c) 2014 - 2020, Andreas Merkle +Copyright (c) 2014 - 2021, Andreas Merkle http://www.blue-andi.de vscp@blue-andi.de diff --git a/src/DigInDebounce.h b/src/DigInDebounce.h index 6759730..92a8ac7 100644 --- a/src/DigInDebounce.h +++ b/src/DigInDebounce.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/SwTimer.h b/src/SwTimer.h index 8f9d4d7..43fb1f2 100644 --- a/src/SwTimer.h +++ b/src/SwTimer.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/VSCP.h b/src/VSCP.h index 90dc146..b4acbf6 100644 --- a/src/VSCP.h +++ b/src/VSCP.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_class_l1.h b/src/framework/core/vscp_class_l1.h index eae2e53..60dd9b2 100644 --- a/src/framework/core/vscp_class_l1.h +++ b/src/framework/core/vscp_class_l1.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * @@ -122,6 +122,9 @@ extern "C" /** VSCP level 1 class: IR Remote i/f */ #define VSCP_CLASS_L1_IR 110 +/** VSCP level 1 class: Configuration */ +#define VSCP_CLASS_L1_CONFIGURATION 120 + /** VSCP level 1 class: Position (GPS) */ #define VSCP_CLASS_L1_GNSS 206 diff --git a/src/framework/core/vscp_class_l1_l2.h b/src/framework/core/vscp_class_l1_l2.h index a51bbad..d829d14 100644 --- a/src/framework/core/vscp_class_l1_l2.h +++ b/src/framework/core/vscp_class_l1_l2.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_config.h b/src/framework/core/vscp_config.h index c74f7fe..1a08edd 100644 --- a/src/framework/core/vscp_config.h +++ b/src/framework/core/vscp_config.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_config_base.h b/src/framework/core/vscp_config_base.h index c598248..3693132 100644 --- a/src/framework/core/vscp_config_base.h +++ b/src/framework/core/vscp_config_base.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_core.c b/src/framework/core/vscp_core.c index 5138ea0..e754785 100644 --- a/src/framework/core/vscp_core.c +++ b/src/framework/core/vscp_core.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_core.h b/src/framework/core/vscp_core.h index 66fb76c..2442448 100644 --- a/src/framework/core/vscp_core.h +++ b/src/framework/core/vscp_core.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * @@ -102,7 +102,7 @@ extern "C" #define VSCP_CORE_VERSION_STR "v1.11.00" /** VSCP framework version string */ -#define VSCP_CORE_FRAMEWORK_VERSION "v1.1.0" +#define VSCP_CORE_FRAMEWORK_VERSION "v1.2.0" /******************************************************************************* MACROS diff --git a/src/framework/core/vscp_data_coding.c b/src/framework/core/vscp_data_coding.c index 3039a7b..4daf14f 100644 --- a/src/framework/core/vscp_data_coding.c +++ b/src/framework/core/vscp_data_coding.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_data_coding.h b/src/framework/core/vscp_data_coding.h index bc1b953..9bf7e52 100644 --- a/src/framework/core/vscp_data_coding.h +++ b/src/framework/core/vscp_data_coding.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_dev_data.c b/src/framework/core/vscp_dev_data.c index a2ba48e..ee39b88 100644 --- a/src/framework/core/vscp_dev_data.c +++ b/src/framework/core/vscp_dev_data.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_dev_data.h b/src/framework/core/vscp_dev_data.h index a9539fd..853b430 100644 --- a/src/framework/core/vscp_dev_data.h +++ b/src/framework/core/vscp_dev_data.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_dev_data_config.h b/src/framework/core/vscp_dev_data_config.h index 50e17bd..09ceb61 100644 --- a/src/framework/core/vscp_dev_data_config.h +++ b/src/framework/core/vscp_dev_data_config.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_dm.c b/src/framework/core/vscp_dm.c index 67d9e3a..efbae63 100644 --- a/src/framework/core/vscp_dm.c +++ b/src/framework/core/vscp_dm.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_dm.h b/src/framework/core/vscp_dm.h index a65e190..9342f43 100644 --- a/src/framework/core/vscp_dm.h +++ b/src/framework/core/vscp_dm.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_dm_ng.c b/src/framework/core/vscp_dm_ng.c index 4ed00ca..1d3866d 100644 --- a/src/framework/core/vscp_dm_ng.c +++ b/src/framework/core/vscp_dm_ng.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_dm_ng.h b/src/framework/core/vscp_dm_ng.h index 0520df8..54e93e8 100644 --- a/src/framework/core/vscp_dm_ng.h +++ b/src/framework/core/vscp_dm_ng.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_logger.c b/src/framework/core/vscp_logger.c index bc85686..cd45a21 100644 --- a/src/framework/core/vscp_logger.c +++ b/src/framework/core/vscp_logger.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_logger.h b/src/framework/core/vscp_logger.h index 5433561..f1cf627 100644 --- a/src/framework/core/vscp_logger.h +++ b/src/framework/core/vscp_logger.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_ps.c b/src/framework/core/vscp_ps.c index f0cb5c9..92d7cda 100644 --- a/src/framework/core/vscp_ps.c +++ b/src/framework/core/vscp_ps.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_ps.h b/src/framework/core/vscp_ps.h index 07131f6..2f972f6 100644 --- a/src/framework/core/vscp_ps.h +++ b/src/framework/core/vscp_ps.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_transport.c b/src/framework/core/vscp_transport.c index d175e79..768cef2 100644 --- a/src/framework/core/vscp_transport.c +++ b/src/framework/core/vscp_transport.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_transport.h b/src/framework/core/vscp_transport.h index 5d24475..d547417 100644 --- a/src/framework/core/vscp_transport.h +++ b/src/framework/core/vscp_transport.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_type_alarm.h b/src/framework/core/vscp_type_alarm.h index 9b8e2fc..35f7b45 100644 --- a/src/framework/core/vscp_type_alarm.h +++ b/src/framework/core/vscp_type_alarm.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_type_aol.h b/src/framework/core/vscp_type_aol.h index 7e5258a..ae530b9 100644 --- a/src/framework/core/vscp_type_aol.h +++ b/src/framework/core/vscp_type_aol.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_type_configuration.h b/src/framework/core/vscp_type_configuration.h new file mode 100644 index 0000000..0bfee26 --- /dev/null +++ b/src/framework/core/vscp_type_configuration.h @@ -0,0 +1,258 @@ +/* The MIT License (MIT) + * + * Copyright (c) 2014 - 2021, Andreas Merkle + * http://www.blue-andi.de + * vscp@blue-andi.de + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ + +/******************************************************************************* + DESCRIPTION +*******************************************************************************/ +/** +@brief Configuration +@file vscp_type_configuration.h +@author Andreas Merkle, http://www.blue-andi.de + +@section desc Description +Events for configuration of sets and parameters on nodes without register manipulation. + +This file is automatically generated. Don't change it manually. + +*******************************************************************************/ + +#ifndef __VSCP_TYPE_CONFIGURATION_H__ +#define __VSCP_TYPE_CONFIGURATION_H__ + +/** @defgroup vscp_type_configuration Configuration + * Level 1 protocol class types + * @{ + * @ingroup vscp_l1 + */ + +/******************************************************************************* + INCLUDES +*******************************************************************************/ + +#ifdef __cplusplus +extern "C" +{ +#endif + +/******************************************************************************* + COMPILER SWITCHES +*******************************************************************************/ + +/******************************************************************************* + CONSTANTS +*******************************************************************************/ + +/** + * General Event. + */ +#define VSCP_TYPE_CONFIGURATION_GENERAL 0 + +/** + * Load a specific configuration on a node. The configuration to load is defined by a 16-byte + * configuration id. It is recommended that configuration id zero is the default configuration. + * The optional control byte can be used to request a reset if the device after configuration is + * loaded. + * CLASS1.CONFIGURATION, VSCP_TYPE_CONFIGURATION_LOAD_ACK should be sent by the node after loading the + * new configuration to acknowledge a successful load of configuration data. + * CLASS1.CONFIGURATION, VSCP_TYPE_CONFIGURATION_LOAD_NACK should be sent by the node after loading + * the new configuration to negative acknowledge a failed load of configuration data. + */ +#define VSCP_TYPE_CONFIGURATION_LOAD 1 + +/** + * This event should be sent by the node after loading a new configuration to acknowledge a successful + * load of configuration data. The configuration id for the successfully loaded configuration should + * be given in byte 0 and 1. + */ +#define VSCP_TYPE_CONFIGURATION_LOAD_ACK 2 + +/** + * This event should be sent by the node after loading a new configuration to negative acknowledge an + * unsuccessful load of configuration data. The configuration id for the unsuccessfully loaded + * configuration should be given in byte 0 and 1. + */ +#define VSCP_TYPE_CONFIGURATION_LOAD_NACK 3 + +/** + * Save a specific configuration on a node. The configuration to save is identified by a 16-byte + * configuration id. It is recommended that configuration id zero is the default configuration. + * The optional control byte can be used to request a reset if the device after configuration is + * saved. + * CLASS1.CONFIGURATION, VSCP_TYPE_CONFIGURATION_SAVE_ACK should be sent by the node after saving the + * new configuration to acknowledge a successful save of configuration data. + * CLASS1.CONFIGURATION, VSCP_TYPE_CONFIGURATION_SAVE_NACK should be sent by the node after saving the + * new configuration to negative acknowledge a failed save of configuration data. + */ +#define VSCP_TYPE_CONFIGURATION_SAVE 4 + +/** + * This event should be sent by the node after saving a new configuration to acknowledge a successful + * save of configuration data. The configuration id for the successfully saved configuration should be + * given in byte 0 and 1. + */ +#define VSCP_TYPE_CONFIGURATION_SAVE_ACK 5 + +/** + * This event should be sent by the node after saving a new configuration to negative acknowledge an + * unsuccessful save of configuration data. The configuration id for the unsuccessfully saved + * configuration should be given in byte 0 and 1. + */ +#define VSCP_TYPE_CONFIGURATION_SAVE_NACK 6 + +/** + * Commit a specific configuration on a node. The configuration to commit is identified by a 16-byte + * configuration id. It is recommended that configuration id zero is the default configuration. + * The optional control byte can be used to request a reset if the device after configuration is + * saved. + * CLASS1.CONFIGURATION, VSCP_TYPE_CONFIGURATION_COMMIT_ACK should be sent by the node after + * committing the new configuration to acknowledge a successful commit of configuration data. + * CLASS1.CONFIGURATION, VSCP_TYPE_CONFIGURATION_COMMIT_NACK should be sent by the node after + * committing the new configuration to negative acknowledge a failed commit of configuration data. + */ +#define VSCP_TYPE_CONFIGURATION_COMMIT 7 + +/** + * This event should be sent by the node after committing a new configuration to acknowledge a + * successful commit of configuration data. The configuration id for the successfully committed + * configuration should be given in byte 0 and 1. + */ +#define VSCP_TYPE_CONFIGURATION_COMMIT_ACK 8 + +/** + * This event should be sent by the node after committing a new configuration to negative acknowledge + * an unsuccessful commit of configuration data. The configuration id for the unsuccessfully committed + * configuration should be given in byte 0 and 1. + */ +#define VSCP_TYPE_CONFIGURATION_COMMIT_NACK 9 + +/** + * Reload a specific configuration on a node. The configuration to reload is identified by a 16-byte + * configuration id. It is recommended that configuration id zero is the default configuration. + * The optional control byte can be used to request a reset if the device after configuration is + * saved. + * CLASS1.CONFIGURATION, VSCP_TYPE_CONFIGURATION_RELOAD_ACK should be sent by the node after reloadinf + * the new configuration to acknowledge a successful reload of configuration data. + * CLASS1.CONFIGURATION, VSCP_TYPE_CONFIGURATION_RELOAD_NACK should be sent by the node after + * reloading the new configuration to negative acknowledge a failed reload of configuration data. + */ +#define VSCP_TYPE_CONFIGURATION_RELOAD 10 + +/** + * This event should be sent by the node after reloading a new configuration to acknowledge a + * successful reload of configuration data. The configuration id for the successfully reloaded + * configuration should be given in byte 0 and 1. + */ +#define VSCP_TYPE_CONFIGURATION_REALOD_ACK 11 + +/** + * This event should be sent by the node after reloading a new configuration to negative acknowledge + * an unsuccessful reload of configuration data. The configuration id for the unsuccessfully reloaded + * configuration should be given in byte 0 and 1. + */ +#define VSCP_TYPE_CONFIGURATION_RELOAD_NACK 12 + +/** + * Restore a specific configuration on a node. The configuration to restore is identified by a + * 16-byte configuration id. It is recommended that configuration id zero is the default + * configuration. + * The optional control byte can be used to request a reset if the device after configuration is + * saved. + * CLASS1.CONFIGURATION, VSCP_TYPE_CONFIGURATION_RESTORE_ACK should be sent by the node after + * restoring the new configuration to acknowledge a successful restore of configuration data. + * CLASS1.CONFIGURATION, VSCP_TYPE_CONFIGURATION_RESTORE_NACK should be sent by the node after + * restoring the new configuration to negative acknowledge a failed restore of configuration data. + */ +#define VSCP_TYPE_CONFIGURATION_RESTORE 13 + +/** + * This event should be sent by the node after restoring a new configuration to acknowledge a + * successful restore of configuration data. The configuration id for the successfully restored + * configuration should be given in byte 0 and 1. + */ +#define VSCP_TYPE_CONFIGURATION_RESTORE_ACK 14 + +/** + * This event should be sent by the node after restoring a new configuration to negative acknowledge + * an unsuccessful restore of configuration data. The configuration id for the unsuccessfully restored + * configuration should be given in byte 0 and 1. + */ +#define VSCP_TYPE_CONFIGURATION_RESTORE_NACK 15 + +/** + * Set a parameter identified by a 16-bit parameter id to a value identified by a 16-bit value + * identifier. A typical examples of the use of this event is to set the unit for a measurement on one + * or several nodes. It is recommended that the value identifier zero is used as the default value for + * a parameter. + * CLASS1.CONFIGURATION, VSCP_TYPE_CONFIGURATION_SET_MODE_ACK should be sent by the node after setting + * the new value. + * CLASS1.CONFIGURATION, VSCP_TYPE_CONFIGURATION_SET_MODE_NACK should be sent by the node if it fails + * to set the new value. + */ +#define VSCP_TYPE_CONFIGURATION_SET_PARAMETER 30 + +/** + * Set the default value for a parameter identified by a 16-bit parameter id. In most cases this is + * the same as setting the mode for a parameter to value id zero. + * CLASS1.CONFIGURATION, VSCP_TYPE_CONFIGURATION_SET_MODE_ACK should be sent by the node after setting + * the new value. + * CLASS1.CONFIGURATION, VSCP_TYPE_CONFIGURATION_SET_MODE_NACK should be sent by the node if it fails + * to set the new value. + */ +#define VSCP_TYPE_CONFIGURATION_SET_PARAMETER_DEFAULT 31 + +/** + * This event should be sent by the node after setting the new value. + */ +#define VSCP_TYPE_CONFIGURATION_SET_PARAMETER_ACK 32 + +/** + * Should be sent by the node if it fails to set the new value. + */ +#define VSCP_TYPE_CONFIGURATION_SET_PARAMETER_NACK 33 + +/******************************************************************************* + MACROS +*******************************************************************************/ + +/******************************************************************************* + TYPES AND STRUCTURES +*******************************************************************************/ + +/******************************************************************************* + VARIABLES +*******************************************************************************/ + +/******************************************************************************* + FUNCTIONS +*******************************************************************************/ + +#ifdef __cplusplus +} +#endif + +#endif /* __VSCP_TYPE_CONFIGURATION_H__ */ + +/** @} */ diff --git a/src/framework/core/vscp_type_control.h b/src/framework/core/vscp_type_control.h index 9f7c5ec..4ce76b3 100644 --- a/src/framework/core/vscp_type_control.h +++ b/src/framework/core/vscp_type_control.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * @@ -335,6 +335,16 @@ extern "C" */ #define VSCP_TYPE_CONTROL_REQUEST_SECURITY_TOKEN 51 +/** + * Increment value. + */ +#define VSCP_TYPE_CONTROL_INCREMENT 52 + +/** + * Decrement value. + */ +#define VSCP_TYPE_CONTROL_DECREMENT 53 + /******************************************************************************* MACROS *******************************************************************************/ diff --git a/src/framework/core/vscp_type_data.h b/src/framework/core/vscp_type_data.h index c00aa27..adc4b78 100644 --- a/src/framework/core/vscp_type_data.h +++ b/src/framework/core/vscp_type_data.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_type_diagnostic.h b/src/framework/core/vscp_type_diagnostic.h index 6bcc923..84498f0 100644 --- a/src/framework/core/vscp_type_diagnostic.h +++ b/src/framework/core/vscp_type_diagnostic.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * @@ -465,6 +465,16 @@ extern "C" */ #define VSCP_TYPE_DIAGNOSTIC_EXT_IC_FAIL 79 +/** + * Charging of battery or similar has started or is in progress. + */ +#define VSCP_TYPE_DIAGNOSTIC_CHARGING_ON 80 + +/** + * Charging of battery or similar has ended. + */ +#define VSCP_TYPE_DIAGNOSTIC_CHARGING_OFF 81 + /******************************************************************************* MACROS *******************************************************************************/ diff --git a/src/framework/core/vscp_type_display.h b/src/framework/core/vscp_type_display.h index a766cd9..397a44c 100644 --- a/src/framework/core/vscp_type_display.h +++ b/src/framework/core/vscp_type_display.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_type_error.h b/src/framework/core/vscp_type_error.h index b956394..a659471 100644 --- a/src/framework/core/vscp_type_error.h +++ b/src/framework/core/vscp_type_error.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_type_gnss.h b/src/framework/core/vscp_type_gnss.h index 8f6d92c..005d47e 100644 --- a/src/framework/core/vscp_type_gnss.h +++ b/src/framework/core/vscp_type_gnss.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_type_information.h b/src/framework/core/vscp_type_information.h index 5e19f3e..360e592 100644 --- a/src/framework/core/vscp_type_information.h +++ b/src/framework/core/vscp_type_information.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * @@ -600,6 +600,16 @@ extern "C" */ #define VSCP_TYPE_INFORMATION_EXIT 85 +/** + * This is meant to be used as a confirmation event for CLASS1.CONTROL, Type=52 events. + */ +#define VSCP_TYPE_INFORMATION_INCREMENTED 86 + +/** + * This is meant to be used as a confirmation event for CLASS1.CONTROL, Type=53 events. + */ +#define VSCP_TYPE_INFORMATION_DECREMENTED 87 + /******************************************************************************* MACROS *******************************************************************************/ diff --git a/src/framework/core/vscp_type_ir.h b/src/framework/core/vscp_type_ir.h index 0811307..fec11d0 100644 --- a/src/framework/core/vscp_type_ir.h +++ b/src/framework/core/vscp_type_ir.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_type_log.h b/src/framework/core/vscp_type_log.h index 9cc11dd..9e285cf 100644 --- a/src/framework/core/vscp_type_log.h +++ b/src/framework/core/vscp_type_log.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_type_measurement.h b/src/framework/core/vscp_type_measurement.h index cdc50df..44cce46 100644 --- a/src/framework/core/vscp_type_measurement.h +++ b/src/framework/core/vscp_type_measurement.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * @@ -150,7 +150,7 @@ extern "C" /** * Default unit: Joule. - * Optional unit: KWh (1) + * Optional unit: KWh (1), Wh(2) * This is a measurement of energy. */ #define VSCP_TYPE_MEASUREMENT_ENERGY 13 @@ -455,6 +455,27 @@ extern "C" */ #define VSCP_TYPE_MEASUREMENT_SOUND_LEVEL 60 +/** + * Default unit: sievert (Sv). + * Optional unit rem (1) + * This is a measurement of a radiation dose (Equivalent dose of ionizing radiation). + */ +#define VSCP_TYPE_MEASUREMENT_RADIATION_DOSE_EQ 61 + +/** + * Default unit: coulomb per kilogram (C/kg). + * Optional unit: Röntgen/R (1) + * This is a measurement of a radiation dose (Exposed dose of ionizing radiation). + */ +#define VSCP_TYPE_MEASUREMENT_RADIATION_DOSE_EXPOSURE 62 + +/** + * Default unit: Percent + * Optional unit: Röntgen/R (1) + * Ratio between power in kW and apperant power in kVA. + */ +#define VSCP_TYPE_MEASUREMENT_POWER_FACTOR 63 + /******************************************************************************* MACROS *******************************************************************************/ diff --git a/src/framework/core/vscp_type_measurement32.h b/src/framework/core/vscp_type_measurement32.h index 85e0e2e..c949eaa 100644 --- a/src/framework/core/vscp_type_measurement32.h +++ b/src/framework/core/vscp_type_measurement32.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_type_measurement64.h b/src/framework/core/vscp_type_measurement64.h index 1cea5b5..5a1c453 100644 --- a/src/framework/core/vscp_type_measurement64.h +++ b/src/framework/core/vscp_type_measurement64.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_type_measurezone.h b/src/framework/core/vscp_type_measurezone.h index 87dfa3e..d6db24f 100644 --- a/src/framework/core/vscp_type_measurezone.h +++ b/src/framework/core/vscp_type_measurezone.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_type_multimedia.h b/src/framework/core/vscp_type_multimedia.h index 7f0c621..ed68705 100644 --- a/src/framework/core/vscp_type_multimedia.h +++ b/src/framework/core/vscp_type_multimedia.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_type_phone.h b/src/framework/core/vscp_type_phone.h index 1ec387c..f6048ea 100644 --- a/src/framework/core/vscp_type_phone.h +++ b/src/framework/core/vscp_type_phone.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_type_protocol.h b/src/framework/core/vscp_type_protocol.h index fdcefe8..c742cfc 100644 --- a/src/framework/core/vscp_type_protocol.h +++ b/src/framework/core/vscp_type_protocol.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_type_remote.h b/src/framework/core/vscp_type_remote.h index 75bf6ea..3fe7f23 100644 --- a/src/framework/core/vscp_type_remote.h +++ b/src/framework/core/vscp_type_remote.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_type_security.h b/src/framework/core/vscp_type_security.h index 2980b47..4dbb09b 100644 --- a/src/framework/core/vscp_type_security.h +++ b/src/framework/core/vscp_type_security.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * @@ -241,6 +241,26 @@ extern "C" */ #define VSCP_TYPE_SECURITY_PASSWORD_ERROR 33 +/** + * ... + */ +#define VSCP_TYPE_SECURITY_GAS 34 + +/** + * ... + */ +#define VSCP_TYPE_SECURITY_IN_MOTION 35 + +/** + * ... + */ +#define VSCP_TYPE_SECURITY_NOT_IN_MOTION 36 + +/** + * ... + */ +#define VSCP_TYPE_SECURITY_VIBRATION 37 + /******************************************************************************* MACROS *******************************************************************************/ diff --git a/src/framework/core/vscp_type_setvaluezone.h b/src/framework/core/vscp_type_setvaluezone.h index 8236374..7bfdff5 100644 --- a/src/framework/core/vscp_type_setvaluezone.h +++ b/src/framework/core/vscp_type_setvaluezone.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_type_weather.h b/src/framework/core/vscp_type_weather.h index c7f2864..ea1f261 100644 --- a/src/framework/core/vscp_type_weather.h +++ b/src/framework/core/vscp_type_weather.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_type_weather_forecast.h b/src/framework/core/vscp_type_weather_forecast.h index 8762ab6..a4b24da 100644 --- a/src/framework/core/vscp_type_weather_forecast.h +++ b/src/framework/core/vscp_type_weather_forecast.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_type_wireless.h b/src/framework/core/vscp_type_wireless.h index 1d286c2..9ee04e8 100644 --- a/src/framework/core/vscp_type_wireless.h +++ b/src/framework/core/vscp_type_wireless.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_types.h b/src/framework/core/vscp_types.h index 9e0268e..525af8a 100644 --- a/src/framework/core/vscp_types.h +++ b/src/framework/core/vscp_types.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_util.c b/src/framework/core/vscp_util.c index b72f718..3cbb5b1 100644 --- a/src/framework/core/vscp_util.c +++ b/src/framework/core/vscp_util.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/core/vscp_util.h b/src/framework/core/vscp_util.h index 31b0bcb..bdfecd6 100644 --- a/src/framework/core/vscp_util.h +++ b/src/framework/core/vscp_util.h @@ -1,7 +1,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_alarm.c b/src/framework/events/vscp_evt_alarm.c index 6f2d19a..ccfec17 100644 --- a/src/framework/events/vscp_evt_alarm.c +++ b/src/framework/events/vscp_evt_alarm.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_alarm.h b/src/framework/events/vscp_evt_alarm.h index 493239c..8cbd35b 100644 --- a/src/framework/events/vscp_evt_alarm.h +++ b/src/framework/events/vscp_evt_alarm.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_aol.c b/src/framework/events/vscp_evt_aol.c index 4777505..d4e7649 100644 --- a/src/framework/events/vscp_evt_aol.c +++ b/src/framework/events/vscp_evt_aol.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_aol.h b/src/framework/events/vscp_evt_aol.h index 990a9b3..89884e9 100644 --- a/src/framework/events/vscp_evt_aol.h +++ b/src/framework/events/vscp_evt_aol.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_configuration.c b/src/framework/events/vscp_evt_configuration.c new file mode 100644 index 0000000..937f3a1 --- /dev/null +++ b/src/framework/events/vscp_evt_configuration.c @@ -0,0 +1,660 @@ +/* The MIT License (MIT) + * + * Copyright (c) 2014 - 2021, Andreas Merkle + * http://www.blue-andi.de + * vscp@blue-andi.de + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ + +/******************************************************************************* + DESCRIPTION +*******************************************************************************/ +/** +@brief Configuration +@file vscp_evt_configuration.c +@author Andreas Merkle, http://www.blue-andi.de + +@section desc Description +@see vscp_evt_configuration.h + +This file is automatically generated. Don't change it manually. + +*******************************************************************************/ + +/******************************************************************************* + INCLUDES +*******************************************************************************/ +#include "vscp_evt_configuration.h" +#include "..\core\vscp_core.h" +#include "..\core\vscp_class_l1.h" +#include "..\core\vscp_type_configuration.h" + +/******************************************************************************* + COMPILER SWITCHES +*******************************************************************************/ + +/******************************************************************************* + CONSTANTS +*******************************************************************************/ + +/******************************************************************************* + MACROS +*******************************************************************************/ + +/******************************************************************************* + TYPES AND STRUCTURES +*******************************************************************************/ + +/******************************************************************************* + VARIABLES +*******************************************************************************/ + +/******************************************************************************* + FUNCTIONS +*******************************************************************************/ + +/** + * General event + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendGeneralEvent(void) +{ + vscp_TxMessage txMsg; + + vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_CONFIGURATION, VSCP_TYPE_CONFIGURATION_GENERAL, VSCP_PRIORITY_3_NORMAL); + + txMsg.dataNum = 0; + + return vscp_core_sendEvent(&txMsg); +} + +/** + * Load configuration + * + * @param[in] index Index + * @param[in] zone Zone + * @param[in] subzone Subzone + * @param[in] configurationid Configuration Id + * @param[in] control Control byte (optional). (optional) + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendLoadConfiguration(uint8_t index, uint8_t zone, uint8_t subzone, uint16_t configurationid, uint8_t const * const control) +{ + vscp_TxMessage txMsg; + uint8_t size = 0; + + vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_CONFIGURATION, VSCP_TYPE_CONFIGURATION_LOAD, VSCP_PRIORITY_3_NORMAL); + + txMsg.data[0] = index; + size += 1; + + txMsg.data[1] = zone; + size += 1; + + txMsg.data[2] = subzone; + size += 1; + + txMsg.data[3] = (uint8_t)((configurationid >> 8) & 0xff); + txMsg.data[4] = (uint8_t)((configurationid >> 0) & 0xff); + size += 2; + + if (NULL != control) + { + txMsg.data[5] = *control; + size += 1; + } + + txMsg.dataNum = size; + + return vscp_core_sendEvent(&txMsg); +} + +/** + * Load configuration acknowledge + * + * @param[in] configurationid Configuration Id + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendLoadConfigurationAcknowledge(uint16_t configurationid) +{ + vscp_TxMessage txMsg; + uint8_t size = 0; + + vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_CONFIGURATION, VSCP_TYPE_CONFIGURATION_LOAD_ACK, VSCP_PRIORITY_3_NORMAL); + + txMsg.data[0] = (uint8_t)((configurationid >> 8) & 0xff); + txMsg.data[1] = (uint8_t)((configurationid >> 0) & 0xff); + size += 2; + + txMsg.dataNum = size; + + return vscp_core_sendEvent(&txMsg); +} + +/** + * Load configuration negative acknowledge + * + * @param[in] configurationid Configuration Id + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendLoadConfigurationNegativeAcknowledge(uint16_t configurationid) +{ + vscp_TxMessage txMsg; + uint8_t size = 0; + + vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_CONFIGURATION, VSCP_TYPE_CONFIGURATION_LOAD_NACK, VSCP_PRIORITY_3_NORMAL); + + txMsg.data[0] = (uint8_t)((configurationid >> 8) & 0xff); + txMsg.data[1] = (uint8_t)((configurationid >> 0) & 0xff); + size += 2; + + txMsg.dataNum = size; + + return vscp_core_sendEvent(&txMsg); +} + +/** + * Save configuration + * + * @param[in] index Index + * @param[in] zone Zone + * @param[in] subzone Subzone + * @param[in] configurationid Configuration Id + * @param[in] control Control byte (optional). (optional) + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendSaveConfiguration(uint8_t index, uint8_t zone, uint8_t subzone, uint16_t configurationid, uint8_t const * const control) +{ + vscp_TxMessage txMsg; + uint8_t size = 0; + + vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_CONFIGURATION, VSCP_TYPE_CONFIGURATION_SAVE, VSCP_PRIORITY_3_NORMAL); + + txMsg.data[0] = index; + size += 1; + + txMsg.data[1] = zone; + size += 1; + + txMsg.data[2] = subzone; + size += 1; + + txMsg.data[3] = (uint8_t)((configurationid >> 8) & 0xff); + txMsg.data[4] = (uint8_t)((configurationid >> 0) & 0xff); + size += 2; + + if (NULL != control) + { + txMsg.data[5] = *control; + size += 1; + } + + txMsg.dataNum = size; + + return vscp_core_sendEvent(&txMsg); +} + +/** + * Save configuration acknowledge + * + * @param[in] configurationid Configuration Id + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendSaveConfigurationAcknowledge(uint16_t configurationid) +{ + vscp_TxMessage txMsg; + uint8_t size = 0; + + vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_CONFIGURATION, VSCP_TYPE_CONFIGURATION_SAVE_ACK, VSCP_PRIORITY_3_NORMAL); + + txMsg.data[0] = (uint8_t)((configurationid >> 8) & 0xff); + txMsg.data[1] = (uint8_t)((configurationid >> 0) & 0xff); + size += 2; + + txMsg.dataNum = size; + + return vscp_core_sendEvent(&txMsg); +} + +/** + * Save configuration negative acknowledge + * + * @param[in] configurationid Configuration Id + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendSaveConfigurationNegativeAcknowledge(uint16_t configurationid) +{ + vscp_TxMessage txMsg; + uint8_t size = 0; + + vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_CONFIGURATION, VSCP_TYPE_CONFIGURATION_SAVE_NACK, VSCP_PRIORITY_3_NORMAL); + + txMsg.data[0] = (uint8_t)((configurationid >> 8) & 0xff); + txMsg.data[1] = (uint8_t)((configurationid >> 0) & 0xff); + size += 2; + + txMsg.dataNum = size; + + return vscp_core_sendEvent(&txMsg); +} + +/** + * Commit configuration + * + * @param[in] index Index + * @param[in] zone Zone + * @param[in] subzone Subzone + * @param[in] configurationid Configuration Id + * @param[in] control Control byte (optional). (optional) + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendCommitConfiguration(uint8_t index, uint8_t zone, uint8_t subzone, uint16_t configurationid, uint8_t const * const control) +{ + vscp_TxMessage txMsg; + uint8_t size = 0; + + vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_CONFIGURATION, VSCP_TYPE_CONFIGURATION_COMMIT, VSCP_PRIORITY_3_NORMAL); + + txMsg.data[0] = index; + size += 1; + + txMsg.data[1] = zone; + size += 1; + + txMsg.data[2] = subzone; + size += 1; + + txMsg.data[3] = (uint8_t)((configurationid >> 8) & 0xff); + txMsg.data[4] = (uint8_t)((configurationid >> 0) & 0xff); + size += 2; + + if (NULL != control) + { + txMsg.data[5] = *control; + size += 1; + } + + txMsg.dataNum = size; + + return vscp_core_sendEvent(&txMsg); +} + +/** + * Commit configuration acknowledge + * + * @param[in] configurationid Configuration Id + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendCommitConfigurationAcknowledge(uint16_t configurationid) +{ + vscp_TxMessage txMsg; + uint8_t size = 0; + + vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_CONFIGURATION, VSCP_TYPE_CONFIGURATION_COMMIT_ACK, VSCP_PRIORITY_3_NORMAL); + + txMsg.data[0] = (uint8_t)((configurationid >> 8) & 0xff); + txMsg.data[1] = (uint8_t)((configurationid >> 0) & 0xff); + size += 2; + + txMsg.dataNum = size; + + return vscp_core_sendEvent(&txMsg); +} + +/** + * Commit configuration negative acknowledge + * + * @param[in] configurationid Configuration Id + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendCommitConfigurationNegativeAcknowledge(uint16_t configurationid) +{ + vscp_TxMessage txMsg; + uint8_t size = 0; + + vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_CONFIGURATION, VSCP_TYPE_CONFIGURATION_COMMIT_NACK, VSCP_PRIORITY_3_NORMAL); + + txMsg.data[0] = (uint8_t)((configurationid >> 8) & 0xff); + txMsg.data[1] = (uint8_t)((configurationid >> 0) & 0xff); + size += 2; + + txMsg.dataNum = size; + + return vscp_core_sendEvent(&txMsg); +} + +/** + * Reload configuration + * + * @param[in] index Index + * @param[in] zone Zone + * @param[in] subzone Subzone + * @param[in] configurationid Configuration Id + * @param[in] control Control byte (optional). (optional) + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendReloadConfiguration(uint8_t index, uint8_t zone, uint8_t subzone, uint16_t configurationid, uint8_t const * const control) +{ + vscp_TxMessage txMsg; + uint8_t size = 0; + + vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_CONFIGURATION, VSCP_TYPE_CONFIGURATION_RELOAD, VSCP_PRIORITY_3_NORMAL); + + txMsg.data[0] = index; + size += 1; + + txMsg.data[1] = zone; + size += 1; + + txMsg.data[2] = subzone; + size += 1; + + txMsg.data[3] = (uint8_t)((configurationid >> 8) & 0xff); + txMsg.data[4] = (uint8_t)((configurationid >> 0) & 0xff); + size += 2; + + if (NULL != control) + { + txMsg.data[5] = *control; + size += 1; + } + + txMsg.dataNum = size; + + return vscp_core_sendEvent(&txMsg); +} + +/** + * Reload configuration acknowledge + * + * @param[in] configurationid Configuration Id + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendReloadConfigurationAcknowledge(uint16_t configurationid) +{ + vscp_TxMessage txMsg; + uint8_t size = 0; + + vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_CONFIGURATION, VSCP_TYPE_CONFIGURATION_REALOD_ACK, VSCP_PRIORITY_3_NORMAL); + + txMsg.data[0] = (uint8_t)((configurationid >> 8) & 0xff); + txMsg.data[1] = (uint8_t)((configurationid >> 0) & 0xff); + size += 2; + + txMsg.dataNum = size; + + return vscp_core_sendEvent(&txMsg); +} + +/** + * Reload configuration negative acknowledge + * + * @param[in] configurationid Configuration Id + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendReloadConfigurationNegativeAcknowledge(uint16_t configurationid) +{ + vscp_TxMessage txMsg; + uint8_t size = 0; + + vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_CONFIGURATION, VSCP_TYPE_CONFIGURATION_RELOAD_NACK, VSCP_PRIORITY_3_NORMAL); + + txMsg.data[0] = (uint8_t)((configurationid >> 8) & 0xff); + txMsg.data[1] = (uint8_t)((configurationid >> 0) & 0xff); + size += 2; + + txMsg.dataNum = size; + + return vscp_core_sendEvent(&txMsg); +} + +/** + * Restore configuration + * + * @param[in] index Index + * @param[in] zone Zone + * @param[in] subzone Subzone + * @param[in] configurationid Configuration Id + * @param[in] control Control byte (optional). (optional) + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendRestoreConfiguration(uint8_t index, uint8_t zone, uint8_t subzone, uint16_t configurationid, uint8_t const * const control) +{ + vscp_TxMessage txMsg; + uint8_t size = 0; + + vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_CONFIGURATION, VSCP_TYPE_CONFIGURATION_RESTORE, VSCP_PRIORITY_3_NORMAL); + + txMsg.data[0] = index; + size += 1; + + txMsg.data[1] = zone; + size += 1; + + txMsg.data[2] = subzone; + size += 1; + + txMsg.data[3] = (uint8_t)((configurationid >> 8) & 0xff); + txMsg.data[4] = (uint8_t)((configurationid >> 0) & 0xff); + size += 2; + + if (NULL != control) + { + txMsg.data[5] = *control; + size += 1; + } + + txMsg.dataNum = size; + + return vscp_core_sendEvent(&txMsg); +} + +/** + * Restore configuration acknowledge + * + * @param[in] configurationid Configuration Id + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendRestoreConfigurationAcknowledge(uint16_t configurationid) +{ + vscp_TxMessage txMsg; + uint8_t size = 0; + + vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_CONFIGURATION, VSCP_TYPE_CONFIGURATION_RESTORE_ACK, VSCP_PRIORITY_3_NORMAL); + + txMsg.data[0] = (uint8_t)((configurationid >> 8) & 0xff); + txMsg.data[1] = (uint8_t)((configurationid >> 0) & 0xff); + size += 2; + + txMsg.dataNum = size; + + return vscp_core_sendEvent(&txMsg); +} + +/** + * Restore configuration negative acknowledge + * + * @param[in] configurationid Configuration Id + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendRestoreConfigurationNegativeAcknowledge(uint16_t configurationid) +{ + vscp_TxMessage txMsg; + uint8_t size = 0; + + vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_CONFIGURATION, VSCP_TYPE_CONFIGURATION_RESTORE_NACK, VSCP_PRIORITY_3_NORMAL); + + txMsg.data[0] = (uint8_t)((configurationid >> 8) & 0xff); + txMsg.data[1] = (uint8_t)((configurationid >> 0) & 0xff); + size += 2; + + txMsg.dataNum = size; + + return vscp_core_sendEvent(&txMsg); +} + +/** + * Set parameter + * + * @param[in] index Index + * @param[in] zone Zone + * @param[in] subzone Subzone + * @param[in] parameterid Parameter Id + * @param[in] parametervalue Parameter value + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendSetParameter(uint8_t index, uint8_t zone, uint8_t subzone, uint16_t parameterid, uint16_t parametervalue) +{ + vscp_TxMessage txMsg; + uint8_t size = 0; + + vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_CONFIGURATION, VSCP_TYPE_CONFIGURATION_SET_PARAMETER, VSCP_PRIORITY_3_NORMAL); + + txMsg.data[0] = index; + size += 1; + + txMsg.data[1] = zone; + size += 1; + + txMsg.data[2] = subzone; + size += 1; + + txMsg.data[3] = (uint8_t)((parameterid >> 8) & 0xff); + txMsg.data[4] = (uint8_t)((parameterid >> 0) & 0xff); + size += 2; + + txMsg.data[5] = (uint8_t)((parametervalue >> 8) & 0xff); + txMsg.data[6] = (uint8_t)((parametervalue >> 0) & 0xff); + size += 2; + + txMsg.dataNum = size; + + return vscp_core_sendEvent(&txMsg); +} + +/** + * Set parameter to default + * + * @param[in] index Index + * @param[in] zone Zone + * @param[in] subzone Subzone + * @param[in] parameterid Parameter Id + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendSetParameterToDefault(uint8_t index, uint8_t zone, uint8_t subzone, uint16_t parameterid) +{ + vscp_TxMessage txMsg; + uint8_t size = 0; + + vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_CONFIGURATION, VSCP_TYPE_CONFIGURATION_SET_PARAMETER_DEFAULT, VSCP_PRIORITY_3_NORMAL); + + txMsg.data[0] = index; + size += 1; + + txMsg.data[1] = zone; + size += 1; + + txMsg.data[2] = subzone; + size += 1; + + txMsg.data[3] = (uint8_t)((parameterid >> 8) & 0xff); + txMsg.data[4] = (uint8_t)((parameterid >> 0) & 0xff); + size += 2; + + txMsg.dataNum = size; + + return vscp_core_sendEvent(&txMsg); +} + +/** + * Set parameter acknowledge + * + * @param[in] parameterid Parameter Id + * @param[in] parametervalue Parameter value + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendSetParameterAcknowledge(uint16_t parameterid, uint16_t parametervalue) +{ + vscp_TxMessage txMsg; + uint8_t size = 0; + + vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_CONFIGURATION, VSCP_TYPE_CONFIGURATION_SET_PARAMETER_ACK, VSCP_PRIORITY_3_NORMAL); + + txMsg.data[0] = (uint8_t)((parameterid >> 8) & 0xff); + txMsg.data[1] = (uint8_t)((parameterid >> 0) & 0xff); + size += 2; + + txMsg.data[2] = (uint8_t)((parametervalue >> 8) & 0xff); + txMsg.data[3] = (uint8_t)((parametervalue >> 0) & 0xff); + size += 2; + + txMsg.dataNum = size; + + return vscp_core_sendEvent(&txMsg); +} + +/** + * Set paramter negative acknowledge + * + * @param[in] parameterid Parameter Id + * @param[in] parametervalue Parameter value + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendSetParamterNegativeAcknowledge(uint16_t parameterid, uint16_t parametervalue) +{ + vscp_TxMessage txMsg; + uint8_t size = 0; + + vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_CONFIGURATION, VSCP_TYPE_CONFIGURATION_SET_PARAMETER_NACK, VSCP_PRIORITY_3_NORMAL); + + txMsg.data[0] = (uint8_t)((parameterid >> 8) & 0xff); + txMsg.data[1] = (uint8_t)((parameterid >> 0) & 0xff); + size += 2; + + txMsg.data[2] = (uint8_t)((parametervalue >> 8) & 0xff); + txMsg.data[3] = (uint8_t)((parametervalue >> 0) & 0xff); + size += 2; + + txMsg.dataNum = size; + + return vscp_core_sendEvent(&txMsg); +} + diff --git a/src/framework/events/vscp_evt_configuration.h b/src/framework/events/vscp_evt_configuration.h new file mode 100644 index 0000000..27837c4 --- /dev/null +++ b/src/framework/events/vscp_evt_configuration.h @@ -0,0 +1,282 @@ +/* The MIT License (MIT) + * + * Copyright (c) 2014 - 2021, Andreas Merkle + * http://www.blue-andi.de + * vscp@blue-andi.de + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ + +/******************************************************************************* + DESCRIPTION +*******************************************************************************/ +/** +@brief Configuration +@file vscp_evt_configuration.h +@author Andreas Merkle, http://www.blue-andi.de + +@section desc Description +Events for configuration of sets and parameters on nodes without register manipulation. + +This file is automatically generated. Don't change it manually. + +*******************************************************************************/ + +#ifndef __VSCP_EVT_CONFIGURATION_H__ +#define __VSCP_EVT_CONFIGURATION_H__ + +/******************************************************************************* + INCLUDES +*******************************************************************************/ +#include +#include "..\user\vscp_platform.h" + +/******************************************************************************* + COMPILER SWITCHES +*******************************************************************************/ + +/******************************************************************************* + CONSTANTS +*******************************************************************************/ + +/******************************************************************************* + MACROS +*******************************************************************************/ + +/******************************************************************************* + TYPES AND STRUCTURES +*******************************************************************************/ + +/******************************************************************************* + VARIABLES +*******************************************************************************/ + +/******************************************************************************* + FUNCTIONS +*******************************************************************************/ + +/** + * General event + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendGeneralEvent(void); + +/** + * Load configuration + * + * @param[in] index Index + * @param[in] zone Zone + * @param[in] subzone Subzone + * @param[in] configurationid Configuration Id + * @param[in] control Control byte (optional). (optional) + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendLoadConfiguration(uint8_t index, uint8_t zone, uint8_t subzone, uint16_t configurationid, uint8_t const * const control); + +/** + * Load configuration acknowledge + * + * @param[in] configurationid Configuration Id + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendLoadConfigurationAcknowledge(uint16_t configurationid); + +/** + * Load configuration negative acknowledge + * + * @param[in] configurationid Configuration Id + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendLoadConfigurationNegativeAcknowledge(uint16_t configurationid); + +/** + * Save configuration + * + * @param[in] index Index + * @param[in] zone Zone + * @param[in] subzone Subzone + * @param[in] configurationid Configuration Id + * @param[in] control Control byte (optional). (optional) + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendSaveConfiguration(uint8_t index, uint8_t zone, uint8_t subzone, uint16_t configurationid, uint8_t const * const control); + +/** + * Save configuration acknowledge + * + * @param[in] configurationid Configuration Id + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendSaveConfigurationAcknowledge(uint16_t configurationid); + +/** + * Save configuration negative acknowledge + * + * @param[in] configurationid Configuration Id + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendSaveConfigurationNegativeAcknowledge(uint16_t configurationid); + +/** + * Commit configuration + * + * @param[in] index Index + * @param[in] zone Zone + * @param[in] subzone Subzone + * @param[in] configurationid Configuration Id + * @param[in] control Control byte (optional). (optional) + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendCommitConfiguration(uint8_t index, uint8_t zone, uint8_t subzone, uint16_t configurationid, uint8_t const * const control); + +/** + * Commit configuration acknowledge + * + * @param[in] configurationid Configuration Id + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendCommitConfigurationAcknowledge(uint16_t configurationid); + +/** + * Commit configuration negative acknowledge + * + * @param[in] configurationid Configuration Id + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendCommitConfigurationNegativeAcknowledge(uint16_t configurationid); + +/** + * Reload configuration + * + * @param[in] index Index + * @param[in] zone Zone + * @param[in] subzone Subzone + * @param[in] configurationid Configuration Id + * @param[in] control Control byte (optional). (optional) + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendReloadConfiguration(uint8_t index, uint8_t zone, uint8_t subzone, uint16_t configurationid, uint8_t const * const control); + +/** + * Reload configuration acknowledge + * + * @param[in] configurationid Configuration Id + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendReloadConfigurationAcknowledge(uint16_t configurationid); + +/** + * Reload configuration negative acknowledge + * + * @param[in] configurationid Configuration Id + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendReloadConfigurationNegativeAcknowledge(uint16_t configurationid); + +/** + * Restore configuration + * + * @param[in] index Index + * @param[in] zone Zone + * @param[in] subzone Subzone + * @param[in] configurationid Configuration Id + * @param[in] control Control byte (optional). (optional) + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendRestoreConfiguration(uint8_t index, uint8_t zone, uint8_t subzone, uint16_t configurationid, uint8_t const * const control); + +/** + * Restore configuration acknowledge + * + * @param[in] configurationid Configuration Id + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendRestoreConfigurationAcknowledge(uint16_t configurationid); + +/** + * Restore configuration negative acknowledge + * + * @param[in] configurationid Configuration Id + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendRestoreConfigurationNegativeAcknowledge(uint16_t configurationid); + +/** + * Set parameter + * + * @param[in] index Index + * @param[in] zone Zone + * @param[in] subzone Subzone + * @param[in] parameterid Parameter Id + * @param[in] parametervalue Parameter value + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendSetParameter(uint8_t index, uint8_t zone, uint8_t subzone, uint16_t parameterid, uint16_t parametervalue); + +/** + * Set parameter to default + * + * @param[in] index Index + * @param[in] zone Zone + * @param[in] subzone Subzone + * @param[in] parameterid Parameter Id + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendSetParameterToDefault(uint8_t index, uint8_t zone, uint8_t subzone, uint16_t parameterid); + +/** + * Set parameter acknowledge + * + * @param[in] parameterid Parameter Id + * @param[in] parametervalue Parameter value + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendSetParameterAcknowledge(uint16_t parameterid, uint16_t parametervalue); + +/** + * Set paramter negative acknowledge + * + * @param[in] parameterid Parameter Id + * @param[in] parametervalue Parameter value + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_configuration_sendSetParamterNegativeAcknowledge(uint16_t parameterid, uint16_t parametervalue); + +#endif /* __VSCP_EVT_CONFIGURATION_H__ */ diff --git a/src/framework/events/vscp_evt_control.c b/src/framework/events/vscp_evt_control.c index 54a6759..5fed94a 100644 --- a/src/framework/events/vscp_evt_control.c +++ b/src/framework/events/vscp_evt_control.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * @@ -1728,3 +1728,101 @@ extern BOOL vscp_evt_control_sendRequestNewSecurityToken(uint8_t reserved, uint8 return vscp_core_sendEvent(&txMsg); } +/** + * Increment + * + * @param[in] userSpecific User specific value. + * @param[in] zone Zone for which event applies to (0-255). 255 is all zones + * @param[in] subzone Sub-zone for which event applies to (0-255). 255 is all sub-zones + * @param[in] incrementValue Increment as unsigned integer. The range can be adjusted by the user by + * sending just the needed number of bytes (1-5) which form the unsigned integer (MSB first). If + * omitted (or 0) 1 is assumed as default increment value (optional) (array[5]) + * @param[in] incrementValuesize Size in byte. + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_control_sendIncrement(uint8_t userSpecific, uint8_t zone, uint8_t subzone, uint8_t const * const incrementValue, uint8_t incrementValueSize) +{ + vscp_TxMessage txMsg; + uint8_t size = 0; + uint8_t byteIndex = 0; + + vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_CONTROL, VSCP_TYPE_CONTROL_INCREMENT, VSCP_PRIORITY_3_NORMAL); + + txMsg.data[0] = userSpecific; + size += 1; + + txMsg.data[1] = zone; + size += 1; + + txMsg.data[2] = subzone; + size += 1; + + if (NULL != incrementValue) + { + for(byteIndex = 0; byteIndex < incrementValueSize; ++byteIndex) + { + txMsg.data[3 + byteIndex] = incrementValue[byteIndex]; + size += 1; + + if (VSCP_L1_DATA_SIZE <= size) + { + break; + } + } + } + + txMsg.dataNum = size; + + return vscp_core_sendEvent(&txMsg); +} + +/** + * Decrement + * + * @param[in] userSpecific User specific value. + * @param[in] zone Zone for which event applies to (0-255). 255 is all zones + * @param[in] subzone Sub-zone for which event applies to (0-255). 255 is all sub-zones + * @param[in] decrementValue Decrement as unsigned integer. The range can be adjusted by the user by + * sending just the needed number of bytes (1-5) which form the unsigned integer (MSB first). If + * omitted (or 0) 1 is assumed as default decrement value (optional) (array[5]) + * @param[in] decrementValuesize Size in byte. + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_control_sendDecrement(uint8_t userSpecific, uint8_t zone, uint8_t subzone, uint8_t const * const decrementValue, uint8_t decrementValueSize) +{ + vscp_TxMessage txMsg; + uint8_t size = 0; + uint8_t byteIndex = 0; + + vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_CONTROL, VSCP_TYPE_CONTROL_DECREMENT, VSCP_PRIORITY_3_NORMAL); + + txMsg.data[0] = userSpecific; + size += 1; + + txMsg.data[1] = zone; + size += 1; + + txMsg.data[2] = subzone; + size += 1; + + if (NULL != decrementValue) + { + for(byteIndex = 0; byteIndex < decrementValueSize; ++byteIndex) + { + txMsg.data[3 + byteIndex] = decrementValue[byteIndex]; + size += 1; + + if (VSCP_L1_DATA_SIZE <= size) + { + break; + } + } + } + + txMsg.dataNum = size; + + return vscp_core_sendEvent(&txMsg); +} + diff --git a/src/framework/events/vscp_evt_control.h b/src/framework/events/vscp_evt_control.h index e269c04..f823f63 100644 --- a/src/framework/events/vscp_evt_control.h +++ b/src/framework/events/vscp_evt_control.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * @@ -655,4 +655,34 @@ extern BOOL vscp_evt_control_sendSetSecurityToken(uint8_t reserved, uint8_t zone */ extern BOOL vscp_evt_control_sendRequestNewSecurityToken(uint8_t reserved, uint8_t zone, uint8_t subZone); +/** + * Increment + * + * @param[in] userSpecific User specific value. + * @param[in] zone Zone for which event applies to (0-255). 255 is all zones + * @param[in] subzone Sub-zone for which event applies to (0-255). 255 is all sub-zones + * @param[in] incrementValue Increment as unsigned integer. The range can be adjusted by the user by + * sending just the needed number of bytes (1-5) which form the unsigned integer (MSB first). If + * omitted (or 0) 1 is assumed as default increment value (optional) (array[5]) + * @param[in] incrementValuesize Size in byte. + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_control_sendIncrement(uint8_t userSpecific, uint8_t zone, uint8_t subzone, uint8_t const * const incrementValue, uint8_t incrementValueSize); + +/** + * Decrement + * + * @param[in] userSpecific User specific value. + * @param[in] zone Zone for which event applies to (0-255). 255 is all zones + * @param[in] subzone Sub-zone for which event applies to (0-255). 255 is all sub-zones + * @param[in] decrementValue Decrement as unsigned integer. The range can be adjusted by the user by + * sending just the needed number of bytes (1-5) which form the unsigned integer (MSB first). If + * omitted (or 0) 1 is assumed as default decrement value (optional) (array[5]) + * @param[in] decrementValuesize Size in byte. + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_control_sendDecrement(uint8_t userSpecific, uint8_t zone, uint8_t subzone, uint8_t const * const decrementValue, uint8_t decrementValueSize); + #endif /* __VSCP_EVT_CONTROL_H__ */ diff --git a/src/framework/events/vscp_evt_data.c b/src/framework/events/vscp_evt_data.c index e75cd22..8e0e05c 100644 --- a/src/framework/events/vscp_evt_data.c +++ b/src/framework/events/vscp_evt_data.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_data.h b/src/framework/events/vscp_evt_data.h index 4cc5ef2..a6ba8ae 100644 --- a/src/framework/events/vscp_evt_data.h +++ b/src/framework/events/vscp_evt_data.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_diagnostic.c b/src/framework/events/vscp_evt_diagnostic.c index 41695f3..2f794ad 100644 --- a/src/framework/events/vscp_evt_diagnostic.c +++ b/src/framework/events/vscp_evt_diagnostic.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * @@ -3879,3 +3879,99 @@ extern BOOL vscp_evt_diagnostic_sendExternalIcFailure(uint8_t index, uint8_t zon return vscp_core_sendEvent(&txMsg); } +/** + * Overvoltage + * + * @param[in] index Index. Often used as an index for channels/subdevices within a module. + * @param[in] zone Zone for which event applies to (0-255). 255 is all zones. + * @param[in] subZone Sub-zone for which event applies to (0-255). 255 is all sub-zones. + * @param[in] user Can be present or not be present. If present the bytes give additional user + * specific information. (optional) (array[5]) + * @param[in] usersize Size in byte. + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_diagnostic_sendChargingOn(uint8_t index, uint8_t zone, uint8_t subZone, uint8_t const * const user, uint8_t userSize) +{ + vscp_TxMessage txMsg; + uint8_t size = 0; + uint8_t byteIndex = 0; + + vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_DIAGNOSTIC, VSCP_TYPE_DIAGNOSTIC_CHARGING_ON, VSCP_PRIORITY_3_NORMAL); + + txMsg.data[0] = index; + size += 1; + + txMsg.data[1] = zone; + size += 1; + + txMsg.data[2] = subZone; + size += 1; + + if (NULL != user) + { + for(byteIndex = 0; byteIndex < userSize; ++byteIndex) + { + txMsg.data[3 + byteIndex] = user[byteIndex]; + size += 1; + + if (VSCP_L1_DATA_SIZE <= size) + { + break; + } + } + } + + txMsg.dataNum = size; + + return vscp_core_sendEvent(&txMsg); +} + +/** + * Overvoltage + * + * @param[in] index Index. Often used as an index for channels/subdevices within a module. + * @param[in] zone Zone for which event applies to (0-255). 255 is all zones. + * @param[in] subZone Sub-zone for which event applies to (0-255). 255 is all sub-zones. + * @param[in] user Can be present or not be present. If present the bytes give additional user + * specific information. (optional) (array[5]) + * @param[in] usersize Size in byte. + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_diagnostic_sendChargingOff(uint8_t index, uint8_t zone, uint8_t subZone, uint8_t const * const user, uint8_t userSize) +{ + vscp_TxMessage txMsg; + uint8_t size = 0; + uint8_t byteIndex = 0; + + vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_DIAGNOSTIC, VSCP_TYPE_DIAGNOSTIC_CHARGING_OFF, VSCP_PRIORITY_3_NORMAL); + + txMsg.data[0] = index; + size += 1; + + txMsg.data[1] = zone; + size += 1; + + txMsg.data[2] = subZone; + size += 1; + + if (NULL != user) + { + for(byteIndex = 0; byteIndex < userSize; ++byteIndex) + { + txMsg.data[3 + byteIndex] = user[byteIndex]; + size += 1; + + if (VSCP_L1_DATA_SIZE <= size) + { + break; + } + } + } + + txMsg.dataNum = size; + + return vscp_core_sendEvent(&txMsg); +} + diff --git a/src/framework/events/vscp_evt_diagnostic.h b/src/framework/events/vscp_evt_diagnostic.h index 1d07276..0952522 100644 --- a/src/framework/events/vscp_evt_diagnostic.h +++ b/src/framework/events/vscp_evt_diagnostic.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * @@ -1185,4 +1185,32 @@ extern BOOL vscp_evt_diagnostic_sendReceiptionFailure(uint8_t index, uint8_t zon */ extern BOOL vscp_evt_diagnostic_sendExternalIcFailure(uint8_t index, uint8_t zone, uint8_t subZone, uint8_t const * const user, uint8_t userSize); +/** + * Overvoltage + * + * @param[in] index Index. Often used as an index for channels/subdevices within a module. + * @param[in] zone Zone for which event applies to (0-255). 255 is all zones. + * @param[in] subZone Sub-zone for which event applies to (0-255). 255 is all sub-zones. + * @param[in] user Can be present or not be present. If present the bytes give additional user + * specific information. (optional) (array[5]) + * @param[in] usersize Size in byte. + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_diagnostic_sendChargingOn(uint8_t index, uint8_t zone, uint8_t subZone, uint8_t const * const user, uint8_t userSize); + +/** + * Overvoltage + * + * @param[in] index Index. Often used as an index for channels/subdevices within a module. + * @param[in] zone Zone for which event applies to (0-255). 255 is all zones. + * @param[in] subZone Sub-zone for which event applies to (0-255). 255 is all sub-zones. + * @param[in] user Can be present or not be present. If present the bytes give additional user + * specific information. (optional) (array[5]) + * @param[in] usersize Size in byte. + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_diagnostic_sendChargingOff(uint8_t index, uint8_t zone, uint8_t subZone, uint8_t const * const user, uint8_t userSize); + #endif /* __VSCP_EVT_DIAGNOSTIC_H__ */ diff --git a/src/framework/events/vscp_evt_display.c b/src/framework/events/vscp_evt_display.c index 9129e95..3b95704 100644 --- a/src/framework/events/vscp_evt_display.c +++ b/src/framework/events/vscp_evt_display.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_display.h b/src/framework/events/vscp_evt_display.h index a3af2ac..c822bd0 100644 --- a/src/framework/events/vscp_evt_display.h +++ b/src/framework/events/vscp_evt_display.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_error.c b/src/framework/events/vscp_evt_error.c index 2fbd323..638ed06 100644 --- a/src/framework/events/vscp_evt_error.c +++ b/src/framework/events/vscp_evt_error.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_error.h b/src/framework/events/vscp_evt_error.h index 0f1919f..897892d 100644 --- a/src/framework/events/vscp_evt_error.h +++ b/src/framework/events/vscp_evt_error.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_gnss.c b/src/framework/events/vscp_evt_gnss.c index dc29f45..12e8778 100644 --- a/src/framework/events/vscp_evt_gnss.c +++ b/src/framework/events/vscp_evt_gnss.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_gnss.h b/src/framework/events/vscp_evt_gnss.h index 3da877b..a158032 100644 --- a/src/framework/events/vscp_evt_gnss.h +++ b/src/framework/events/vscp_evt_gnss.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * @@ -47,7 +47,7 @@ This file is automatically generated. Don't change it manually. INCLUDES *******************************************************************************/ #include -#include "vscp_platform.h" +#include "..\user\vscp_platform.h" #include /******************************************************************************* diff --git a/src/framework/events/vscp_evt_information.c b/src/framework/events/vscp_evt_information.c index f572fd6..13f32fd 100644 --- a/src/framework/events/vscp_evt_information.c +++ b/src/framework/events/vscp_evt_information.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * @@ -2838,3 +2838,99 @@ extern BOOL vscp_evt_information_sendExit(uint8_t index, uint8_t zone, uint8_t s return vscp_core_sendEvent(&txMsg); } +/** + * Incremented + * + * @param[in] userSpecific User specific. + * @param[in] zone Zone for which event applies to (0-255). 255 is all zones + * @param[in] subzone Sub-zone for which event applies to (0-255). 255 is all sub-zones + * @param[in] incrementedValue Incremented value. The range can be adjusted by the user by sending + * just the needed number of bytes 1-5 (optional) (array[5]) + * @param[in] incrementedValuesize Size in byte. + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_information_sendIncremented(uint8_t userSpecific, uint8_t zone, uint8_t subzone, uint8_t const * const incrementedValue, uint8_t incrementedValueSize) +{ + vscp_TxMessage txMsg; + uint8_t size = 0; + uint8_t byteIndex = 0; + + vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_INFORMATION, VSCP_TYPE_INFORMATION_INCREMENTED, VSCP_PRIORITY_3_NORMAL); + + txMsg.data[0] = userSpecific; + size += 1; + + txMsg.data[1] = zone; + size += 1; + + txMsg.data[2] = subzone; + size += 1; + + if (NULL != incrementedValue) + { + for(byteIndex = 0; byteIndex < incrementedValueSize; ++byteIndex) + { + txMsg.data[3 + byteIndex] = incrementedValue[byteIndex]; + size += 1; + + if (VSCP_L1_DATA_SIZE <= size) + { + break; + } + } + } + + txMsg.dataNum = size; + + return vscp_core_sendEvent(&txMsg); +} + +/** + * Decremented + * + * @param[in] userSpecific User specific. + * @param[in] zone Zone for which event applies to (0-255). 255 is all zones + * @param[in] subzone Sub-zone for which event applies to (0-255). 255 is all sub-zones + * @param[in] decrementedValue Decremented value. The range can be adjusted by the user by sending + * just the needed number of bytes 1-5 (optional) (array[5]) + * @param[in] decrementedValuesize Size in byte. + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_information_sendDecremented(uint8_t userSpecific, uint8_t zone, uint8_t subzone, uint8_t const * const decrementedValue, uint8_t decrementedValueSize) +{ + vscp_TxMessage txMsg; + uint8_t size = 0; + uint8_t byteIndex = 0; + + vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_INFORMATION, VSCP_TYPE_INFORMATION_DECREMENTED, VSCP_PRIORITY_3_NORMAL); + + txMsg.data[0] = userSpecific; + size += 1; + + txMsg.data[1] = zone; + size += 1; + + txMsg.data[2] = subzone; + size += 1; + + if (NULL != decrementedValue) + { + for(byteIndex = 0; byteIndex < decrementedValueSize; ++byteIndex) + { + txMsg.data[3 + byteIndex] = decrementedValue[byteIndex]; + size += 1; + + if (VSCP_L1_DATA_SIZE <= size) + { + break; + } + } + } + + txMsg.dataNum = size; + + return vscp_core_sendEvent(&txMsg); +} + diff --git a/src/framework/events/vscp_evt_information.h b/src/framework/events/vscp_evt_information.h index bf13e5e..b2dbc0f 100644 --- a/src/framework/events/vscp_evt_information.h +++ b/src/framework/events/vscp_evt_information.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * @@ -1053,4 +1053,32 @@ extern BOOL vscp_evt_information_sendEnter(uint8_t index, uint8_t zone, uint8_t */ extern BOOL vscp_evt_information_sendExit(uint8_t index, uint8_t zone, uint8_t subZone); +/** + * Incremented + * + * @param[in] userSpecific User specific. + * @param[in] zone Zone for which event applies to (0-255). 255 is all zones + * @param[in] subzone Sub-zone for which event applies to (0-255). 255 is all sub-zones + * @param[in] incrementedValue Incremented value. The range can be adjusted by the user by sending + * just the needed number of bytes 1-5 (optional) (array[5]) + * @param[in] incrementedValuesize Size in byte. + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_information_sendIncremented(uint8_t userSpecific, uint8_t zone, uint8_t subzone, uint8_t const * const incrementedValue, uint8_t incrementedValueSize); + +/** + * Decremented + * + * @param[in] userSpecific User specific. + * @param[in] zone Zone for which event applies to (0-255). 255 is all zones + * @param[in] subzone Sub-zone for which event applies to (0-255). 255 is all sub-zones + * @param[in] decrementedValue Decremented value. The range can be adjusted by the user by sending + * just the needed number of bytes 1-5 (optional) (array[5]) + * @param[in] decrementedValuesize Size in byte. + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_information_sendDecremented(uint8_t userSpecific, uint8_t zone, uint8_t subzone, uint8_t const * const decrementedValue, uint8_t decrementedValueSize); + #endif /* __VSCP_EVT_INFORMATION_H__ */ diff --git a/src/framework/events/vscp_evt_ir.c b/src/framework/events/vscp_evt_ir.c index 23321c8..d324a95 100644 --- a/src/framework/events/vscp_evt_ir.c +++ b/src/framework/events/vscp_evt_ir.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_ir.h b/src/framework/events/vscp_evt_ir.h index f5fe2df..627cbcb 100644 --- a/src/framework/events/vscp_evt_ir.h +++ b/src/framework/events/vscp_evt_ir.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_log.c b/src/framework/events/vscp_evt_log.c index ee7bcc9..af6ac5f 100644 --- a/src/framework/events/vscp_evt_log.c +++ b/src/framework/events/vscp_evt_log.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_log.h b/src/framework/events/vscp_evt_log.h index 7acf39d..426ee63 100644 --- a/src/framework/events/vscp_evt_log.h +++ b/src/framework/events/vscp_evt_log.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_measurement.c b/src/framework/events/vscp_evt_measurement.c index 6ce23a0..bbf282d 100644 --- a/src/framework/events/vscp_evt_measurement.c +++ b/src/framework/events/vscp_evt_measurement.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * @@ -1484,3 +1484,75 @@ extern BOOL vscp_evt_measurement_sendSoundLevel(uint8_t index, uint8_t unit, int return vscp_core_sendEvent(&txMsg); } +/** + * Count + * + * @param[in] index Index for sensor. + * @param[in] unit The unit of the data. + * @param[in] data The data as signed integer. + * @param[in] exp The exponent of the data (10^exponent). + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_measurement_sendRadiationDoseEquivalent(uint8_t index, uint8_t unit, int32_t data, int8_t exp) +{ + vscp_TxMessage txMsg; + + vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_MEASUREMENT, VSCP_TYPE_MEASUREMENT_RADIATION_DOSE_EQ, VSCP_PRIORITY_3_NORMAL); + + txMsg.dataNum = 1; + txMsg.data[0] = vscp_data_coding_getFormatByte(VSCP_DATA_CODING_REPRESENTATION_NORMALIZED_INTEGER, unit, index); + + txMsg.dataNum += vscp_data_coding_int32ToNormalizedInteger(data, exp, &txMsg.data[1], VSCP_L1_DATA_SIZE - txMsg.dataNum); + + return vscp_core_sendEvent(&txMsg); +} + +/** + * Count + * + * @param[in] index Index for sensor. + * @param[in] unit The unit of the data. + * @param[in] data The data as signed integer. + * @param[in] exp The exponent of the data (10^exponent). + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_measurement_sendRadiationDoseExposure(uint8_t index, uint8_t unit, int32_t data, int8_t exp) +{ + vscp_TxMessage txMsg; + + vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_MEASUREMENT, VSCP_TYPE_MEASUREMENT_RADIATION_DOSE_EXPOSURE, VSCP_PRIORITY_3_NORMAL); + + txMsg.dataNum = 1; + txMsg.data[0] = vscp_data_coding_getFormatByte(VSCP_DATA_CODING_REPRESENTATION_NORMALIZED_INTEGER, unit, index); + + txMsg.dataNum += vscp_data_coding_int32ToNormalizedInteger(data, exp, &txMsg.data[1], VSCP_L1_DATA_SIZE - txMsg.dataNum); + + return vscp_core_sendEvent(&txMsg); +} + +/** + * Count + * + * @param[in] index Index for sensor. + * @param[in] unit The unit of the data. + * @param[in] data The data as signed integer. + * @param[in] exp The exponent of the data (10^exponent). + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_measurement_sendPowerFactor(uint8_t index, uint8_t unit, int32_t data, int8_t exp) +{ + vscp_TxMessage txMsg; + + vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_MEASUREMENT, VSCP_TYPE_MEASUREMENT_POWER_FACTOR, VSCP_PRIORITY_3_NORMAL); + + txMsg.dataNum = 1; + txMsg.data[0] = vscp_data_coding_getFormatByte(VSCP_DATA_CODING_REPRESENTATION_NORMALIZED_INTEGER, unit, index); + + txMsg.dataNum += vscp_data_coding_int32ToNormalizedInteger(data, exp, &txMsg.data[1], VSCP_L1_DATA_SIZE - txMsg.dataNum); + + return vscp_core_sendEvent(&txMsg); +} + diff --git a/src/framework/events/vscp_evt_measurement.h b/src/framework/events/vscp_evt_measurement.h index 23ad5e5..9f41c3e 100644 --- a/src/framework/events/vscp_evt_measurement.h +++ b/src/framework/events/vscp_evt_measurement.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * @@ -781,4 +781,40 @@ extern BOOL vscp_evt_measurement_sendSoundEnergyDensity(uint8_t index, uint8_t u */ extern BOOL vscp_evt_measurement_sendSoundLevel(uint8_t index, uint8_t unit, int32_t data, int8_t exp); +/** + * Count + * + * @param[in] index Index for sensor. + * @param[in] unit The unit of the data. + * @param[in] data The data as signed integer. + * @param[in] exp The exponent of the data (10^exponent). + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_measurement_sendRadiationDoseEquivalent(uint8_t index, uint8_t unit, int32_t data, int8_t exp); + +/** + * Count + * + * @param[in] index Index for sensor. + * @param[in] unit The unit of the data. + * @param[in] data The data as signed integer. + * @param[in] exp The exponent of the data (10^exponent). + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_measurement_sendRadiationDoseExposure(uint8_t index, uint8_t unit, int32_t data, int8_t exp); + +/** + * Count + * + * @param[in] index Index for sensor. + * @param[in] unit The unit of the data. + * @param[in] data The data as signed integer. + * @param[in] exp The exponent of the data (10^exponent). + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_measurement_sendPowerFactor(uint8_t index, uint8_t unit, int32_t data, int8_t exp); + #endif /* __VSCP_EVT_MEASUREMENT_H__ */ diff --git a/src/framework/events/vscp_evt_measurement32.c b/src/framework/events/vscp_evt_measurement32.c index f0f00a9..6977028 100644 --- a/src/framework/events/vscp_evt_measurement32.c +++ b/src/framework/events/vscp_evt_measurement32.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_measurement32.h b/src/framework/events/vscp_evt_measurement32.h index 5557578..4166605 100644 --- a/src/framework/events/vscp_evt_measurement32.h +++ b/src/framework/events/vscp_evt_measurement32.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_measurement64.c b/src/framework/events/vscp_evt_measurement64.c index e343618..03e83c3 100644 --- a/src/framework/events/vscp_evt_measurement64.c +++ b/src/framework/events/vscp_evt_measurement64.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_measurement64.h b/src/framework/events/vscp_evt_measurement64.h index c97f1ee..70deeaf 100644 --- a/src/framework/events/vscp_evt_measurement64.h +++ b/src/framework/events/vscp_evt_measurement64.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_measurezone.c b/src/framework/events/vscp_evt_measurezone.c index b8c2354..fc69057 100644 --- a/src/framework/events/vscp_evt_measurezone.c +++ b/src/framework/events/vscp_evt_measurezone.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_measurezone.h b/src/framework/events/vscp_evt_measurezone.h index 929e2d0..86e656c 100644 --- a/src/framework/events/vscp_evt_measurezone.h +++ b/src/framework/events/vscp_evt_measurezone.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_multimedia.c b/src/framework/events/vscp_evt_multimedia.c index 8b5e5be..8686580 100644 --- a/src/framework/events/vscp_evt_multimedia.c +++ b/src/framework/events/vscp_evt_multimedia.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_multimedia.h b/src/framework/events/vscp_evt_multimedia.h index 9a351cf..d6d1fe4 100644 --- a/src/framework/events/vscp_evt_multimedia.h +++ b/src/framework/events/vscp_evt_multimedia.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_phone.c b/src/framework/events/vscp_evt_phone.c index b3ddac9..a650fb6 100644 --- a/src/framework/events/vscp_evt_phone.c +++ b/src/framework/events/vscp_evt_phone.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_phone.h b/src/framework/events/vscp_evt_phone.h index 061e316..86b3770 100644 --- a/src/framework/events/vscp_evt_phone.h +++ b/src/framework/events/vscp_evt_phone.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_protocol.c b/src/framework/events/vscp_evt_protocol.c index 08a6efc..db46546 100644 --- a/src/framework/events/vscp_evt_protocol.c +++ b/src/framework/events/vscp_evt_protocol.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_protocol.h b/src/framework/events/vscp_evt_protocol.h index e8a56c9..05d68d4 100644 --- a/src/framework/events/vscp_evt_protocol.h +++ b/src/framework/events/vscp_evt_protocol.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_security.c b/src/framework/events/vscp_evt_security.c index 0bc8f51..18d25f5 100644 --- a/src/framework/events/vscp_evt_security.c +++ b/src/framework/events/vscp_evt_security.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * @@ -93,10 +93,11 @@ extern BOOL vscp_evt_security_sendGeneralEvent(void) * @param[in] userData User defined data. * @param[in] zone Zone for which event applies to (0-255). 255 is all zones. * @param[in] subZone Sub-zone for which event applies to (0-255). 255 is all sub-zones. + * @param[in] status Optional status (optional) * * @return If event is sent, it will return TRUE otherwise FALSE. */ -extern BOOL vscp_evt_security_sendMotionDetect(uint8_t userData, uint8_t zone, uint8_t subZone) +extern BOOL vscp_evt_security_sendMotionDetect(uint8_t userData, uint8_t zone, uint8_t subZone, uint8_t const * const status) { vscp_TxMessage txMsg; uint8_t size = 0; @@ -112,6 +113,12 @@ extern BOOL vscp_evt_security_sendMotionDetect(uint8_t userData, uint8_t zone, u txMsg.data[2] = subZone; size += 1; + if (NULL != status) + { + txMsg.data[3] = *status; + size += 1; + } + txMsg.dataNum = size; return vscp_core_sendEvent(&txMsg); @@ -1077,3 +1084,123 @@ extern BOOL vscp_evt_security_sendPasswordError(uint8_t data0, uint8_t zone, uin return vscp_core_sendEvent(&txMsg); } +/** + * Gas + * + * @param[in] data0 User defined data. + * @param[in] zone Zone for which event applies to (0-255). 255 is all zones. + * @param[in] subZone Sub-zone for which event applies to (0-255). 255 is all sub-zones. + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_security_sendGas(uint8_t data0, uint8_t zone, uint8_t subZone) +{ + vscp_TxMessage txMsg; + uint8_t size = 0; + + vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_SECURITY, VSCP_TYPE_SECURITY_GAS, VSCP_PRIORITY_3_NORMAL); + + txMsg.data[0] = data0; + size += 1; + + txMsg.data[1] = zone; + size += 1; + + txMsg.data[2] = subZone; + size += 1; + + txMsg.dataNum = size; + + return vscp_core_sendEvent(&txMsg); +} + +/** + * In motion + * + * @param[in] data0 User defined data. + * @param[in] zone Zone for which event applies to (0-255). 255 is all zones. + * @param[in] subZone Sub-zone for which event applies to (0-255). 255 is all sub-zones. + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_security_sendInMotion(uint8_t data0, uint8_t zone, uint8_t subZone) +{ + vscp_TxMessage txMsg; + uint8_t size = 0; + + vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_SECURITY, VSCP_TYPE_SECURITY_IN_MOTION, VSCP_PRIORITY_3_NORMAL); + + txMsg.data[0] = data0; + size += 1; + + txMsg.data[1] = zone; + size += 1; + + txMsg.data[2] = subZone; + size += 1; + + txMsg.dataNum = size; + + return vscp_core_sendEvent(&txMsg); +} + +/** + * Not in motion + * + * @param[in] data0 User defined data. + * @param[in] zone Zone for which event applies to (0-255). 255 is all zones. + * @param[in] subZone Sub-zone for which event applies to (0-255). 255 is all sub-zones. + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_security_sendNotInMotion(uint8_t data0, uint8_t zone, uint8_t subZone) +{ + vscp_TxMessage txMsg; + uint8_t size = 0; + + vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_SECURITY, VSCP_TYPE_SECURITY_NOT_IN_MOTION, VSCP_PRIORITY_3_NORMAL); + + txMsg.data[0] = data0; + size += 1; + + txMsg.data[1] = zone; + size += 1; + + txMsg.data[2] = subZone; + size += 1; + + txMsg.dataNum = size; + + return vscp_core_sendEvent(&txMsg); +} + +/** + * Vibration + * + * @param[in] data0 User defined data. + * @param[in] zone Zone for which event applies to (0-255). 255 is all zones. + * @param[in] subZone Sub-zone for which event applies to (0-255). 255 is all sub-zones. + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_security_sendVibration(uint8_t data0, uint8_t zone, uint8_t subZone) +{ + vscp_TxMessage txMsg; + uint8_t size = 0; + + vscp_core_prepareTxMessage(&txMsg, VSCP_CLASS_L1_SECURITY, VSCP_TYPE_SECURITY_VIBRATION, VSCP_PRIORITY_3_NORMAL); + + txMsg.data[0] = data0; + size += 1; + + txMsg.data[1] = zone; + size += 1; + + txMsg.data[2] = subZone; + size += 1; + + txMsg.dataNum = size; + + return vscp_core_sendEvent(&txMsg); +} + diff --git a/src/framework/events/vscp_evt_security.h b/src/framework/events/vscp_evt_security.h index d43d3c1..a374086 100644 --- a/src/framework/events/vscp_evt_security.h +++ b/src/framework/events/vscp_evt_security.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * @@ -85,10 +85,11 @@ extern BOOL vscp_evt_security_sendGeneralEvent(void); * @param[in] userData User defined data. * @param[in] zone Zone for which event applies to (0-255). 255 is all zones. * @param[in] subZone Sub-zone for which event applies to (0-255). 255 is all sub-zones. + * @param[in] status Optional status (optional) * * @return If event is sent, it will return TRUE otherwise FALSE. */ -extern BOOL vscp_evt_security_sendMotionDetect(uint8_t userData, uint8_t zone, uint8_t subZone); +extern BOOL vscp_evt_security_sendMotionDetect(uint8_t userData, uint8_t zone, uint8_t subZone, uint8_t const * const status); /** * Glass break @@ -442,4 +443,48 @@ extern BOOL vscp_evt_security_sendPasswordWarning(uint8_t data0, uint8_t zone, u */ extern BOOL vscp_evt_security_sendPasswordError(uint8_t data0, uint8_t zone, uint8_t subZone); +/** + * Gas + * + * @param[in] data0 User defined data. + * @param[in] zone Zone for which event applies to (0-255). 255 is all zones. + * @param[in] subZone Sub-zone for which event applies to (0-255). 255 is all sub-zones. + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_security_sendGas(uint8_t data0, uint8_t zone, uint8_t subZone); + +/** + * In motion + * + * @param[in] data0 User defined data. + * @param[in] zone Zone for which event applies to (0-255). 255 is all zones. + * @param[in] subZone Sub-zone for which event applies to (0-255). 255 is all sub-zones. + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_security_sendInMotion(uint8_t data0, uint8_t zone, uint8_t subZone); + +/** + * Not in motion + * + * @param[in] data0 User defined data. + * @param[in] zone Zone for which event applies to (0-255). 255 is all zones. + * @param[in] subZone Sub-zone for which event applies to (0-255). 255 is all sub-zones. + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_security_sendNotInMotion(uint8_t data0, uint8_t zone, uint8_t subZone); + +/** + * Vibration + * + * @param[in] data0 User defined data. + * @param[in] zone Zone for which event applies to (0-255). 255 is all zones. + * @param[in] subZone Sub-zone for which event applies to (0-255). 255 is all sub-zones. + * + * @return If event is sent, it will return TRUE otherwise FALSE. + */ +extern BOOL vscp_evt_security_sendVibration(uint8_t data0, uint8_t zone, uint8_t subZone); + #endif /* __VSCP_EVT_SECURITY_H__ */ diff --git a/src/framework/events/vscp_evt_setvaluezone.c b/src/framework/events/vscp_evt_setvaluezone.c index d598f41..d7cf2a4 100644 --- a/src/framework/events/vscp_evt_setvaluezone.c +++ b/src/framework/events/vscp_evt_setvaluezone.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_setvaluezone.h b/src/framework/events/vscp_evt_setvaluezone.h index c6d4b6b..08ac596 100644 --- a/src/framework/events/vscp_evt_setvaluezone.h +++ b/src/framework/events/vscp_evt_setvaluezone.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_weather.c b/src/framework/events/vscp_evt_weather.c index 7750d61..cccb1a2 100644 --- a/src/framework/events/vscp_evt_weather.c +++ b/src/framework/events/vscp_evt_weather.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_weather.h b/src/framework/events/vscp_evt_weather.h index 49d1b57..9731191 100644 --- a/src/framework/events/vscp_evt_weather.h +++ b/src/framework/events/vscp_evt_weather.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_weather_forecast.c b/src/framework/events/vscp_evt_weather_forecast.c index 377166c..dc97ed3 100644 --- a/src/framework/events/vscp_evt_weather_forecast.c +++ b/src/framework/events/vscp_evt_weather_forecast.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_weather_forecast.h b/src/framework/events/vscp_evt_weather_forecast.h index a22cc57..37d4c33 100644 --- a/src/framework/events/vscp_evt_weather_forecast.h +++ b/src/framework/events/vscp_evt_weather_forecast.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_wireless.c b/src/framework/events/vscp_evt_wireless.c index 4abdb1a..7c8b71b 100644 --- a/src/framework/events/vscp_evt_wireless.c +++ b/src/framework/events/vscp_evt_wireless.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/events/vscp_evt_wireless.h b/src/framework/events/vscp_evt_wireless.h index 1fd1407..03e3198 100644 --- a/src/framework/events/vscp_evt_wireless.h +++ b/src/framework/events/vscp_evt_wireless.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/user/vscp_action.c b/src/framework/user/vscp_action.c index e84841b..07c844a 100644 --- a/src/framework/user/vscp_action.c +++ b/src/framework/user/vscp_action.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/user/vscp_action.h b/src/framework/user/vscp_action.h index 3f4b3f3..a2d4826 100644 --- a/src/framework/user/vscp_action.h +++ b/src/framework/user/vscp_action.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/user/vscp_app_reg.c b/src/framework/user/vscp_app_reg.c index bf2e02f..b36d263 100644 --- a/src/framework/user/vscp_app_reg.c +++ b/src/framework/user/vscp_app_reg.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/user/vscp_app_reg.h b/src/framework/user/vscp_app_reg.h index 9766d7d..dd184e9 100644 --- a/src/framework/user/vscp_app_reg.h +++ b/src/framework/user/vscp_app_reg.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/user/vscp_config_overwrite.h b/src/framework/user/vscp_config_overwrite.h index 1a0fcbe..43bedcd 100644 --- a/src/framework/user/vscp_config_overwrite.h +++ b/src/framework/user/vscp_config_overwrite.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/user/vscp_dev_data_config_overwrite.h b/src/framework/user/vscp_dev_data_config_overwrite.h index f6b10dd..8c04e3d 100644 --- a/src/framework/user/vscp_dev_data_config_overwrite.h +++ b/src/framework/user/vscp_dev_data_config_overwrite.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/user/vscp_platform.h b/src/framework/user/vscp_platform.h index 9e4aff3..45dabef 100644 --- a/src/framework/user/vscp_platform.h +++ b/src/framework/user/vscp_platform.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/user/vscp_portable.c b/src/framework/user/vscp_portable.c index 8d56dcc..acc7812 100644 --- a/src/framework/user/vscp_portable.c +++ b/src/framework/user/vscp_portable.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/user/vscp_portable.h b/src/framework/user/vscp_portable.h index 57f8538..0cbc92e 100644 --- a/src/framework/user/vscp_portable.h +++ b/src/framework/user/vscp_portable.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/user/vscp_ps_access.c b/src/framework/user/vscp_ps_access.c index 4fd3733..fb4c900 100644 --- a/src/framework/user/vscp_ps_access.c +++ b/src/framework/user/vscp_ps_access.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/user/vscp_ps_access.h b/src/framework/user/vscp_ps_access.h index a7dcf79..7d91b7d 100644 --- a/src/framework/user/vscp_ps_access.h +++ b/src/framework/user/vscp_ps_access.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/user/vscp_timer.c b/src/framework/user/vscp_timer.c index ec85dcd..abb371a 100644 --- a/src/framework/user/vscp_timer.c +++ b/src/framework/user/vscp_timer.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/user/vscp_timer.h b/src/framework/user/vscp_timer.h index 11ba191..ef02251 100644 --- a/src/framework/user/vscp_timer.h +++ b/src/framework/user/vscp_timer.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/user/vscp_tp_adapter.c b/src/framework/user/vscp_tp_adapter.c index 8b10940..3677e23 100644 --- a/src/framework/user/vscp_tp_adapter.c +++ b/src/framework/user/vscp_tp_adapter.c @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de * diff --git a/src/framework/user/vscp_tp_adapter.h b/src/framework/user/vscp_tp_adapter.h index 47b850b..6cb0a1c 100644 --- a/src/framework/user/vscp_tp_adapter.h +++ b/src/framework/user/vscp_tp_adapter.h @@ -1,6 +1,6 @@ /* The MIT License (MIT) * - * Copyright (c) 2014 - 2020, Andreas Merkle + * Copyright (c) 2014 - 2021, Andreas Merkle * http://www.blue-andi.de * vscp@blue-andi.de *