Feature/write property type check refactor (#182)

* refactor write-property tag check

* modify ports objects to use write-property tag check API

* modify example objects to use write-property tag check API

* Fix object unit test builds

* Fix and run unit ztests via CMake

* Enable unit testing on Travis CI

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
Steve Karg
2021-06-23 10:10:12 -05:00
committed by GitHub
parent 31b7fb3c40
commit 810a2f93de
139 changed files with 1142 additions and 4375 deletions
+4 -5
View File
@@ -309,8 +309,8 @@ bool bacfile_write_property(BACNET_WRITE_PROPERTY_DATA *wp_data)
property shall be logical TRUE only if no changes have been
made to the file data by internal processes or through File
Access Services since the last time the object was archived. */
status = WPValidateArgType(&value, BACNET_APPLICATION_TAG_BOOLEAN,
&wp_data->error_class, &wp_data->error_code);
status = write_property_type_valid(wp_data, &value,
BACNET_APPLICATION_TAG_BOOLEAN);
if (status) {
if (value.type.Boolean) {
/* FIXME: do something to wp_data->object_instance */
@@ -323,9 +323,8 @@ bool bacfile_write_property(BACNET_WRITE_PROPERTY_DATA *wp_data)
/* If the file size can be changed by writing to the file,
and File_Access_Method is STREAM_ACCESS, then this property
shall be writable. */
status =
WPValidateArgType(&value, BACNET_APPLICATION_TAG_UNSIGNED_INT,
&wp_data->error_class, &wp_data->error_code);
status = write_property_type_valid(wp_data, &value,
BACNET_APPLICATION_TAG_UNSIGNED_INT);
if (status) {
/* FIXME: do something with value.type.Unsigned
to wp_data->object_instance */