Changed Object Table from a global to a local variable and added a Device function to initialize it.

This commit is contained in:
skarg
2010-12-13 03:41:55 +00:00
parent 20ca252a8d
commit 8f1e8d82cd
19 changed files with 151 additions and 121 deletions
+4 -3
View File
@@ -52,9 +52,9 @@
#include "dlenv.h"
/* All included BACnet objects */
object_functions_t Object_Table[] = {
{DEVICE_OBJ_FUNCTIONS},
{MAX_BACNET_OBJECT_TYPE, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL},
static object_functions_t Object_Table[] = {
{DEVICE_OBJ_FUNCTIONS},
{MAX_BACNET_OBJECT_TYPE, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL},
};
/* buffer used for receive */
@@ -122,6 +122,7 @@ void MyDeviceCommunicationControlSimpleAckHandler(
static void Init_Service_Handlers(
void)
{
Device_Initialize_Object_Functions(&Object_Table[0]);
Device_Init();
/* we need to handle who-is
to support dynamic device binding to us */