Forgot the header update for BBMD getter and setters.

Revised gateway demo to use the new device_init(NULL) way.
Eliminated triplicate I-Am responses and deprecated the offending routed_ I-Am and I-Have senders (don't see any other usages; scheduled for deletion in 2/2012).
Fixed I-Am sender to not always zero out dest->net, because if a src->net was given in Who-Is, need to have it or else global bcast in the I-Am  response.
This commit is contained in:
tbrennan3
2011-08-25 21:20:14 +00:00
parent 3c3d0b2e4c
commit a2a0434ef9
5 changed files with 16 additions and 33 deletions
+8 -26
View File
@@ -83,27 +83,6 @@
/** @addtogroup GatewayDemo */
/*@{*/
/* All included BACnet objects */
static object_functions_t Object_Table[] = {
{DEVICE_OBJ_FUNCTIONS},
{ANALOG_INPUT_OBJ_FUNCTIONS},
{ANALOG_OUTPUT_OBJ_FUNCTIONS},
{ANALOG_VALUE_OBJ_FUNCTIONS},
{BINARY_INPUT_OBJ_FUNCTIONS},
{BINARY_OUTPUT_OBJ_FUNCTIONS},
{BINARY_VALUE_OBJ_FUNCTIONS},
{LIFE_SAFETY_POINT_OBJ_FUNCTIONS},
{LOAD_CONTROL_OBJ_FUNCTIONS},
{MULTI_STATE_OUTPUT_OBJ_FUNCTIONS},
{MULTI_STATE_INPUT_OBJ_FUNCTIONS},
{TRENDLOG_OBJ_FUNCTIONS},
#if defined(BACFILE)
{FILE_OBJ_FUNCTIONS},
#endif
{MAX_BACNET_OBJECT_TYPE, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL}
};
/** Buffer used for receiving */
static uint8_t Rx_Buf[MAX_MPDU] = { 0 };
@@ -156,16 +135,19 @@ void Devices_Init(
static void Init_Service_Handlers(
uint32_t first_object_instance)
{
Device_Init(&Object_Table[0]);
Device_Init(NULL);
Routing_Device_Init(first_object_instance);
/* we need to handle who-is to support dynamic device binding
* For the gateway, we want the routing handlers, and we will use the
* unicast variety so we can get back through switches to different subnets */
* For the gateway, we will use the unicast variety so we can
* get back through switches to different subnets.
* Don't need the routed versions, since the npdu handler calls
* each device in turn.
*/
apdu_set_unconfirmed_handler(SERVICE_UNCONFIRMED_WHO_IS,
handler_who_is_unicast_for_routing);
handler_who_is_unicast);
apdu_set_unconfirmed_handler(SERVICE_UNCONFIRMED_WHO_HAS,
handler_who_has_for_routing);
handler_who_has);
/* set the handler for all the services we don't implement */
/* It is required to send the proper reject message... */
apdu_set_unrecognized_service_handler_handler