feat: add support for external object table in device management
BACnet/SC linux tests / job_bsc_tests_linux (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
GCC / bip-apps (push) Has been cancelled
GCC / bip-no-bbmd-apps (push) Has been cancelled
GCC / bip-client-bbmd-apps (push) Has been cancelled
GCC / gateway (push) Has been cancelled
GCC / bacnet-sc-hub (push) Has been cancelled
GCC / router (push) Has been cancelled
GCC / router-ipv6 (push) Has been cancelled
GCC / router-mstp (push) Has been cancelled
GCC / bip6 (push) Has been cancelled
GCC / mstp (push) Has been cancelled
GCC / ethernet (push) Has been cancelled
GCC / ports-arm-makefile (push) Has been cancelled
GCC / ports-arm-cmake (push) Has been cancelled
GCC / ports-avr (push) Has been cancelled
GCC / ports-lwip (push) Has been cancelled
GCC / mingw (push) Has been cancelled
GCC / piface (push) Has been cancelled
GCC / blinkt (push) Has been cancelled
GCC / gtk-discover (push) Has been cancelled
GCC / ports-esp32 (push) Has been cancelled
Quality / pre-commit (push) Has been cancelled
Quality / scan-build (push) Has been cancelled
Quality / splint (push) Has been cancelled
Quality / cppcheck (push) Has been cancelled
Quality / flawfinder (push) Has been cancelled
Quality / codespell (push) Has been cancelled
Quality / unittest (push) Has been cancelled
Quality / unittest-secure-connect (push) Has been cancelled
CMake / build (macOS-latest, root) (push) Has been cancelled
CMake / build (macOS-latest, test) (push) Has been cancelled
CMake / build (ubuntu-latest, root) (push) Has been cancelled
CMake / build (ubuntu-latest, test) (push) Has been cancelled
CMake / build (windows-latest, root) (push) Has been cancelled

Signed-off-by: Tony <tonylu@tony-cloud.com>
This commit is contained in:
Tony
2026-05-04 03:14:10 +08:00
parent bf5dac2471
commit b1f4389f31
+30 -2
View File
@@ -84,6 +84,31 @@ Routed_Device_Write_Property_Local(BACNET_WRITE_PROPERTY_DATA *wp_data);
/* may be overridden by outside table */ /* may be overridden by outside table */
static object_functions_t *Object_Table; static object_functions_t *Object_Table;
#if defined(BACNET_GATEWAY_EXTERNAL_OBJECT_TABLE)
static object_functions_t My_Object_Table[] = {
{ MAX_BACNET_OBJECT_TYPE,
NULL /* Init */,
NULL /* Count */,
NULL /* Index_To_Instance */,
NULL /* Valid_Instance */,
NULL /* Object_Name */,
NULL /* Read_Property */,
NULL /* Write_Property */,
NULL /* Property_Lists */,
NULL /* ReadRangeInfo */,
NULL /* Iterator */,
NULL /* Value_Lists */,
NULL /* COV */,
NULL /* COV Clear */,
NULL /* Intrinsic Reporting */,
NULL /* Add_List_Element */,
NULL /* Remove_List_Element */,
NULL /* Create */,
NULL /* Delete */,
NULL /* Timer */,
NULL /* Writable_Property_List */ }
};
#else
static object_functions_t My_Object_Table[] = { static object_functions_t My_Object_Table[] = {
{ OBJECT_DEVICE, { OBJECT_DEVICE,
NULL /* Init - don't init Device or it will recourse! */, NULL /* Init - don't init Device or it will recourse! */,
@@ -1047,6 +1072,7 @@ static object_functions_t My_Object_Table[] = {
NULL /* Timer */, NULL /* Timer */,
NULL /* Writable_Property_List */ } NULL /* Writable_Property_List */ }
}; };
#endif
/* Proprietary property callback functions to enable proprietary /* Proprietary property callback functions to enable proprietary
properties while reusing the basic objects as-is. */ properties while reusing the basic objects as-is. */
@@ -4272,14 +4298,16 @@ void Device_Init(object_functions_t *object_table)
} }
pObject++; pObject++;
} }
#if (BACNET_PROTOCOL_REVISION >= 14) #if (BACNET_PROTOCOL_REVISION >= 14) && !defined(BACNET_GATEWAY_EXTERNAL_OBJECT_TABLE)
/* link WriteProperty to Channel object for members */ /* link WriteProperty to Channel object for members */
Channel_Write_Property_Internal_Callback_Set(Device_Write_Property); Channel_Write_Property_Internal_Callback_Set(Device_Write_Property);
#endif #endif
#if !defined(BACNET_GATEWAY_EXTERNAL_OBJECT_TABLE)
/* link ReadProperty and WriteProperty to Loop object for references */ /* link ReadProperty and WriteProperty to Loop object for references */
Loop_Read_Property_Internal_Callback_Set(Device_Read_Property); Loop_Read_Property_Internal_Callback_Set(Device_Read_Property);
Loop_Write_Property_Internal_Callback_Set(Device_Write_Property); Loop_Write_Property_Internal_Callback_Set(Device_Write_Property);
#if (BACNET_PROTOCOL_REVISION >= 17) #endif
#if (BACNET_PROTOCOL_REVISION >= 17) && !defined(BACNET_GATEWAY_EXTERNAL_OBJECT_TABLE)
/* link WriteProperty to Timer object for references */ /* link WriteProperty to Timer object for references */
Timer_Write_Property_Internal_Callback_Set(Device_Write_Property); Timer_Write_Property_Internal_Callback_Set(Device_Write_Property);
#endif #endif