Removed wildcard match for Device Instance since it is only done for ReadProperty and ReadPropertyMultiple services, and the match is done by substitution in those service handlers.
This commit is contained in:
@@ -123,8 +123,7 @@ bool Device_Valid_Object_Instance_Number(
|
||||
uint32_t object_id)
|
||||
{
|
||||
/* BACnet allows for a wildcard instance number */
|
||||
return ((Object_Instance_Number == object_id) ||
|
||||
(object_id == BACNET_MAX_INSTANCE));
|
||||
return (Object_Instance_Number == object_id);
|
||||
}
|
||||
|
||||
BACNET_DEVICE_STATUS Device_System_Status(
|
||||
|
||||
@@ -89,6 +89,10 @@ void handler_read_property(
|
||||
error = true;
|
||||
switch (data.object_type) {
|
||||
case OBJECT_DEVICE:
|
||||
/* Test for case of indefinite Device object instance */
|
||||
if (data.object_instance == BACNET_MAX_INSTANCE) {
|
||||
data.object_instance = Device_Object_Instance_Number();
|
||||
}
|
||||
/* FIXME: probably need a length limitation sent with encode */
|
||||
if (Device_Valid_Object_Instance_Number(data.object_instance)) {
|
||||
len =
|
||||
|
||||
Reference in New Issue
Block a user