Fixed BACDL=none build for makefile building (#213)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
@@ -30,6 +30,9 @@ endif
|
||||
ifeq (${BACDL},bip6)
|
||||
BACDL_DEFINE=-DBACDL_BIP6=1
|
||||
endif
|
||||
ifeq (${BACDL},none)
|
||||
BACDL_DEFINE=-DBACDL_NONE=1
|
||||
endif
|
||||
ifeq (${BACDL},)
|
||||
BACDL_DEFINE ?= -DBACDL_BIP=1
|
||||
BBMD_DEFINE ?= -DBBMD_ENABLED=1 -DBBMD_CLIENT_ENABLED
|
||||
@@ -150,6 +153,9 @@ PORT_ALL_SRC = \
|
||||
$(PORT_BIP_SRC) \
|
||||
$(PORT_BIP6_SRC)
|
||||
|
||||
PORT_NONE_SRC = \
|
||||
$(BACNET_SRC_DIR)/bacnet/datalink/datalink.c
|
||||
|
||||
ifeq (${BACDL_DEFINE},-DBACDL_BIP=1)
|
||||
BACNET_PORT_SRC = ${PORT_BIP_SRC}
|
||||
endif
|
||||
@@ -165,6 +171,9 @@ endif
|
||||
ifeq (${BACDL_DEFINE},-DBACDL_ETHERNET=1)
|
||||
BACNET_PORT_SRC = ${PORT_ETHERNET_SRC}
|
||||
endif
|
||||
ifeq (${BACDL_DEFINE},-DBACDL_NONE=1)
|
||||
BACNET_PORT_SRC = ${PORT_NONE_SRC}
|
||||
endif
|
||||
ifdef BACDL_ALL
|
||||
BACNET_PORT_SRC = ${PORT_ALL_SRC}
|
||||
endif
|
||||
|
||||
@@ -140,17 +140,34 @@ void datalink_set(char *datalink_string)
|
||||
#endif
|
||||
|
||||
#if defined(BACDL_NONE)
|
||||
bool datalink_init(char *ifname)
|
||||
{
|
||||
(void)ifname;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
int datalink_send_pdu(BACNET_ADDRESS *dest,
|
||||
BACNET_NPDU_DATA *npdu_data,
|
||||
uint8_t *pdu,
|
||||
unsigned pdu_len)
|
||||
{
|
||||
(void)dest;
|
||||
(void)npdu_data;
|
||||
(void)pdu;
|
||||
(void)pdu_len;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint16_t datalink_receive(
|
||||
BACNET_ADDRESS *src, uint8_t *pdu, uint16_t max_pdu, unsigned timeout)
|
||||
{
|
||||
(void)src;
|
||||
(void)pdu;
|
||||
(void)max_pdu;
|
||||
(void)timeout;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -160,18 +177,22 @@ void datalink_cleanup(void)
|
||||
|
||||
void datalink_get_broadcast_address(BACNET_ADDRESS *dest)
|
||||
{
|
||||
(void)dest;
|
||||
}
|
||||
|
||||
void datalink_get_my_address(BACNET_ADDRESS *my_address)
|
||||
{
|
||||
(void)my_address;
|
||||
}
|
||||
|
||||
void datalink_set_interface(char *ifname)
|
||||
{
|
||||
(void)ifname;
|
||||
}
|
||||
|
||||
void datalink_set(char *datalink_string)
|
||||
{
|
||||
(void)datalink_string;
|
||||
}
|
||||
|
||||
void datalink_maintenance_timer(uint16_t seconds)
|
||||
|
||||
@@ -103,6 +103,9 @@ void routed_get_my_address(
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool datalink_init(char *ifname);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
int datalink_send_pdu(
|
||||
BACNET_ADDRESS * dest,
|
||||
|
||||
Reference in New Issue
Block a user