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:
skarg
2007-05-25 01:08:42 +00:00
parent 076ee5f3ca
commit 8026dc003b
29 changed files with 123 additions and 295 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ CFLAGS = -Wall -g $(INCLUDES) $(DEFINES)
TARGET = bacrp
SRCS = readprop.c \
SRCS = main.c \
$(BACNET_PORT)/bip-init.c \
$(BACNET_PORT)/ethernet.c \
$(BACNET_PORT)/arcnet.c \
@@ -175,21 +175,8 @@ int main(int argc, char *argv[])
Device_Set_Object_Instance_Number(BACNET_MAX_INSTANCE);
address_init();
Init_Service_Handlers();
#if defined(BACDL_ETHERNET)
/* init the physical layer */
if (!ethernet_init("eth0"))
if (!datalink_init(NULL))
return 1;
#elif defined(BACDL_BIP)
bip_set_interface("eth0");
if (!bip_init())
return 1;
printf("bip: using port %hu\r\n", bip_get_port());
#elif defined(BACDL_ARCNET)
if (!arcnet_init("arc0"))
return 1;
#else
#error Datalink (BACDL_ETHERNET,BACDL_BIP, or BACDL_ARCNET) undefined
#endif
/* configure the timeout values */
last_seconds = time(NULL);
timeout_seconds = (Device_APDU_Timeout() / 1000) *
+1 -1
View File
@@ -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 = readprop.c \
SRCS = main.c \
..\..\ports\win32\bip-init.c \
..\..\filename.c \
..\..\bip.c \