From dbe33eda0c75110251a5cddb7e9bb45894beef58 Mon Sep 17 00:00:00 2001 From: Wouter Date: Thu, 30 Mar 2023 16:23:29 +0100 Subject: [PATCH] update code for scope=2 --- knx_iot_virtual_pb.c | 2 +- knx_iot_virtual_pb.cpp | 8 ++++++-- knx_iot_virtual_pb.h | 2 +- knx_iot_virtual_sa.c | 2 +- knx_iot_virtual_sa.cpp | 12 ++++++++++-- knx_iot_virtual_sa.h | 2 +- 6 files changed, 20 insertions(+), 8 deletions(-) diff --git a/knx_iot_virtual_pb.c b/knx_iot_virtual_pb.c index 58022b2..709727c 100644 --- a/knx_iot_virtual_pb.c +++ b/knx_iot_virtual_pb.c @@ -20,7 +20,7 @@ * @file * * KNX virtual Push Button - * 2023-03-29 14:46:26.695031 + * 2023-03-30 16:22:21.831363 * ## Application Design * * support functions: diff --git a/knx_iot_virtual_pb.cpp b/knx_iot_virtual_pb.cpp index acadb7f..9917e19 100644 --- a/knx_iot_virtual_pb.cpp +++ b/knx_iot_virtual_pb.cpp @@ -16,7 +16,7 @@ -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */ -// 2023-03-29 14:46:26.886967 +// 2023-03-30 16:22:22.023134 // For compilers that support precompilation, includes "wx/wx.h". #include @@ -865,7 +865,7 @@ void MyFrame::OnAbout(wxCommandEvent& event) strcat(text, "(c) Cascoda Ltd\n"); strcat(text, "(c) KNX.org\n"); - strcat(text, "2023-03-29 14:46:26.886967"); + strcat(text, "2023-03-30 16:22:22.023134"); CustomDialog("About", text); } @@ -1088,6 +1088,7 @@ void MyFrame::OnPressed_OnOff_1(wxCommandEvent& event) p = true; } app_set_bool_variable(url, p); + oc_do_s_mode_with_scope(2, url, "w"); oc_do_s_mode_with_scope(5, url, "w"); sprintf(my_text, "OnOff_1 ('%s') pressed: %d", url, (int)p); SetStatusText(my_text); @@ -1104,6 +1105,7 @@ void MyFrame::OnPressed_OnOff_2(wxCommandEvent& event) p = true; } app_set_bool_variable(url, p); + oc_do_s_mode_with_scope(2, url, "w"); oc_do_s_mode_with_scope(5, url, "w"); sprintf(my_text, "OnOff_2 ('%s') pressed: %d", url, (int)p); SetStatusText(my_text); @@ -1120,6 +1122,7 @@ void MyFrame::OnPressed_OnOff_3(wxCommandEvent& event) p = true; } app_set_bool_variable(url, p); + oc_do_s_mode_with_scope(2, url, "w"); oc_do_s_mode_with_scope(5, url, "w"); sprintf(my_text, "OnOff_3 ('%s') pressed: %d", url, (int)p); SetStatusText(my_text); @@ -1136,6 +1139,7 @@ void MyFrame::OnPressed_OnOff_4(wxCommandEvent& event) p = true; } app_set_bool_variable(url, p); + oc_do_s_mode_with_scope(2, url, "w"); oc_do_s_mode_with_scope(5, url, "w"); sprintf(my_text, "OnOff_4 ('%s') pressed: %d", url, (int)p); SetStatusText(my_text); diff --git a/knx_iot_virtual_pb.h b/knx_iot_virtual_pb.h index 8ae139a..d28d102 100644 --- a/knx_iot_virtual_pb.h +++ b/knx_iot_virtual_pb.h @@ -24,7 +24,7 @@ * e.g. if the c code is compiled without main then * these functions can be used to call all generated code * - * 2023-03-29 14:46:26.745444 + * 2023-03-30 16:22:21.882742 */ #include "oc_api.h" diff --git a/knx_iot_virtual_sa.c b/knx_iot_virtual_sa.c index b7f6fda..c2453cc 100644 --- a/knx_iot_virtual_sa.c +++ b/knx_iot_virtual_sa.c @@ -20,7 +20,7 @@ * @file * * KNX virtual Switching Actuator - * 2023-03-29 14:46:27.345596 + * 2023-03-30 16:22:22.473172 * ## Application Design * * support functions: diff --git a/knx_iot_virtual_sa.cpp b/knx_iot_virtual_sa.cpp index 9e0d163..4a72a94 100644 --- a/knx_iot_virtual_sa.cpp +++ b/knx_iot_virtual_sa.cpp @@ -16,7 +16,7 @@ -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */ -// 2023-03-29 14:46:27.489274 +// 2023-03-30 16:22:22.657382 // For compilers that support precompilation, includes "wx/wx.h". #include @@ -889,7 +889,7 @@ void MyFrame::OnAbout(wxCommandEvent& event) strcat(text, "(c) Cascoda Ltd\n"); strcat(text, "(c) KNX.org\n"); - strcat(text, "2023-03-29 14:46:27.489274"); + strcat(text, "2023-03-30 16:22:22.657382"); CustomDialog("About", text); } @@ -1128,6 +1128,7 @@ void MyFrame::OnPressed_InfoOnOff_1(wxCommandEvent& event) p = true; } app_set_bool_variable(url, p); + oc_do_s_mode_with_scope(2, url, "w"); oc_do_s_mode_with_scope(5, url, "w"); sprintf(my_text, "InfoOnOff_1 ('%s') pressed: %d", url, (int)p); SetStatusText(my_text); @@ -1144,6 +1145,7 @@ void MyFrame::OnPressed_InfoOnOff_2(wxCommandEvent& event) p = true; } app_set_bool_variable(url, p); + oc_do_s_mode_with_scope(2, url, "w"); oc_do_s_mode_with_scope(5, url, "w"); sprintf(my_text, "InfoOnOff_2 ('%s') pressed: %d", url, (int)p); SetStatusText(my_text); @@ -1160,6 +1162,7 @@ void MyFrame::OnPressed_InfoOnOff_3(wxCommandEvent& event) p = true; } app_set_bool_variable(url, p); + oc_do_s_mode_with_scope(2, url, "w"); oc_do_s_mode_with_scope(5, url, "w"); sprintf(my_text, "InfoOnOff_3 ('%s') pressed: %d", url, (int)p); SetStatusText(my_text); @@ -1176,6 +1179,7 @@ void MyFrame::OnPressed_InfoOnOff_4(wxCommandEvent& event) p = true; } app_set_bool_variable(url, p); + oc_do_s_mode_with_scope(2, url, "w"); oc_do_s_mode_with_scope(5, url, "w"); sprintf(my_text, "InfoOnOff_4 ('%s') pressed: %d", url, (int)p); SetStatusText(my_text); @@ -1188,6 +1192,7 @@ void MyFrame::OnFault_ONOFF_1(wxCommandEvent& event) app_set_fault_variable(url, p1); // there is a fault: update the info + oc_do_s_mode_with_scope(2, "/p/o_2_2", "w"); oc_do_s_mode_with_scope(5, "/p/o_2_2", "w"); sprintf(my_text, "Actuator OnOff_1 (/p/o_1_1) Fault: %d to: /p/o_2_2", (int)p1); @@ -1201,6 +1206,7 @@ void MyFrame::OnFault_ONOFF_2(wxCommandEvent& event) app_set_fault_variable(url, p1); // there is a fault: update the info + oc_do_s_mode_with_scope(2, "/p/o_4_4", "w"); oc_do_s_mode_with_scope(5, "/p/o_4_4", "w"); sprintf(my_text, "Actuator OnOff_2 (/p/o_3_3) Fault: %d to: /p/o_4_4", (int)p1); @@ -1214,6 +1220,7 @@ void MyFrame::OnFault_ONOFF_3(wxCommandEvent& event) app_set_fault_variable(url, p1); // there is a fault: update the info + oc_do_s_mode_with_scope(2, "/p/o_6_6", "w"); oc_do_s_mode_with_scope(5, "/p/o_6_6", "w"); sprintf(my_text, "Actuator OnOff_3 (/p/o_5_5) Fault: %d to: /p/o_6_6", (int)p1); @@ -1227,6 +1234,7 @@ void MyFrame::OnFault_ONOFF_4(wxCommandEvent& event) app_set_fault_variable(url, p1); // there is a fault: update the info + oc_do_s_mode_with_scope(2, "/p/o_8_8", "w"); oc_do_s_mode_with_scope(5, "/p/o_8_8", "w"); sprintf(my_text, "Actuator OnOff_4 (/p/o_7_7) Fault: %d to: /p/o_8_8", (int)p1); diff --git a/knx_iot_virtual_sa.h b/knx_iot_virtual_sa.h index 2df290e..a04589b 100644 --- a/knx_iot_virtual_sa.h +++ b/knx_iot_virtual_sa.h @@ -24,7 +24,7 @@ * e.g. if the c code is compiled without main then * these functions can be used to call all generated code * - * 2023-03-29 14:46:27.391312 + * 2023-03-30 16:22:22.523300 */ #include "oc_api.h"