Added error code when array option is passed to special properties ALL, OPTIONAL, REQUIRED.
This commit is contained in:
@@ -265,7 +265,6 @@ void handler_read_property_multiple(
|
|||||||
error = len;
|
error = len;
|
||||||
goto RPM_FAILURE;
|
goto RPM_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
decode_len += len;
|
decode_len += len;
|
||||||
/* handle the special properties */
|
/* handle the special properties */
|
||||||
if ((rpmdata.object_property == PROP_ALL) ||
|
if ((rpmdata.object_property == PROP_ALL) ||
|
||||||
@@ -276,6 +275,24 @@ void handler_read_property_multiple(
|
|||||||
unsigned index = 0;
|
unsigned index = 0;
|
||||||
BACNET_PROPERTY_ID special_object_property;
|
BACNET_PROPERTY_ID special_object_property;
|
||||||
|
|
||||||
|
if (rpmdata.array_index != BACNET_ARRAY_ALL) {
|
||||||
|
/* No array index options for this special property.
|
||||||
|
Encode error for this object property response */
|
||||||
|
len =
|
||||||
|
rpm_ack_encode_apdu_object_property_error(&Temp_Buf[0],
|
||||||
|
ERROR_CLASS_PROPERTY,
|
||||||
|
ERROR_CODE_PROPERTY_IS_NOT_AN_ARRAY);
|
||||||
|
copy_len =
|
||||||
|
memcopy(&Handler_Transmit_Buffer[0],
|
||||||
|
&Temp_Buf[0], npdu_len + apdu_len,
|
||||||
|
len, sizeof(Handler_Transmit_Buffer));
|
||||||
|
if (copy_len == 0) {
|
||||||
|
rpmdata.error_code = ERROR_CODE_ABORT_SEGMENTATION_NOT_SUPPORTED;
|
||||||
|
error = BACNET_STATUS_ABORT;
|
||||||
|
goto RPM_FAILURE;
|
||||||
|
}
|
||||||
|
apdu_len += len;
|
||||||
|
} else {
|
||||||
special_object_property = rpmdata.object_property;
|
special_object_property = rpmdata.object_property;
|
||||||
Device_Objects_Property_List(rpmdata.object_type, &property_list);
|
Device_Objects_Property_List(rpmdata.object_type, &property_list);
|
||||||
property_count =
|
property_count =
|
||||||
@@ -308,6 +325,7 @@ void handler_read_property_multiple(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
/* handle an individual property */
|
/* handle an individual property */
|
||||||
len =
|
len =
|
||||||
@@ -375,7 +393,7 @@ void handler_read_property_multiple(
|
|||||||
} else if (error == BACNET_STATUS_ERROR){
|
} else if (error == BACNET_STATUS_ERROR){
|
||||||
apdu_len =
|
apdu_len =
|
||||||
bacerror_encode_apdu(&Handler_Transmit_Buffer[npdu_len],
|
bacerror_encode_apdu(&Handler_Transmit_Buffer[npdu_len],
|
||||||
service_data->invoke_id, SERVICE_CONFIRMED_READ_PROPERTY,
|
service_data->invoke_id, SERVICE_CONFIRMED_READ_PROP_MULTIPLE,
|
||||||
rpmdata.error_class, rpmdata.error_code);
|
rpmdata.error_class, rpmdata.error_code);
|
||||||
#if PRINT_ENABLED
|
#if PRINT_ENABLED
|
||||||
fprintf(stderr, "RP: Sending Error!\n");
|
fprintf(stderr, "RP: Sending Error!\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user