Bugfix/property list consistency testing (#910)

* Added unit test while reading all object properties to flag properties not in the property-list.

* Added enumeration for last-property used in unit testing.

* Added missing reliability property in the basic multistate output object example.

* Removed polarity property in binary value object as it is not standard.
This commit is contained in:
Steve Karg
2025-02-12 12:14:01 -06:00
committed by GitHub
parent bc2438f85b
commit ae135cd368
7 changed files with 48 additions and 140 deletions
+19 -14
View File
@@ -55,23 +55,28 @@ static const char *Default_State_Text = "State 1\0"
"State 2\0"
"State 3\0";
/* These three arrays are used by the ReadPropertyMultiple handler */
static const int Properties_Required[] = { PROP_OBJECT_IDENTIFIER,
PROP_OBJECT_NAME,
PROP_OBJECT_TYPE,
PROP_PRESENT_VALUE,
PROP_STATUS_FLAGS,
PROP_EVENT_STATE,
PROP_OUT_OF_SERVICE,
PROP_NUMBER_OF_STATES,
PROP_PRIORITY_ARRAY,
PROP_RELINQUISH_DEFAULT,
static const int Properties_Required[] = {
/* list of required properties in the object */
PROP_OBJECT_IDENTIFIER,
PROP_OBJECT_NAME,
PROP_OBJECT_TYPE,
PROP_PRESENT_VALUE,
PROP_STATUS_FLAGS,
PROP_EVENT_STATE,
PROP_OUT_OF_SERVICE,
PROP_NUMBER_OF_STATES,
PROP_PRIORITY_ARRAY,
PROP_RELINQUISH_DEFAULT,
#if (BACNET_PROTOCOL_REVISION >= 17)
PROP_CURRENT_COMMAND_PRIORITY,
PROP_CURRENT_COMMAND_PRIORITY,
#endif
-1 };
-1
};
static const int Properties_Optional[] = { PROP_STATE_TEXT, PROP_DESCRIPTION,
-1 };
static const int Properties_Optional[] = {
/* list of required properties in the object */
PROP_STATE_TEXT, PROP_DESCRIPTION, PROP_RELIABILITY, -1
};
static const int Properties_Proprietary[] = { -1 };