From a4c5bc45c39e44f0dcbe547885f4e6d73c7a0b78 Mon Sep 17 00:00:00 2001 From: kingdl802 Date: Tue, 7 Apr 2009 19:06:18 +0000 Subject: [PATCH] For the bacwp command (demo/writeprop), the maximum number of tag/value pairs you can pass from the command line defaults to 64 (in main.c.) This setting may be changed to any other value by setting MAX_PROPERTY_VALUES in either Makefile or makefile.b32 in the demo/writeprop directory. --- bacnet-stack/demo/writeprop/Makefile | 6 +++++- bacnet-stack/demo/writeprop/main.c | 5 ++++- bacnet-stack/demo/writeprop/makefile.b32 | 6 +++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/bacnet-stack/demo/writeprop/Makefile b/bacnet-stack/demo/writeprop/Makefile index c671118c..00a1bad6 100644 --- a/bacnet-stack/demo/writeprop/Makefile +++ b/bacnet-stack/demo/writeprop/Makefile @@ -11,7 +11,11 @@ TARGET = bacwp #BACDL_DEFINE = -DBACDL_MSTP=1 BACDL_DEFINE = -DBACDL_BIP=1 BACNET_DEFINES = -DBACFILE=1 -DPRINT_ENABLED=1 -DBACAPP_ALL -DEFINES = $(BACNET_DEFINES) $(BACDL_DEFINE) + +# by default bacwp can handle 64 tag/value pairs +#WRITEPROPS_DEFINE = -DMAX_PROPERTY_VALUES=64 + +DEFINES = $(BACNET_DEFINES) $(BACDL_DEFINE) $(WRITEPROPS_DEFINE) # Directories BACNET_PORT = linux diff --git a/bacnet-stack/demo/writeprop/main.c b/bacnet-stack/demo/writeprop/main.c index 617cd1ee..803ebed2 100644 --- a/bacnet-stack/demo/writeprop/main.c +++ b/bacnet-stack/demo/writeprop/main.c @@ -51,6 +51,10 @@ #include "client.h" #include "txbuf.h" +#ifndef MAX_PROPERTY_VALUES +#define MAX_PROPERTY_VALUES 64 +#endif + /* buffer used for receive */ static uint8_t Rx_Buf[MAX_MPDU] = { 0 }; @@ -61,7 +65,6 @@ static BACNET_OBJECT_TYPE Target_Object_Type = OBJECT_ANALOG_INPUT; static BACNET_PROPERTY_ID Target_Object_Property = PROP_ACKED_TRANSITIONS; /* array index value or BACNET_ARRAY_ALL */ static int32_t Target_Object_Property_Index = BACNET_ARRAY_ALL; -#define MAX_PROPERTY_VALUES 64 static BACNET_APPLICATION_DATA_VALUE Target_Object_Property_Value[MAX_PROPERTY_VALUES]; diff --git a/bacnet-stack/demo/writeprop/makefile.b32 b/bacnet-stack/demo/writeprop/makefile.b32 index d121bd6d..ceed60be 100644 --- a/bacnet-stack/demo/writeprop/makefile.b32 +++ b/bacnet-stack/demo/writeprop/makefile.b32 @@ -35,7 +35,11 @@ INCLUDES = \ BACNET_DEFINES = -DPRINT_ENABLED=1 -DBACAPP_ALL #BACDL_DEFINE=-DBACDL_MSTP=1 BACDL_DEFINE=-DBACDL_BIP=1 -DUSE_INADDR=1 -DEFINES = $(BACNET_DEFINES) $(BACDL_DEFINE) + +# by default bacwp can handle 64 tag/value pairs +WRITEPROPS_DEFINE = -DMAX_PROPERTY_VALUES=64 + +DEFINES = $(BACNET_DEFINES) $(BACDL_DEFINE) $(WRITEPROPS_DEFINE) SRCS = main.c