diff --git a/bacnet-stack/bin/bvlc.bat b/bacnet-stack/bin/bvlc.bat index 55a8523f..73f3ad5f 100644 --- a/bacnet-stack/bin/bvlc.bat +++ b/bacnet-stack/bin/bvlc.bat @@ -1,9 +1,14 @@ -REM Example of parameters for Foreign Device Registration -REM This CMD window will use port 47809 to communicate +@echo off +echo Example of parameters for Foreign Device Registration +echo This CMD window will use port 47809 to communicate +@echo on set BACNET_IP_PORT=47809 -REM The BBMD is located at the standard port 47808 and at -REM the dotted IP address passed in on the command line. -REM When the demo client applications see the BBMD address, -REM they register as a Foreign Device to it. +@echo off +echo The BBMD is located at the standard port 47808 and at +echo the dotted IP address passed in on the command line. +echo When the demo client applications see the BBMD address, +echo they register as a Foreign Device to it. +@echo on set BACNET_BBMD_PORT=47808 set BACNET_BBMD_ADDRESS=%1 + diff --git a/bacnet-stack/build.bat b/bacnet-stack/build.bat index f41f65fe..412aeede 100644 --- a/bacnet-stack/build.bat +++ b/bacnet-stack/build.bat @@ -1,13 +1,13 @@ @echo off echo Build with MinGW mingw.sourceforge.net echo Note: copy mingw32-make.exe to make.exe to build for Win32 -make BACNET_PORT=win32 OPTIMIZATION=-Os DEBUGGING= clean all +make BACNET_PORT=win32 BUILD=release clean all rem Build for MinGW debug -rem make BACNET_PORT=win32 clean all +rem make BACNET_PORT=win32 BUILD=debug clean all rem Build for MinGW MS/TP -rem make BACNET_PORT=win32 DEBUGGING= BACDL_DEFINE=-DBACDL_MSTP=1 clean all +rem make BACNET_PORT=win32 BACDL_DEFINE=-DBACDL_MSTP=1 clean all rem On Linux, install mingw32 and use this: -rem make BACNET_PORT=win32 OPTIMIZATION=-Os DEBUGGING= CC=i586-mingw32msvc-gcc AR=i586-mingw32msvc-ar clean all +rem make BACNET_PORT=win32 CC=i586-mingw32msvc-gcc AR=i586-mingw32msvc-ar clean all diff --git a/bacnet-stack/demo/dcc/Makefile b/bacnet-stack/demo/dcc/Makefile index 68c3e8c4..084d0624 100644 --- a/bacnet-stack/demo/dcc/Makefile +++ b/bacnet-stack/demo/dcc/Makefile @@ -33,8 +33,14 @@ LIBRARY1=-L=$(BACNET_LIB_DIR),-l$(BACNET_LIB_NAME) LIBRARY2=-lws2_32,-lgcc,-lm,-liphlpapi LIBRARIES=$(LIBRARY1),$(LIBRARY2) endif -DEBUGGING = -g +#build for release (default) or debug +DEBUGGING = +OPTIMIZATION = -Os +ifeq (${BUILD},debug) OPTIMIZATION = -O0 +DEBUGGING = -g +endif +# put all the flags together CFLAGS = -Wall $(DEBUGGING) $(OPTIMIZATION) $(INCLUDES) $(DEFINES) LFLAGS = -Wl,-Map=$(TARGET).map,$(LIBRARIES) diff --git a/bacnet-stack/demo/epics/Makefile b/bacnet-stack/demo/epics/Makefile index 96f63ab0..635ec2e0 100644 --- a/bacnet-stack/demo/epics/Makefile +++ b/bacnet-stack/demo/epics/Makefile @@ -33,8 +33,14 @@ LIBRARY1=-L=$(BACNET_LIB_DIR),-l$(BACNET_LIB_NAME) LIBRARY2=-lws2_32,-lgcc,-lm,-liphlpapi LIBRARIES=$(LIBRARY1),$(LIBRARY2) endif -DEBUGGING = -g +#build for release (default) or debug +DEBUGGING = +OPTIMIZATION = -Os +ifeq (${BUILD},debug) OPTIMIZATION = -O0 +DEBUGGING = -g +endif +# put all the flags together CFLAGS = -Wall $(DEBUGGING) $(OPTIMIZATION) $(INCLUDES) $(DEFINES) LFLAGS = -Wl,-Map=$(TARGET).map,$(LIBRARIES) diff --git a/bacnet-stack/demo/iamrouter/Makefile b/bacnet-stack/demo/iamrouter/Makefile index 678753ab..da8fc23c 100644 --- a/bacnet-stack/demo/iamrouter/Makefile +++ b/bacnet-stack/demo/iamrouter/Makefile @@ -21,7 +21,7 @@ BACNET_LIB_DIR = ../../lib BACNET_LIB_NAME = bacnet BACNET_LIB_TARGET = $(BACNET_LIB_DIR)/lib$(BACNET_LIB_NAME).a # Compiler Setup -INCLUDES = -I$(BACNET_INCLUDE) -I$(BACNET_PORT_DIR) +INCLUDES = -I$(BACNET_INCLUDE) -I$(BACNET_PORT_DIR) ifeq (${BACNET_PORT},linux) PFLAGS = -pthread TARGET_BIN = ${TARGET} @@ -33,8 +33,14 @@ LIBRARY1=-L=$(BACNET_LIB_DIR),-l$(BACNET_LIB_NAME) LIBRARY2=-lws2_32,-lgcc,-lm,-liphlpapi LIBRARIES=$(LIBRARY1),$(LIBRARY2) endif -DEBUGGING = -g +#build for release (default) or debug +DEBUGGING = +OPTIMIZATION = -Os +ifeq (${BUILD},debug) OPTIMIZATION = -O0 +DEBUGGING = -g +endif +# put all the flags together CFLAGS = -Wall $(DEBUGGING) $(OPTIMIZATION) $(INCLUDES) $(DEFINES) LFLAGS = -Wl,-Map=$(TARGET).map,$(LIBRARIES) diff --git a/bacnet-stack/demo/initrouter/Makefile b/bacnet-stack/demo/initrouter/Makefile index d5ae87df..3e60217a 100644 --- a/bacnet-stack/demo/initrouter/Makefile +++ b/bacnet-stack/demo/initrouter/Makefile @@ -33,8 +33,14 @@ LIBRARY1=-L=$(BACNET_LIB_DIR),-l$(BACNET_LIB_NAME) LIBRARY2=-lws2_32,-lgcc,-lm,-liphlpapi LIBRARIES=$(LIBRARY1),$(LIBRARY2) endif -DEBUGGING = -g +#build for release (default) or debug +DEBUGGING = +OPTIMIZATION = -Os +ifeq (${BUILD},debug) OPTIMIZATION = -O0 +DEBUGGING = -g +endif +# put all the flags together CFLAGS = -Wall $(DEBUGGING) $(OPTIMIZATION) $(INCLUDES) $(DEFINES) LFLAGS = -Wl,-Map=$(TARGET).map,$(LIBRARIES) diff --git a/bacnet-stack/demo/mstpcap/Makefile b/bacnet-stack/demo/mstpcap/Makefile index 9ba1e011..9d8d6667 100644 --- a/bacnet-stack/demo/mstpcap/Makefile +++ b/bacnet-stack/demo/mstpcap/Makefile @@ -27,9 +27,14 @@ ifeq (${BACNET_PORT},win32) TARGET_BIN = ${TARGET}.exe LIBRARIES=-lws2_32,-lgcc,-lm,-liphlpapi endif -#DEBUGGING = -g -#OPTIMIZATION = -O0 +#build for release (default) or debug +DEBUGGING = OPTIMIZATION = -Os +ifeq (${BUILD},debug) +OPTIMIZATION = -O0 +DEBUGGING = -g +endif +# put all the flags together CFLAGS = -Wall $(DEBUGGING) $(OPTIMIZATION) $(INCLUDES) $(DEFINES) -fdata-sections -ffunction-sections LFLAGS = -Wl,-Map=$(TARGET).map,$(LIBRARIES),--gc-sections diff --git a/bacnet-stack/demo/readfile/Makefile b/bacnet-stack/demo/readfile/Makefile index 74934cd9..02660304 100644 --- a/bacnet-stack/demo/readfile/Makefile +++ b/bacnet-stack/demo/readfile/Makefile @@ -32,8 +32,14 @@ LIBRARY1=-L=$(BACNET_LIB_DIR),-l$(BACNET_LIB_NAME) LIBRARY2=-lws2_32,-lgcc,-lm,-liphlpapi LIBRARIES=$(LIBRARY1),$(LIBRARY2) endif -DEBUGGING = -g +#build for release (default) or debug +DEBUGGING = +OPTIMIZATION = -Os +ifeq (${BUILD},debug) OPTIMIZATION = -O0 +DEBUGGING = -g +endif +# put all the flags together CFLAGS = -Wall $(DEBUGGING) $(OPTIMIZATION) $(INCLUDES) $(DEFINES) LFLAGS = -Wl,-Map=$(TARGET).map,$(LIBRARIES) diff --git a/bacnet-stack/demo/readprop/Makefile b/bacnet-stack/demo/readprop/Makefile index 5b493433..e15a87b4 100644 --- a/bacnet-stack/demo/readprop/Makefile +++ b/bacnet-stack/demo/readprop/Makefile @@ -33,8 +33,14 @@ LIBRARY1=-L=$(BACNET_LIB_DIR),-l$(BACNET_LIB_NAME) LIBRARY2=-lws2_32,-lgcc,-lm,-liphlpapi LIBRARIES=$(LIBRARY1),$(LIBRARY2) endif -DEBUGGING = -g +#build for release (default) or debug +DEBUGGING = +OPTIMIZATION = -Os +ifeq (${BUILD},debug) OPTIMIZATION = -O0 +DEBUGGING = -g +endif +# put all the flags together CFLAGS = -Wall $(DEBUGGING) $(OPTIMIZATION) $(INCLUDES) $(DEFINES) LFLAGS = -Wl,-Map=$(TARGET).map,$(LIBRARIES) diff --git a/bacnet-stack/demo/reinit/Makefile b/bacnet-stack/demo/reinit/Makefile index b89888db..076e32bf 100644 --- a/bacnet-stack/demo/reinit/Makefile +++ b/bacnet-stack/demo/reinit/Makefile @@ -23,7 +23,7 @@ BACNET_LIB_DIR = ../../lib BACNET_LIB_NAME = bacnet BACNET_LIB_TARGET = $(BACNET_LIB_DIR)/lib$(BACNET_LIB_NAME).a # Compiler Setup -INCLUDES = -I$(BACNET_INCLUDE) -I$(BACNET_PORT_DIR) +INCLUDES = -I$(BACNET_INCLUDE) -I$(BACNET_PORT_DIR) ifeq (${BACNET_PORT},linux) PFLAGS = -pthread TARGET_BIN = ${TARGET} @@ -35,8 +35,14 @@ LIBRARY1=-L=$(BACNET_LIB_DIR),-l$(BACNET_LIB_NAME) LIBRARY2=-lws2_32,-lgcc,-lm,-liphlpapi LIBRARIES=$(LIBRARY1),$(LIBRARY2) endif -DEBUGGING = -g +#build for release (default) or debug +DEBUGGING = +OPTIMIZATION = -Os +ifeq (${BUILD},debug) OPTIMIZATION = -O0 +DEBUGGING = -g +endif +# put all the flags together CFLAGS = -Wall $(DEBUGGING) $(OPTIMIZATION) $(INCLUDES) $(DEFINES) LFLAGS = -Wl,-Map=$(TARGET).map,$(LIBRARIES) diff --git a/bacnet-stack/demo/server/Makefile b/bacnet-stack/demo/server/Makefile index 0e06b0d8..093e5d55 100644 --- a/bacnet-stack/demo/server/Makefile +++ b/bacnet-stack/demo/server/Makefile @@ -35,8 +35,14 @@ LIBRARY1=-L=$(BACNET_LIB_DIR),-l$(BACNET_LIB_NAME) LIBRARY2=-lws2_32,-lgcc,-lm,-liphlpapi LIBRARIES=$(LIBRARY1),$(LIBRARY2) endif -DEBUGGING = -g +#build for release (default) or debug +DEBUGGING = +OPTIMIZATION = -Os +ifeq (${BUILD},debug) OPTIMIZATION = -O0 +DEBUGGING = -g +endif +# put all the flags together CFLAGS = -Wall $(DEBUGGING) $(OPTIMIZATION) $(INCLUDES) $(DEFINES) -fdata-sections -ffunction-sections LFLAGS = -Wl,-Map=$(TARGET).map,$(LIBRARIES),--gc-sections diff --git a/bacnet-stack/demo/server/main.c b/bacnet-stack/demo/server/main.c index f1e4e776..8a3fa79f 100644 --- a/bacnet-stack/demo/server/main.c +++ b/bacnet-stack/demo/server/main.c @@ -87,6 +87,8 @@ static void Init_Service_Handlers( handler_timesync); apdu_set_confirmed_handler(SERVICE_CONFIRMED_SUBSCRIBE_COV, handler_cov_subscribe); + apdu_set_unconfirmed_handler(SERVICE_UNCONFIRMED_COV_NOTIFICATION, + handler_ucov_notification); /* handle communication so we can shutup when asked */ apdu_set_confirmed_handler(SERVICE_CONFIRMED_DEVICE_COMMUNICATION_CONTROL, handler_device_communication_control); diff --git a/bacnet-stack/demo/timesync/Makefile b/bacnet-stack/demo/timesync/Makefile index 386497a8..4879311d 100644 --- a/bacnet-stack/demo/timesync/Makefile +++ b/bacnet-stack/demo/timesync/Makefile @@ -23,7 +23,7 @@ BACNET_LIB_DIR = ../../lib BACNET_LIB_NAME = bacnet BACNET_LIB_TARGET = $(BACNET_LIB_DIR)/lib$(BACNET_LIB_NAME).a # Compiler Setup -INCLUDES = -I$(BACNET_INCLUDE) -I$(BACNET_PORT_DIR) +INCLUDES = -I$(BACNET_INCLUDE) -I$(BACNET_PORT_DIR) ifeq (${BACNET_PORT},linux) PFLAGS = -pthread TARGET_BIN = ${TARGET} @@ -35,8 +35,14 @@ LIBRARY1=-L=$(BACNET_LIB_DIR),-l$(BACNET_LIB_NAME) LIBRARY2=-lws2_32,-lgcc,-lm,-liphlpapi LIBRARIES=$(LIBRARY1),$(LIBRARY2) endif -DEBUGGING = -g +#build for release (default) or debug +DEBUGGING = +OPTIMIZATION = -Os +ifeq (${BUILD},debug) OPTIMIZATION = -O0 +DEBUGGING = -g +endif +# put all the flags together CFLAGS = -Wall $(DEBUGGING) $(OPTIMIZATION) $(INCLUDES) $(DEFINES) LFLAGS = -Wl,-Map=$(TARGET).map,$(LIBRARIES) diff --git a/bacnet-stack/demo/ucov/Makefile b/bacnet-stack/demo/ucov/Makefile index 4c35954d..80ba727c 100644 --- a/bacnet-stack/demo/ucov/Makefile +++ b/bacnet-stack/demo/ucov/Makefile @@ -23,7 +23,7 @@ BACNET_LIB_DIR = ../../lib BACNET_LIB_NAME = bacnet BACNET_LIB_TARGET = $(BACNET_LIB_DIR)/lib$(BACNET_LIB_NAME).a # Compiler Setup -INCLUDES = -I$(BACNET_INCLUDE) -I$(BACNET_PORT_DIR) +INCLUDES = -I$(BACNET_INCLUDE) -I$(BACNET_PORT_DIR) ifeq (${BACNET_PORT},linux) PFLAGS = -pthread TARGET_BIN = ${TARGET} @@ -35,8 +35,14 @@ LIBRARY1=-L=$(BACNET_LIB_DIR),-l$(BACNET_LIB_NAME) LIBRARY2=-lws2_32,-lgcc,-lm,-liphlpapi LIBRARIES=$(LIBRARY1),$(LIBRARY2) endif -DEBUGGING = -g +#build for release (default) or debug +DEBUGGING = +OPTIMIZATION = -Os +ifeq (${BUILD},debug) OPTIMIZATION = -O0 +DEBUGGING = -g +endif +# put all the flags together CFLAGS = -Wall $(DEBUGGING) $(OPTIMIZATION) $(INCLUDES) $(DEFINES) LFLAGS = -Wl,-Map=$(TARGET).map,$(LIBRARIES) diff --git a/bacnet-stack/demo/whohas/Makefile b/bacnet-stack/demo/whohas/Makefile index 61a08ce6..424e7246 100644 --- a/bacnet-stack/demo/whohas/Makefile +++ b/bacnet-stack/demo/whohas/Makefile @@ -23,7 +23,7 @@ BACNET_LIB_DIR = ../../lib BACNET_LIB_NAME = bacnet BACNET_LIB_TARGET = $(BACNET_LIB_DIR)/lib$(BACNET_LIB_NAME).a # Compiler Setup -INCLUDES = -I$(BACNET_INCLUDE) -I$(BACNET_PORT_DIR) +INCLUDES = -I$(BACNET_INCLUDE) -I$(BACNET_PORT_DIR) ifeq (${BACNET_PORT},linux) PFLAGS = -pthread TARGET_BIN = ${TARGET} @@ -35,8 +35,14 @@ LIBRARY1=-L=$(BACNET_LIB_DIR),-l$(BACNET_LIB_NAME) LIBRARY2=-lws2_32,-lgcc,-lm,-liphlpapi LIBRARIES=$(LIBRARY1),$(LIBRARY2) endif -DEBUGGING = -g +#build for release (default) or debug +DEBUGGING = +OPTIMIZATION = -Os +ifeq (${BUILD},debug) OPTIMIZATION = -O0 +DEBUGGING = -g +endif +# put all the flags together CFLAGS = -Wall $(DEBUGGING) $(OPTIMIZATION) $(INCLUDES) $(DEFINES) LFLAGS = -Wl,-Map=$(TARGET).map,$(LIBRARIES) diff --git a/bacnet-stack/demo/whois/Makefile b/bacnet-stack/demo/whois/Makefile index a0910fee..a8a35c66 100644 --- a/bacnet-stack/demo/whois/Makefile +++ b/bacnet-stack/demo/whois/Makefile @@ -21,7 +21,7 @@ BACNET_LIB_DIR = ../../lib BACNET_LIB_NAME = bacnet BACNET_LIB_TARGET = $(BACNET_LIB_DIR)/lib$(BACNET_LIB_NAME).a # Compiler Setup -INCLUDES = -I$(BACNET_INCLUDE) -I$(BACNET_PORT_DIR) +INCLUDES = -I$(BACNET_INCLUDE) -I$(BACNET_PORT_DIR) ifeq (${BACNET_PORT},linux) PFLAGS = -pthread TARGET_BIN = ${TARGET} @@ -33,8 +33,14 @@ LIBRARY1=-L=$(BACNET_LIB_DIR),-l$(BACNET_LIB_NAME) LIBRARY2=-lws2_32,-lgcc,-lm,-liphlpapi LIBRARIES=$(LIBRARY1),$(LIBRARY2) endif -DEBUGGING = -g +#build for release (default) or debug +DEBUGGING = +OPTIMIZATION = -Os +ifeq (${BUILD},debug) OPTIMIZATION = -O0 +DEBUGGING = -g +endif +# put all the flags together CFLAGS = -Wall $(DEBUGGING) $(OPTIMIZATION) $(INCLUDES) $(DEFINES) LFLAGS = -Wl,-Map=$(TARGET).map,$(LIBRARIES) diff --git a/bacnet-stack/demo/whoisrouter/Makefile b/bacnet-stack/demo/whoisrouter/Makefile index 08aad23a..fcf6537a 100644 --- a/bacnet-stack/demo/whoisrouter/Makefile +++ b/bacnet-stack/demo/whoisrouter/Makefile @@ -33,8 +33,14 @@ LIBRARY1=-L=$(BACNET_LIB_DIR),-l$(BACNET_LIB_NAME) LIBRARY2=-lws2_32,-lgcc,-lm,-liphlpapi LIBRARIES=$(LIBRARY1),$(LIBRARY2) endif -DEBUGGING = -g +#build for release (default) or debug +DEBUGGING = +OPTIMIZATION = -Os +ifeq (${BUILD},debug) OPTIMIZATION = -O0 +DEBUGGING = -g +endif +# put all the flags together CFLAGS = -Wall $(DEBUGGING) $(OPTIMIZATION) $(INCLUDES) $(DEFINES) LFLAGS = -Wl,-Map=$(TARGET).map,$(LIBRARIES) diff --git a/bacnet-stack/demo/writefile/Makefile b/bacnet-stack/demo/writefile/Makefile index 9872f967..f4125853 100644 --- a/bacnet-stack/demo/writefile/Makefile +++ b/bacnet-stack/demo/writefile/Makefile @@ -23,7 +23,7 @@ BACNET_LIB_DIR = ../../lib BACNET_LIB_NAME = bacnet BACNET_LIB_TARGET = $(BACNET_LIB_DIR)/lib$(BACNET_LIB_NAME).a # Compiler Setup -INCLUDES = -I$(BACNET_INCLUDE) -I$(BACNET_PORT_DIR) +INCLUDES = -I$(BACNET_INCLUDE) -I$(BACNET_PORT_DIR) ifeq (${BACNET_PORT},linux) PFLAGS = -pthread TARGET_BIN = ${TARGET} @@ -35,8 +35,14 @@ LIBRARY1=-L=$(BACNET_LIB_DIR),-l$(BACNET_LIB_NAME) LIBRARY2=-lws2_32,-lgcc,-lm,-liphlpapi LIBRARIES=$(LIBRARY1),$(LIBRARY2) endif -DEBUGGING = -g +#build for release (default) or debug +DEBUGGING = +OPTIMIZATION = -Os +ifeq (${BUILD},debug) OPTIMIZATION = -O0 +DEBUGGING = -g +endif +# put all the flags together CFLAGS = -Wall $(DEBUGGING) $(OPTIMIZATION) $(INCLUDES) $(DEFINES) LFLAGS = -Wl,-Map=$(TARGET).map,$(LIBRARIES) diff --git a/bacnet-stack/demo/writeprop/Makefile b/bacnet-stack/demo/writeprop/Makefile index f83f5750..562df159 100644 --- a/bacnet-stack/demo/writeprop/Makefile +++ b/bacnet-stack/demo/writeprop/Makefile @@ -23,7 +23,7 @@ BACNET_LIB_DIR = ../../lib BACNET_LIB_NAME = bacnet BACNET_LIB_TARGET = $(BACNET_LIB_DIR)/lib$(BACNET_LIB_NAME).a # Compiler Setup -INCLUDES = -I$(BACNET_INCLUDE) -I$(BACNET_PORT_DIR) +INCLUDES = -I$(BACNET_INCLUDE) -I$(BACNET_PORT_DIR) ifeq (${BACNET_PORT},linux) PFLAGS = -pthread TARGET_BIN = ${TARGET} @@ -35,8 +35,14 @@ LIBRARY1=-L=$(BACNET_LIB_DIR),-l$(BACNET_LIB_NAME) LIBRARY2=-lws2_32,-lgcc,-lm,-liphlpapi LIBRARIES=$(LIBRARY1),$(LIBRARY2) endif -DEBUGGING = -g +#build for release (default) or debug +DEBUGGING = +OPTIMIZATION = -Os +ifeq (${BUILD},debug) OPTIMIZATION = -O0 +DEBUGGING = -g +endif +# put all the flags together CFLAGS = -Wall $(DEBUGGING) $(OPTIMIZATION) $(INCLUDES) $(DEFINES) LFLAGS = -Wl,-Map=$(TARGET).map,$(LIBRARIES)