Fixed up Device_Object_Name_Copy() for these ports.
This commit is contained in:
@@ -592,27 +592,16 @@ bool Device_Valid_Object_Id(
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Device_Object_Name_Copy(
|
bool Device_Object_Name_Copy(
|
||||||
int object_type,
|
BACNET_OBJECT_TYPE object_type,
|
||||||
uint32_t object_instance,
|
uint32_t object_instance,
|
||||||
BACNET_CHARACTER_STRING * object_name)
|
BACNET_CHARACTER_STRING * object_name)
|
||||||
{
|
{
|
||||||
struct my_object_functions *pObject = NULL;
|
struct my_object_functions *pObject = NULL;
|
||||||
bool found = false;
|
bool found = false;
|
||||||
int type = 0;
|
|
||||||
uint32_t instance;
|
|
||||||
unsigned max_objects = 0, i = 0;
|
|
||||||
bool check_id = false;
|
|
||||||
|
|
||||||
max_objects = Device_Object_List_Count();
|
pObject = Device_Objects_Find_Functions(object_type);
|
||||||
for (i = 0; i < max_objects; i++) {
|
if ((pObject != NULL) && (pObject->Object_Valid_Instance != NULL)) {
|
||||||
check_id = Device_Object_List_Identifier(i, &type, &instance);
|
found = pObject->Object_Name(object_instance, object_name);
|
||||||
if (check_id) {
|
|
||||||
pObject = Device_Objects_Find_Functions(type);
|
|
||||||
if ((pObject != NULL) && (pObject->Object_Name != NULL)) {
|
|
||||||
found = pObject->Object_Name(instance, object_name);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return found;
|
return found;
|
||||||
|
|||||||
@@ -623,27 +623,15 @@ bool Device_Valid_Object_Id(
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Device_Object_Name_Copy(
|
bool Device_Object_Name_Copy(
|
||||||
int object_type,
|
BACNET_OBJECT_TYPE object_type,
|
||||||
uint32_t object_instance,
|
uint32_t object_instance,
|
||||||
BACNET_CHARACTER_STRING * object_name)
|
BACNET_CHARACTER_STRING * object_name)
|
||||||
{
|
{
|
||||||
struct my_object_functions *pObject = NULL;
|
struct my_object_functions *pObject = NULL;
|
||||||
bool found = false;
|
bool found = false;
|
||||||
int type = 0;
|
pObject = Device_Objects_Find_Functions(object_type);
|
||||||
uint32_t instance;
|
if ((pObject != NULL) && (pObject->Object_Valid_Instance != NULL)) {
|
||||||
unsigned max_objects = 0, i = 0;
|
found = pObject->Object_Name(object_instance, object_name);
|
||||||
bool check_id = false;
|
|
||||||
|
|
||||||
max_objects = Device_Object_List_Count();
|
|
||||||
for (i = 0; i < max_objects; i++) {
|
|
||||||
check_id = Device_Object_List_Identifier(i, &type, &instance);
|
|
||||||
if (check_id) {
|
|
||||||
pObject = Device_Objects_Find_Functions(type);
|
|
||||||
if ((pObject != NULL) && (pObject->Object_Name != NULL)) {
|
|
||||||
found = pObject->Object_Name(instance, object_name);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return found;
|
return found;
|
||||||
|
|||||||
@@ -575,27 +575,15 @@ bool Device_Valid_Object_Id(
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Device_Object_Name_Copy(
|
bool Device_Object_Name_Copy(
|
||||||
int object_type,
|
BACNET_OBJECT_TYPE object_type,
|
||||||
uint32_t object_instance,
|
uint32_t object_instance,
|
||||||
BACNET_CHARACTER_STRING * object_name)
|
BACNET_CHARACTER_STRING * object_name)
|
||||||
{
|
{
|
||||||
struct my_object_functions *pObject = NULL;
|
struct my_object_functions *pObject = NULL;
|
||||||
bool found = false;
|
bool found = false;
|
||||||
int type = 0;
|
pObject = Device_Objects_Find_Functions(object_type);
|
||||||
uint32_t instance;
|
if ((pObject != NULL) && (pObject->Object_Valid_Instance != NULL)) {
|
||||||
unsigned max_objects = 0, i = 0;
|
found = pObject->Object_Name(object_instance, object_name);
|
||||||
bool check_id = false;
|
|
||||||
|
|
||||||
max_objects = Device_Object_List_Count();
|
|
||||||
for (i = 0; i < max_objects; i++) {
|
|
||||||
check_id = Device_Object_List_Identifier(i, &type, &instance);
|
|
||||||
if (check_id) {
|
|
||||||
pObject = Device_Objects_Find_Functions((BACNET_OBJECT_TYPE) type);
|
|
||||||
if ((pObject != NULL) && (pObject->Object_Name != NULL)) {
|
|
||||||
found = pObject->Object_Name(instance, object_name);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return found;
|
return found;
|
||||||
|
|||||||
Reference in New Issue
Block a user