Added check in each example object WriteProperty handler to pass test:

9.22.2.1 Writing Non-Array Properties with an Array Index
Thank you Kamalathas!
This commit is contained in:
skarg
2012-07-09 19:49:27 +00:00
parent d43146c7e3
commit 7578b4ef06
33 changed files with 605 additions and 81 deletions
-32
View File
@@ -886,38 +886,6 @@ int Device_Read_Property(
return apdu_len;
}
/** The device-client version of this function just returns an error,
* since we don't need to allow writing to our objects.
*
* Note: it was necessary to include this trivial implementation of this function
* to avoid pulling in the device.c module from libbacnet.a for the
* handler_write_property() support, which resulted in hard-to-trace
* duplicate function errors.
*
* @param wp_data [in,out] Structure with the desired Object and Property info
* and new Value on entry, and APDU message on return.
* @return Always False because it is an error.
*/
bool Device_Write_Property(
BACNET_WRITE_PROPERTY_DATA * wp_data)
{
bool status = false;
wp_data->error_class = ERROR_CLASS_PROPERTY;
wp_data->error_code = ERROR_CODE_WRITE_ACCESS_DENIED;
return (status);
}
/* Ditto for the local version; always returns false */
bool Device_Write_Property_Local(
BACNET_WRITE_PROPERTY_DATA * wp_data)
{
bool status = false;
wp_data->error_class = ERROR_CLASS_PROPERTY;
wp_data->error_code = ERROR_CODE_WRITE_ACCESS_DENIED;
return (status);
}
/** Initialize the Device Object.
Initialize the group of object helper functions for any supported Object.
Initialize each of the Device Object child Object instances.