Corrected ReadPropertyAck unit test found on Big Endian architecture. Thank you,Sergei!
This commit is contained in:
@@ -155,7 +155,7 @@ static int Read_Property_Common(
|
||||
struct my_object_functions *pObject,
|
||||
BACNET_READ_PROPERTY_DATA * rpdata)
|
||||
{
|
||||
int apdu_len = -1;
|
||||
int apdu_len = BACNET_STATUS_ERROR;
|
||||
BACNET_CHARACTER_STRING char_string;
|
||||
char *pString = "";
|
||||
uint8_t *apdu = NULL;
|
||||
@@ -199,7 +199,7 @@ static int Read_Property_Common(
|
||||
}
|
||||
|
||||
/* Encodes the property APDU and returns the length,
|
||||
or sets the error, and returns -1 */
|
||||
or sets the error, and returns BACNET_STATUS_ERROR */
|
||||
int Device_Read_Property(
|
||||
BACNET_READ_PROPERTY_DATA * rpdata)
|
||||
{
|
||||
@@ -330,6 +330,7 @@ unsigned Device_Count(
|
||||
uint32_t Device_Index_To_Instance(
|
||||
unsigned index)
|
||||
{
|
||||
index = index;
|
||||
return Object_Instance_Number;
|
||||
}
|
||||
|
||||
@@ -593,7 +594,7 @@ char *Device_Valid_Object_Id(
|
||||
return name;
|
||||
}
|
||||
|
||||
/* return the length of the apdu encoded or -1 for error */
|
||||
/* return the length of the apdu encoded or BACNET_STATUS_ERROR for error */
|
||||
int Device_Read_Property_Local(
|
||||
BACNET_READ_PROPERTY_DATA * rpdata)
|
||||
{
|
||||
|
||||
@@ -127,7 +127,6 @@ ISR(USART0_RX_vect)
|
||||
UDR1 = data_byte;
|
||||
#endif
|
||||
(void) FIFO_Put(&Receive_Buffer, data_byte);
|
||||
timer_elapsed_start(&Silence_Timer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -364,7 +364,7 @@ void testReadPropertyAck(
|
||||
BACNET_READ_PROPERTY_DATA test_data;
|
||||
BACNET_OBJECT_TYPE object_type = OBJECT_DEVICE;
|
||||
uint32_t object_instance = 0;
|
||||
uint32_t object = 0;
|
||||
uint16_t object = 0;
|
||||
|
||||
rpdata.object_type = OBJECT_DEVICE;
|
||||
rpdata.object_instance = 1;
|
||||
|
||||
Reference in New Issue
Block a user