Add PROP_TIMER_RUNNING to writable properties and implement Timer_Running_Set functionality (#1245)
This commit is contained in:
@@ -52,6 +52,8 @@ The git repositories are hosted at the following sites:
|
||||
|
||||
### 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
|
||||
decoding functions to ensure they are not used except intentionally for
|
||||
legacy code bases. (#1244)
|
||||
|
||||
@@ -104,6 +104,7 @@ static const int32_t Properties_Proprietary[] = { -1 };
|
||||
static const int32_t Writable_Properties[] = {
|
||||
/* unordered list of always writable properties */
|
||||
PROP_PRESENT_VALUE,
|
||||
PROP_TIMER_RUNNING,
|
||||
PROP_OUT_OF_SERVICE,
|
||||
PROP_DEFAULT_TIMEOUT,
|
||||
PROP_MIN_PRES_VALUE,
|
||||
@@ -1955,6 +1956,13 @@ bool Timer_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data)
|
||||
}
|
||||
}
|
||||
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:
|
||||
status = write_property_type_valid(
|
||||
wp_data, &value, BACNET_APPLICATION_TAG_BOOLEAN);
|
||||
|
||||
@@ -55,6 +55,7 @@ static void test_Timer_Read_Write(void)
|
||||
uint32_t test_instance = 0;
|
||||
bool status = false;
|
||||
const int32_t skip_fail_property_list[] = { -1 };
|
||||
const int32_t *writable_properties = NULL;
|
||||
BACNET_WRITE_PROPERTY_DATA wp_data = { 0 };
|
||||
BACNET_DEVICE_OBJECT_PROPERTY_REFERENCE member = { 0 }, *test_member = NULL;
|
||||
BACNET_APPLICATION_DATA_VALUE value = { 0 };
|
||||
@@ -497,6 +498,8 @@ static void test_Timer_Read_Write(void)
|
||||
zassert_true(status, NULL);
|
||||
status = Timer_Description_Set(instance, NULL);
|
||||
zassert_true(status, NULL);
|
||||
Timer_Writable_Property_List(instance, &writable_properties);
|
||||
zassert_not_null(writable_properties, NULL);
|
||||
status = characterstring_init_ansi(&cstring, "");
|
||||
zassert_true(status, NULL);
|
||||
status =
|
||||
|
||||
Reference in New Issue
Block a user