Fixed Device Address Binding by allowing a zero length APDU to be passed back from the objects, and used -1 as signal for error encoding.

This commit is contained in:
skarg
2006-02-09 17:50:48 +00:00
parent 09dc4d1f04
commit 6d0f6adb90
5 changed files with 19 additions and 12 deletions
+4 -1
View File
@@ -141,6 +141,7 @@ static float Analog_Output_Present_Value(uint32_t object_instance)
return value;
}
/* return apdu len, or -1 on error */
int Analog_Output_Encode_Property_APDU(
uint8_t *apdu,
uint32_t object_instance,
@@ -223,7 +224,7 @@ int Analog_Output_Encode_Property_APDU(
{
*error_class = ERROR_CLASS_SERVICES;
*error_code = ERROR_CODE_NO_SPACE_FOR_OBJECT;
apdu_len = 0;
apdu_len = -1;
break;
}
}
@@ -245,6 +246,7 @@ int Analog_Output_Encode_Property_APDU(
{
*error_class = ERROR_CLASS_PROPERTY;
*error_code = ERROR_CODE_INVALID_ARRAY_INDEX;
apdu_len = -1;
}
}
@@ -256,6 +258,7 @@ int Analog_Output_Encode_Property_APDU(
default:
*error_class = ERROR_CLASS_PROPERTY;
*error_code = ERROR_CODE_UNKNOWN_PROPERTY;
apdu_len = -1;
break;
}