Changed Device_Object_List_Identifier() to use uint32_t for array_index since that is the size decoded in a ReadProperty request, and unsigned is not always 32-bit.
This commit is contained in:
@@ -113,13 +113,13 @@ unsigned Device_Object_List_Count(
|
||||
}
|
||||
|
||||
bool Device_Object_List_Identifier(
|
||||
unsigned array_index,
|
||||
uint32_t array_index,
|
||||
int *object_type,
|
||||
uint32_t * instance)
|
||||
{
|
||||
bool status = false;
|
||||
unsigned object_index = 0;
|
||||
unsigned object_count = 0;
|
||||
uint32_t object_index = 0;
|
||||
uint32_t object_count = 0;
|
||||
|
||||
/* device object */
|
||||
if (array_index == 1) {
|
||||
@@ -173,10 +173,10 @@ int Device_Encode_Property_APDU(
|
||||
int len = 0; /* apdu len intermediate value */
|
||||
BACNET_BIT_STRING bit_string;
|
||||
BACNET_CHARACTER_STRING char_string;
|
||||
unsigned i = 0;
|
||||
uint32_t i = 0;
|
||||
int object_type = 0;
|
||||
uint32_t instance = 0;
|
||||
unsigned count = 0;
|
||||
uint32_t count = 0;
|
||||
|
||||
object_instance = object_instance;
|
||||
/* FIXME: change the hardcoded names to suit your application */
|
||||
|
||||
@@ -80,7 +80,7 @@ extern "C" {
|
||||
unsigned Device_Object_List_Count(
|
||||
void);
|
||||
bool Device_Object_List_Identifier(
|
||||
unsigned array_index,
|
||||
uint32_t array_index,
|
||||
int *object_type,
|
||||
uint32_t * instance);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user