Add additional writable properties to OctetString and fix write property to present-value priority 6 logic. (#1297)
This commit is contained in:
@@ -58,7 +58,8 @@ static const int32_t Properties_Proprietary[] = { -1 };
|
|||||||
that is always writable. */
|
that is always writable. */
|
||||||
static const int32_t Writable_Properties[] = {
|
static const int32_t Writable_Properties[] = {
|
||||||
/* unordered list of always writable properties */
|
/* unordered list of always writable properties */
|
||||||
PROP_PRESENT_VALUE, PROP_OUT_OF_SERVICE, -1
|
PROP_PRESENT_VALUE, PROP_OUT_OF_SERVICE, PROP_OBJECT_NAME, PROP_DESCRIPTION,
|
||||||
|
-1
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -678,19 +679,16 @@ bool OctetString_Value_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data)
|
|||||||
status = write_property_type_valid(
|
status = write_property_type_valid(
|
||||||
wp_data, &value, BACNET_APPLICATION_TAG_OCTET_STRING);
|
wp_data, &value, BACNET_APPLICATION_TAG_OCTET_STRING);
|
||||||
if (status) {
|
if (status) {
|
||||||
/* Command priority 6 is reserved for use by Minimum On/Off
|
if (wp_data->priority == 6) {
|
||||||
algorithm and may not be used for other purposes in any
|
|
||||||
object. */
|
|
||||||
if (OctetString_Value_Present_Value_Set(
|
|
||||||
wp_data->object_instance, &value.type.Octet_String,
|
|
||||||
wp_data->priority)) {
|
|
||||||
status = true;
|
|
||||||
} else if (wp_data->priority == 6) {
|
|
||||||
/* Command priority 6 is reserved for use by Minimum On/Off
|
/* Command priority 6 is reserved for use by Minimum On/Off
|
||||||
algorithm and may not be used for other purposes in any
|
algorithm and may not be used for other purposes in any
|
||||||
object. */
|
object. */
|
||||||
wp_data->error_class = ERROR_CLASS_PROPERTY;
|
wp_data->error_class = ERROR_CLASS_PROPERTY;
|
||||||
wp_data->error_code = ERROR_CODE_WRITE_ACCESS_DENIED;
|
wp_data->error_code = ERROR_CODE_WRITE_ACCESS_DENIED;
|
||||||
|
} else if (OctetString_Value_Present_Value_Set(
|
||||||
|
wp_data->object_instance,
|
||||||
|
&value.type.Octet_String, wp_data->priority)) {
|
||||||
|
status = true;
|
||||||
} else {
|
} else {
|
||||||
wp_data->error_class = ERROR_CLASS_PROPERTY;
|
wp_data->error_class = ERROR_CLASS_PROPERTY;
|
||||||
wp_data->error_code = ERROR_CODE_VALUE_OUT_OF_RANGE;
|
wp_data->error_code = ERROR_CODE_VALUE_OUT_OF_RANGE;
|
||||||
|
|||||||
Reference in New Issue
Block a user