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,
|
struct my_object_functions *pObject,
|
||||||
BACNET_READ_PROPERTY_DATA * rpdata)
|
BACNET_READ_PROPERTY_DATA * rpdata)
|
||||||
{
|
{
|
||||||
int apdu_len = -1;
|
int apdu_len = BACNET_STATUS_ERROR;
|
||||||
BACNET_CHARACTER_STRING char_string;
|
BACNET_CHARACTER_STRING char_string;
|
||||||
char *pString = "";
|
char *pString = "";
|
||||||
uint8_t *apdu = NULL;
|
uint8_t *apdu = NULL;
|
||||||
@@ -199,7 +199,7 @@ static int Read_Property_Common(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Encodes the property APDU and returns the length,
|
/* 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(
|
int Device_Read_Property(
|
||||||
BACNET_READ_PROPERTY_DATA * rpdata)
|
BACNET_READ_PROPERTY_DATA * rpdata)
|
||||||
{
|
{
|
||||||
@@ -330,6 +330,7 @@ unsigned Device_Count(
|
|||||||
uint32_t Device_Index_To_Instance(
|
uint32_t Device_Index_To_Instance(
|
||||||
unsigned index)
|
unsigned index)
|
||||||
{
|
{
|
||||||
|
index = index;
|
||||||
return Object_Instance_Number;
|
return Object_Instance_Number;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -593,7 +594,7 @@ char *Device_Valid_Object_Id(
|
|||||||
return name;
|
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(
|
int Device_Read_Property_Local(
|
||||||
BACNET_READ_PROPERTY_DATA * rpdata)
|
BACNET_READ_PROPERTY_DATA * rpdata)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -127,7 +127,6 @@ ISR(USART0_RX_vect)
|
|||||||
UDR1 = data_byte;
|
UDR1 = data_byte;
|
||||||
#endif
|
#endif
|
||||||
(void) FIFO_Put(&Receive_Buffer, data_byte);
|
(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_READ_PROPERTY_DATA test_data;
|
||||||
BACNET_OBJECT_TYPE object_type = OBJECT_DEVICE;
|
BACNET_OBJECT_TYPE object_type = OBJECT_DEVICE;
|
||||||
uint32_t object_instance = 0;
|
uint32_t object_instance = 0;
|
||||||
uint32_t object = 0;
|
uint16_t object = 0;
|
||||||
|
|
||||||
rpdata.object_type = OBJECT_DEVICE;
|
rpdata.object_type = OBJECT_DEVICE;
|
||||||
rpdata.object_instance = 1;
|
rpdata.object_instance = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user