Add PROP_TIMER_RUNNING to writable properties and implement Timer_Running_Set functionality (#1245)

This commit is contained in:
Steve Karg
2026-02-26 11:26:42 -06:00
committed by GitHub
parent a70ce07507
commit 24587dfc27
3 changed files with 13 additions and 0 deletions
+2
View File
@@ -52,6 +52,8 @@ The git repositories are hosted at the following sites:
### Added ### Added
* Added PROP_TIMER_RUNNING to writable properties and implement
Timer_Running_Set functionality. (#1245)
* Added BACNET_STACK_DEPRECATED_DISABLE guards around all of the deprecated * Added BACNET_STACK_DEPRECATED_DISABLE guards around all of the deprecated
decoding functions to ensure they are not used except intentionally for decoding functions to ensure they are not used except intentionally for
legacy code bases. (#1244) legacy code bases. (#1244)
+8
View File
@@ -104,6 +104,7 @@ static const int32_t Properties_Proprietary[] = { -1 };
static const int32_t Writable_Properties[] = { static const int32_t Writable_Properties[] = {
/* unordered list of always writable properties */ /* unordered list of always writable properties */
PROP_PRESENT_VALUE, PROP_PRESENT_VALUE,
PROP_TIMER_RUNNING,
PROP_OUT_OF_SERVICE, PROP_OUT_OF_SERVICE,
PROP_DEFAULT_TIMEOUT, PROP_DEFAULT_TIMEOUT,
PROP_MIN_PRES_VALUE, PROP_MIN_PRES_VALUE,
@@ -1955,6 +1956,13 @@ bool Timer_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data)
} }
} }
break; break;
case PROP_TIMER_RUNNING:
status = write_property_type_valid(
wp_data, &value, BACNET_APPLICATION_TAG_BOOLEAN);
if (status) {
Timer_Running_Set(wp_data->object_instance, value.type.Boolean);
}
break;
case PROP_OUT_OF_SERVICE: case PROP_OUT_OF_SERVICE:
status = write_property_type_valid( status = write_property_type_valid(
wp_data, &value, BACNET_APPLICATION_TAG_BOOLEAN); wp_data, &value, BACNET_APPLICATION_TAG_BOOLEAN);
@@ -55,6 +55,7 @@ static void test_Timer_Read_Write(void)
uint32_t test_instance = 0; uint32_t test_instance = 0;
bool status = false; bool status = false;
const int32_t skip_fail_property_list[] = { -1 }; const int32_t skip_fail_property_list[] = { -1 };
const int32_t *writable_properties = NULL;
BACNET_WRITE_PROPERTY_DATA wp_data = { 0 }; BACNET_WRITE_PROPERTY_DATA wp_data = { 0 };
BACNET_DEVICE_OBJECT_PROPERTY_REFERENCE member = { 0 }, *test_member = NULL; BACNET_DEVICE_OBJECT_PROPERTY_REFERENCE member = { 0 }, *test_member = NULL;
BACNET_APPLICATION_DATA_VALUE value = { 0 }; BACNET_APPLICATION_DATA_VALUE value = { 0 };
@@ -497,6 +498,8 @@ static void test_Timer_Read_Write(void)
zassert_true(status, NULL); zassert_true(status, NULL);
status = Timer_Description_Set(instance, NULL); status = Timer_Description_Set(instance, NULL);
zassert_true(status, NULL); zassert_true(status, NULL);
Timer_Writable_Property_List(instance, &writable_properties);
zassert_not_null(writable_properties, NULL);
status = characterstring_init_ansi(&cstring, ""); status = characterstring_init_ansi(&cstring, "");
zassert_true(status, NULL); zassert_true(status, NULL);
status = status =