Combined the interface set into the datalink_init for all the datalink layers. Changed all the demo programs to use datalink_init instead of specific datalink functions.
This commit is contained in:
@@ -20,7 +20,7 @@ CFLAGS = -Wall -g $(INCLUDES) $(DEFINES)
|
||||
|
||||
TARGET = bacawf
|
||||
|
||||
SRCS = writefile.c \
|
||||
SRCS = main.c \
|
||||
$(BACNET_PORT)/bip-init.c \
|
||||
$(BACNET_ROOT)/bip.c \
|
||||
$(BACNET_HANDLER)/txbuf.c \
|
||||
|
||||
@@ -186,10 +186,7 @@ int main(int argc, char *argv[])
|
||||
Device_Set_Object_Instance_Number(BACNET_MAX_INSTANCE);
|
||||
address_init();
|
||||
Init_Service_Handlers();
|
||||
/* configure standard BACnet/IP port */
|
||||
bip_set_interface("eth0"); /* for linux */
|
||||
bip_set_port(0xBAC0);
|
||||
if (!bip_init())
|
||||
if (!datalink_init(NULL))
|
||||
return 1;
|
||||
/* configure the timeout values */
|
||||
last_seconds = time(NULL);
|
||||
@@ -204,7 +201,7 @@ int main(int argc, char *argv[])
|
||||
current_seconds = time(NULL);
|
||||
|
||||
/* returns 0 bytes on timeout */
|
||||
pdu_len = bip_receive(&src, &Rx_Buf[0], MAX_MPDU, timeout);
|
||||
pdu_len = datalink_receive(&src, &Rx_Buf[0], MAX_MPDU, timeout);
|
||||
|
||||
/* process */
|
||||
if (pdu_len) {
|
||||
@@ -17,7 +17,7 @@ PRODUCT_EXE = $(PRODUCT).exe
|
||||
# Choose the Data Link Layer to Enable
|
||||
DEFINES = -DBACDL_BIP=1;TSM_ENABLED=1;BIG_ENDIAN=0;PRINT_ENABLED=1
|
||||
|
||||
SRCS = writefile.c \
|
||||
SRCS = main.c \
|
||||
..\..\ports\win32\bip-init.c \
|
||||
..\..\bip.c \
|
||||
..\..\demo\handler\txbuf.c \
|
||||
|
||||
Reference in New Issue
Block a user