Corrected priority array for read property when elements are read individually.
This commit is contained in:
@@ -238,11 +238,11 @@ int Analog_Output_Encode_Property_APDU(uint8_t * apdu,
|
||||
if (array_index <= BACNET_MAX_PRIORITY) {
|
||||
if (Analog_Output_Level[object_index][array_index] ==
|
||||
AO_LEVEL_NULL)
|
||||
len = encode_tagged_null(&apdu[apdu_len]);
|
||||
apdu_len = encode_tagged_null(&apdu[0]);
|
||||
else {
|
||||
real_value =
|
||||
Analog_Output_Level[object_index][array_index];
|
||||
len = encode_tagged_real(&apdu[apdu_len], real_value);
|
||||
apdu_len = encode_tagged_real(&apdu[0], real_value);
|
||||
}
|
||||
} else {
|
||||
*error_class = ERROR_CLASS_PROPERTY;
|
||||
|
||||
@@ -235,11 +235,11 @@ int Analog_Value_Encode_Property_APDU(uint8_t * apdu,
|
||||
if (array_index <= BACNET_MAX_PRIORITY) {
|
||||
if (Analog_Value_Level[object_index][array_index] ==
|
||||
ANALOG_LEVEL_NULL)
|
||||
len = encode_tagged_null(&apdu[apdu_len]);
|
||||
apdu_len = encode_tagged_null(&apdu[0]);
|
||||
else {
|
||||
real_value =
|
||||
Analog_Value_Level[object_index][array_index];
|
||||
len = encode_tagged_real(&apdu[apdu_len], real_value);
|
||||
apdu_len = encode_tagged_real(&apdu[0], real_value);
|
||||
}
|
||||
} else {
|
||||
*error_class = ERROR_CLASS_PROPERTY;
|
||||
|
||||
@@ -238,12 +238,12 @@ int Multistate_Output_Encode_Property_APDU(uint8_t * apdu,
|
||||
if (array_index <= BACNET_MAX_PRIORITY) {
|
||||
if (Multistate_Output_Level[object_index][array_index] ==
|
||||
MULTISTATE_NULL)
|
||||
len = encode_tagged_null(&apdu[apdu_len]);
|
||||
apdu_len = encode_tagged_null(&apdu[0]);
|
||||
else {
|
||||
present_value =
|
||||
Multistate_Output_Level[object_index][array_index];
|
||||
len =
|
||||
encode_tagged_unsigned(&apdu[apdu_len],
|
||||
apdu_len =
|
||||
encode_tagged_unsigned(&apdu[0],
|
||||
present_value);
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user