2nd pass at changing the error/reject/abort status reporting to improve BTL test compliance. ReadProperty fully done for core and demo objects. Will tackle other services next.

This commit is contained in:
petermcs
2010-06-07 15:52:33 +00:00
parent b780c7bea6
commit 61bb34d726
21 changed files with 158 additions and 104 deletions
+3 -3
View File
@@ -322,7 +322,7 @@ bool Binary_Input_Polarity_Set(
return status;
}
/* return apdu length, or -1 on error */
/* return apdu length, or BACNET_STATUS_ERROR on error */
/* assumption - object already exists, and has been bounds checked */
int Binary_Input_Read_Property(
BACNET_READ_PROPERTY_DATA * rpdata)
@@ -394,14 +394,14 @@ int Binary_Input_Read_Property(
default:
rpdata->error_class = ERROR_CLASS_PROPERTY;
rpdata->error_code = ERROR_CODE_UNKNOWN_PROPERTY;
apdu_len = -1;
apdu_len = BACNET_STATUS_ERROR;
break;
}
/* only array properties can have array options */
if ((apdu_len >= 0) && (rpdata->array_index != BACNET_ARRAY_ALL)) {
rpdata->error_class = ERROR_CLASS_PROPERTY;
rpdata->error_code = ERROR_CODE_PROPERTY_IS_NOT_AN_ARRAY;
apdu_len = -1;
apdu_len = BACNET_STATUS_ERROR;
}
return apdu_len;