Updated some Device_Init functions.
This commit is contained in:
@@ -47,8 +47,9 @@ static char *Object_Name = "My Device";
|
||||
static BACNET_DEVICE_STATUS System_Status = STATUS_OPERATIONAL;
|
||||
|
||||
void Device_Init(
|
||||
void)
|
||||
object_functions_t * object_table)
|
||||
{
|
||||
(void)object_table;
|
||||
/* Reinitialize_State = BACNET_REINIT_IDLE; */
|
||||
/* dcc_set_status_duration(COMMUNICATION_ENABLE, 0); */
|
||||
/* FIXME: Get the data from the eeprom */
|
||||
|
||||
@@ -162,7 +162,7 @@ static void Read_Properties(
|
||||
static void Init_Service_Handlers(
|
||||
void)
|
||||
{
|
||||
Device_Init();
|
||||
Device_Init(NULL);
|
||||
handler_read_property_object_set(OBJECT_DEVICE,
|
||||
Device_Encode_Property_APDU, Device_Valid_Object_Instance_Number);
|
||||
/* we need to handle who-is to support dynamic device binding */
|
||||
|
||||
@@ -49,7 +49,7 @@ void bacnet_init(
|
||||
void)
|
||||
{
|
||||
/* initialize objects */
|
||||
Device_Init();
|
||||
Device_Init(NULL);
|
||||
|
||||
/* set up our confirmed service unrecognized service handler - required! */
|
||||
apdu_set_unrecognized_service_handler_handler
|
||||
|
||||
@@ -948,11 +948,13 @@ bool Device_Write_Property(
|
||||
/** Initialize the Device Object and each of its child Object instances.
|
||||
* @ingroup ObjIntf
|
||||
*/
|
||||
void Device_Init(
|
||||
void)
|
||||
void Device_Init(
|
||||
object_functions_t * object_table)
|
||||
{
|
||||
struct my_object_functions *pObject = NULL;
|
||||
|
||||
/* not using the standard table - using our own */
|
||||
(void)object_table;
|
||||
pObject = &Object_Table[0];
|
||||
while (pObject->Object_Type < MAX_BACNET_OBJECT_TYPE) {
|
||||
if (pObject->Object_Init) {
|
||||
|
||||
Reference in New Issue
Block a user