Changed Object List in various ports to return Segementation Not Supported abort when it is too large to return in a single APDU.

This commit is contained in:
skarg
2010-09-11 13:38:16 +00:00
parent a74e282f93
commit 7832ba11db
8 changed files with 26 additions and 25 deletions
+6 -5
View File
@@ -276,9 +276,10 @@ int Device_Encode_Property_APDU(
/* assume next one is the same size as this one */
/* can we all fit into the APDU? */
if ((apdu_len + len) >= MAX_APDU) {
*error_class = ERROR_CLASS_SERVICES;
*error_code = ERROR_CODE_NO_SPACE_FOR_OBJECT;
apdu_len = -1;
/* Abort response */
*error_code =
ERROR_CODE_ABORT_SEGMENTATION_NOT_SUPPORTED;
apdu_len = BACNET_STATUS_ABORT;
break;
}
}
@@ -291,7 +292,7 @@ int Device_Encode_Property_APDU(
else {
*error_class = ERROR_CLASS_PROPERTY;
*error_code = ERROR_CODE_INVALID_ARRAY_INDEX;
apdu_len = -1;
apdu_len = BACNET_STATUS_ERROR;
}
}
break;
@@ -344,7 +345,7 @@ int Device_Encode_Property_APDU(
(array_index != BACNET_ARRAY_ALL)) {
*error_class = ERROR_CLASS_PROPERTY;
*error_code = ERROR_CODE_PROPERTY_IS_NOT_AN_ARRAY;
apdu_len = -1;
apdu_len = BACNET_STATUS_ERROR;
}
return apdu_len;
+1 -1
View File
@@ -141,7 +141,7 @@ void handler_read_property(
} else {
switch (property_len) {
/* BACnet APDU too small to fit data, so proper response is Abort */
case -2:
case BACNET_STATUS_ABORT:
len =
abort_encode_apdu(&Handler_Transmit_Buffer[pdu_len],
service_data->invoke_id,