From 504b7c3713aea0813c8b82684f43a4b1cc460971 Mon Sep 17 00:00:00 2001 From: skarg Date: Thu, 17 Sep 2015 17:12:23 +0000 Subject: [PATCH] Added BVLC to dynamic datalink module. Thanks, Kim Taylor! --- bacnet-stack/src/datalink.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/bacnet-stack/src/datalink.c b/bacnet-stack/src/datalink.c index 108d70e8..365f46b1 100644 --- a/bacnet-stack/src/datalink.c +++ b/bacnet-stack/src/datalink.c @@ -31,6 +31,11 @@ License. ------------------------------------------- ####COPYRIGHTEND####*/ +#include "ethernet.h" +#include "bip.h" +#include "bvlc.h" +#include "arcnet.h" +#include "dlmstp.h" #include "datalink.h" #include @@ -41,10 +46,10 @@ /** Function template to Initialize the DataLink services at the given interface. * @ingroup DLTemplates - * + * * @note For Linux, ifname is eth0, ath0, arc0, ttyS0, and others. For Windows, ifname is the COM port or dotted ip address of the interface. - + * @param ifname [in] The named interface to use for the network layer. * @return True if the interface is successfully initialized, * else False if the initialization fails. @@ -95,6 +100,13 @@ void datalink_set( datalink_cleanup = bip_cleanup; datalink_get_broadcast_address = bip_get_broadcast_address; datalink_get_my_address = bip_get_my_address; + } else if (strcasecmp("bvlc", datalink_string) == 0) { + datalink_init = bip_init; + datalink_send_pdu = bvlc_send_pdu; + datalink_receive = bvlc_receive; + datalink_cleanup = bip_cleanup; + datalink_get_broadcast_address = bip_get_broadcast_address; + datalink_get_my_address = bip_get_my_address; } else if (strcasecmp("ethernet", datalink_string) == 0) { datalink_init = ethernet_init; datalink_send_pdu = ethernet_send_pdu;