Added wildcard check for bi objects (#663)

Co-authored-by: Nik Schewtschuk <nikonlinee@gmail.com>
This commit is contained in:
NikSchew
2024-06-02 13:51:12 +02:00
committed by GitHub
parent 7276bf471d
commit ec066fcc70
+11
View File
@@ -917,6 +917,17 @@ uint32_t Binary_Input_Create(uint32_t object_instance)
struct object_data *pObject = NULL;
int index = 0;
if (object_instance > BACNET_MAX_INSTANCE) {
return BACNET_MAX_INSTANCE;
} else if (object_instance == BACNET_MAX_INSTANCE) {
/* wildcard instance */
/* the Object_Identifier property of the newly created object
shall be initialized to a value that is unique within the
responding BACnet-user device. The method used to generate
the object identifier is a local matter.*/
object_instance = Keylist_Next_Empty_Key(Object_List, 1);
}
pObject = Binary_Input_Object(object_instance);
if (!pObject) {
pObject = calloc(1, sizeof(struct object_data));