fixed bug: Writing of property NotifyType in AnalogValue - ID: 3541355
This commit is contained in:
@@ -630,12 +630,18 @@ bool Analog_Input_Write_Property(
|
|||||||
&wp_data->error_class, &wp_data->error_code);
|
&wp_data->error_class, &wp_data->error_code);
|
||||||
|
|
||||||
if (status) {
|
if (status) {
|
||||||
if (value.type.Bit_String.bits_used > NOTIFY_EVENT) {
|
switch ((BACNET_NOTIFY_TYPE)value.type.Enumerated) {
|
||||||
CurrentAI->Event_Enable = value.type.Enumerated;
|
case NOTIFY_EVENT:
|
||||||
} else {
|
CurrentAI->Notify_Type = 1;
|
||||||
wp_data->error_class = ERROR_CLASS_PROPERTY;
|
break;
|
||||||
wp_data->error_code = ERROR_CODE_VALUE_OUT_OF_RANGE;
|
case NOTIFY_ALARM:
|
||||||
status = false;
|
CurrentAI->Notify_Type = 0;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
wp_data->error_class = ERROR_CLASS_PROPERTY;
|
||||||
|
wp_data->error_code = ERROR_CODE_VALUE_OUT_OF_RANGE;
|
||||||
|
status = false;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -728,12 +728,18 @@ bool Analog_Value_Write_Property(
|
|||||||
&wp_data->error_class, &wp_data->error_code);
|
&wp_data->error_class, &wp_data->error_code);
|
||||||
|
|
||||||
if (status) {
|
if (status) {
|
||||||
if (value.type.Bit_String.bits_used > NOTIFY_EVENT) {
|
switch ((BACNET_NOTIFY_TYPE)value.type.Enumerated) {
|
||||||
CurrentAV->Event_Enable = value.type.Enumerated;
|
case NOTIFY_EVENT:
|
||||||
} else {
|
CurrentAV->Notify_Type = 1;
|
||||||
wp_data->error_class = ERROR_CLASS_PROPERTY;
|
break;
|
||||||
wp_data->error_code = ERROR_CODE_VALUE_OUT_OF_RANGE;
|
case NOTIFY_ALARM:
|
||||||
status = false;
|
CurrentAV->Notify_Type = 0;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
wp_data->error_class = ERROR_CLASS_PROPERTY;
|
||||||
|
wp_data->error_code = ERROR_CODE_VALUE_OUT_OF_RANGE;
|
||||||
|
status = false;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user