Updated demo objects in ports to use new named constants for error return values.

This commit is contained in:
skarg
2010-06-12 23:24:01 +00:00
parent 805717179a
commit 8bb844de36
10 changed files with 41 additions and 41 deletions
+6 -6
View File
@@ -152,7 +152,7 @@ void Device_Property_Lists(
int Device_Read_Property(
BACNET_READ_PROPERTY_DATA * rpdata)
{
int apdu_len = -1;
int apdu_len = BACNET_STATUS_ERROR;
unsigned index = 0;
struct object_functions *pObject = NULL;
bool found = false;
@@ -705,14 +705,14 @@ int Device_Read_Property_Local(
rpdata->error_class = ERROR_CLASS_SERVICES;
rpdata->error_code =
ERROR_CODE_NO_SPACE_FOR_OBJECT;
apdu_len = -1;
apdu_len = BACNET_STATUS_ERROR;
break;
}
} else {
/* error: internal error? */
rpdata->error_class = ERROR_CLASS_SERVICES;
rpdata->error_code = ERROR_CODE_OTHER;
apdu_len = -1;
apdu_len = BACNET_STATUS_ERROR;
break;
}
}
@@ -725,7 +725,7 @@ int Device_Read_Property_Local(
else {
rpdata->error_class = ERROR_CLASS_PROPERTY;
rpdata->error_code = ERROR_CODE_INVALID_ARRAY_INDEX;
apdu_len = -1;
apdu_len = BACNET_STATUS_ERROR;
}
}
break;
@@ -792,7 +792,7 @@ int Device_Read_Property_Local(
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 */
@@ -800,7 +800,7 @@ int Device_Read_Property_Local(
(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;