Added BIG_ENDIAN define to all the unit tests so they would compile.

This commit is contained in:
skarg
2007-05-28 15:37:10 +00:00
parent f12380becd
commit f936794362
29 changed files with 48 additions and 84 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ BASEDIR = .
#CFLAGS = -Wall -I.
# -g for debugging with gdb
#CFLAGS = -Wall -I. -g
CFLAGS = -Wall -I. -Itest -DTEST -DTEST_ABORT -g
CFLAGS = -Wall -I. -Itest -DBIG_ENDIAN=0 -DTEST -DTEST_ABORT -g
SRCS = bacdcode.c \
bacstr.c \
+1 -1
View File
@@ -2,7 +2,7 @@
CC = gcc
BASEDIR = .
# -g for debugging with gdb
DEFINES = -DBACFILE=1 -DBACDL_BIP=1 -DTEST -DTEST_ATOMIC_READ_FILE
DEFINES = -DBACFILE=1 -DBACDL_BIP=1 -DBIG_ENDIAN=0 -DTEST -DTEST_ATOMIC_READ_FILE
INCLUDES = -I. -Idemo/object -Itest
CFLAGS = -Wall $(INCLUDES) $(DEFINES) -g
+1 -1
View File
@@ -2,7 +2,7 @@
CC = gcc
BASEDIR = .
DEFINES = -DBACFILE=1 -DBACDL_BIP=1 -DTEST -DTEST_ATOMIC_WRITE_FILE
DEFINES = -DBACFILE=1 -DBACDL_BIP=1 -DBIG_ENDIAN=0 -DTEST -DTEST_ATOMIC_WRITE_FILE
INCLUDES = -I. -Idemo/object -Itest
CFLAGS = -Wall $(INCLUDES) $(DEFINES) -g
+1 -1
View File
@@ -4,7 +4,7 @@ BASEDIR = .
#CFLAGS = -Wall -I.
# -g for debugging with gdb
#CFLAGS = -Wall -I. -g
CFLAGS = -Wall -I. -Itest -DTEST -DTEST_BACNET_APPLICATION_DATA -g
CFLAGS = -Wall -I. -Itest -DBIG_ENDIAN=0 -DTEST -DTEST_BACNET_APPLICATION_DATA -g
SRCS = bacdcode.c \
bacstr.c \
+1 -1
View File
@@ -1,7 +1,7 @@
#Makefile to build unit tests
CC = gcc
BASEDIR = .
CFLAGS = -Wall -I. -Itest -g -DTEST -DTEST_DECODE
CFLAGS = -Wall -I. -Itest -g -DBIG_ENDIAN=0 -DTEST -DTEST_DECODE
TARGET = bacdcode
+1 -1
View File
@@ -4,7 +4,7 @@ BASEDIR = .
#CFLAGS = -Wall -I.
# -g for debugging with gdb
#CFLAGS = -Wall -I. -g
CFLAGS = -Wall -I. -Itest -DTEST -DTEST_BACERROR -g
CFLAGS = -Wall -I. -Itest -DBIG_ENDIAN=0 -DTEST -DTEST_BACERROR -g
SRCS = bacdcode.c \
bacstr.c \
+1 -1
View File
@@ -4,7 +4,7 @@ BASEDIR = .
#CFLAGS = -Wall -I.
# -g for debugging with gdb
#CFLAGS = -Wall -I. -g
CFLAGS = -Wall -I. -Itest -DTEST -DTEST_DEVICE_COMMUNICATION_CONTROL -g
CFLAGS = -Wall -I. -Itest -DBIG_ENDIAN=0 -DTEST -DTEST_DEVICE_COMMUNICATION_CONTROL -g
SRCS = bacdcode.c \
bacstr.c \
+7 -43
View File
@@ -58,6 +58,8 @@ static uint8_t Rx_Buf[MAX_MPDU] = { 0 };
static uint32_t Target_Device_Object_Instance = BACNET_MAX_INSTANCE;
static bool Error_Detected = false;
static BACNET_ADDRESS Target_Address;
/* use this parameter to set a special interface:
"eth0" on Linux, or dotted IP address on Windows */
static char *Network_Interface = NULL;
typedef struct BACnet_RP_Service_Data_t {
@@ -67,7 +69,8 @@ typedef struct BACnet_RP_Service_Data_t {
} BACNET_RP_SERVICE_DATA;
static BACNET_RP_SERVICE_DATA Read_Property_Data;
static OS_Keylist Object_List;
/* FIXME: keep the object list in here */
/* static OS_Keylist Object_List; */
static void MyErrorHandler(BACNET_ADDRESS * src,
uint8_t invoke_id,
@@ -270,47 +273,6 @@ static uint8_t Read_Properties(uint32_t device_instance)
return invoke_id;
}
static void Interpret_Arguments(int argc, char *argv[])
{
int i = 0, j = 0; /* used to index through arguments */
char *p_arg = NULL; /* points to current argument */
long number = 0; /* used for strtol */
char *p_data = NULL; /* points to data portion of argument */
if (!argv)
return;
/* skip 1st one [0] - its the command line for the filename */
for (i = 1; i < argc; i++) {
p_arg = argv[i];
if (p_arg[0] == '-') {
p_data = p_arg + 2;
switch (p_arg[1]) {
case 'a':
bip_set_addr(inet_addr(p_data));
break;
case 'd':
Network_Interface = p_data;
break;
/* double dash */
case '-':
if (strcmp(p_data, "help") == 0) {
printf
("%s device-instance\r\n",
filename_remove_path(argv[0]));
}
exit(1);
break;
default:
/* do nothing */
break;
} /* end of arguments beginning with - */
} /* dash arguments */
} /* end of arg loop */
return;
}
int main(int argc, char *argv[])
{
BACNET_ADDRESS src = { 0 }; /* address where message came from */
@@ -324,13 +286,15 @@ int main(int argc, char *argv[])
uint8_t invoke_id = 0;
bool found = false;
/* FIXME: handle multi homed systems - use an argument passed to the datalink_init() */
/* print help if not enough arguments */
if (argc < 2) {
printf
("%s device-instance\r\n",
filename_remove_path(argv[0]));
return 0;
}
Interpret_Arguments(argc, argv);
/* decode the command line parameters */
Target_Device_Object_Instance = strtol(argv[1], NULL, 0);
+1 -1
View File
@@ -4,7 +4,7 @@ BASEDIR = .
#CFLAGS = -Wall -I.
# -g for debugging with gdb
#CFLAGS = -Wall -I. -g
CFLAGS = -Wall -I. -Itest -DTEST -DTEST_ANALOG_INPUT -g
CFLAGS = -Wall -I. -Itest -DBIG_ENDIAN=0 -DTEST -DTEST_ANALOG_INPUT -g
# NOTE: this file is normally called by the unittest.sh from up directory
SRCS = bacdcode.c \
+1 -1
View File
@@ -4,7 +4,7 @@ BASEDIR = .
#CFLAGS = -Wall -I.
# -g for debugging with gdb
#CFLAGS = -Wall -I. -g
CFLAGS = -Wall -I. -Itest -DTEST -DTEST_ANALOG_OUTPUT -g
CFLAGS = -Wall -I. -Itest -DBIG_ENDIAN=0 -DTEST -DTEST_ANALOG_OUTPUT -g
# NOTE: this file is normally called by the unittest.sh from up directory
SRCS = bacdcode.c \
+1 -1
View File
@@ -4,7 +4,7 @@ BASEDIR = .
#CFLAGS = -Wall -I.
# -g for debugging with gdb
#CFLAGS = -Wall -I. -g
CFLAGS = -Wall -I. -Itest -DTEST -DTEST_ANALOG_VALUE -g
CFLAGS = -Wall -I. -Itest -DBIG_ENDIAN=0 -DTEST -DTEST_ANALOG_VALUE -g
# NOTE: this file is normally called by the unittest.sh from up directory
SRCS = bacdcode.c \
+1 -1
View File
@@ -4,7 +4,7 @@ BASEDIR = .
#CFLAGS = -Wall -I.
# -g for debugging with gdb
#CFLAGS = -Wall -I. -g
CFLAGS = -Wall -I. -Itest -DTEST -DTEST_BINARY_INPUT -g
CFLAGS = -Wall -I. -Itest -DBIG_ENDIAN=0 -DTEST -DTEST_BINARY_INPUT -g
# NOTE: this file is normally called by the unittest.sh from up directory
SRCS = bacdcode.c \
+1 -1
View File
@@ -4,7 +4,7 @@ BASEDIR = .
#CFLAGS = -Wall -I.
# -g for debugging with gdb
#CFLAGS = -Wall -I. -g
CFLAGS = -Wall -I. -Itest -DTEST -DTEST_BINARY_OUTPUT -g
CFLAGS = -Wall -I. -Itest -DBIG_ENDIAN=0 -DTEST -DTEST_BINARY_OUTPUT -g
# NOTE: this file is normally called by the unittest.sh from up directory
SRCS = bacdcode.c \
+1 -1
View File
@@ -4,7 +4,7 @@ BASEDIR = .
#CFLAGS = -Wall -I.
# -g for debugging with gdb
#CFLAGS = -Wall -I. -g
CFLAGS = -Wall -I. -Itest -DTEST -DTEST_BINARY_VALUE -g
CFLAGS = -Wall -I. -Itest -DBIG_ENDIAN=0 -DTEST -DTEST_BINARY_VALUE -g
# NOTE: this file is normally called by the unittest.sh from up directory
SRCS = bacdcode.c \
+1 -1
View File
@@ -4,7 +4,7 @@ BASEDIR = .
#CFLAGS = -Wall -I.
# -g for debugging with gdb
#CFLAGS = -Wall -I. -g
CFLAGS = -Wall -I. -Itest -DTEST -DTEST_DEVICE -g
CFLAGS = -Wall -I. -Itest -DBIG_ENDIAN=0 -DTEST -DTEST_DEVICE -g
# NOTE: this file is normally called by the unittest.sh from up directory
SRCS = bacdcode.c \
+1 -1
View File
@@ -4,7 +4,7 @@ BASEDIR = .
#CFLAGS = -Wall -I.
# -g for debugging with gdb
#CFLAGS = -Wall -I. -g
CFLAGS = -Wall -I. -Itest -DTEST -DTEST_LOAD_CONTROL -g
CFLAGS = -Wall -I. -Itest -DBIG_ENDIAN=0 -DTEST -DTEST_LOAD_CONTROL -g
# NOTE: this file is normally called by the unittest.sh from up directory
SRCS = bacdcode.c \
+1 -1
View File
@@ -4,7 +4,7 @@ BASEDIR = .
#CFLAGS = -Wall -I.
# -g for debugging with gdb
#CFLAGS = -Wall -I. -g
CFLAGS = -Wall -I. -Itest -DTEST -DTEST_LIGHTING_OUTPUT -g
CFLAGS = -Wall -I. -Itest -DBIG_ENDIAN=0 -DTEST -DTEST_LIGHTING_OUTPUT -g
# NOTE: this file is normally called by the unittest.sh from up directory
SRCS = bacdcode.c \
+1 -1
View File
@@ -4,7 +4,7 @@ BASEDIR = .
#CFLAGS = -Wall -I.
# -g for debugging with gdb
#CFLAGS = -Wall -I. -g
CFLAGS = -Wall -I. -Itest -DTEST -DTEST_LIFE_SAFETY_POINT -g
CFLAGS = -Wall -I. -Itest -DBIG_ENDIAN=0 -DTEST -DTEST_LIFE_SAFETY_POINT -g
# NOTE: this file is normally called by the unittest.sh from up directory
SRCS = bacdcode.c \
+1 -1
View File
@@ -4,7 +4,7 @@ BASEDIR = .
#CFLAGS = -Wall -I.
# -g for debugging with gdb
#CFLAGS = -Wall -I. -g
CFLAGS = -Wall -I. -Itest -DTEST -DTEST_MULTISTATE_OUTPUT -g
CFLAGS = -Wall -I. -Itest -DBIG_ENDIAN=0 -DTEST -DTEST_MULTISTATE_OUTPUT -g
# NOTE: this file is normally called by the unittest.sh from up directory
SRCS = bacdcode.c \
+1 -1
View File
@@ -2,7 +2,7 @@
CC = gcc
BASEDIR = .
# -g for debugging with gdb
DEFINES = -DBACFILE=1 -DTEST -DTEST_IAM -DBACDL_TEST -DBIG_ENDIAN=0
DEFINES = -DBACFILE=1 -DTEST -DBIG_ENDIAN=0 -DTEST_IAM -DBACDL_TEST
INCLUDES = -I. -Idemo/object -Itest
CFLAGS = -Wall $(INCLUDES) $(DEFINES) -g
+1 -1
View File
@@ -4,7 +4,7 @@ BASEDIR = .
#CFLAGS = -Wall -I.
# -g for debugging with gdb
#CFLAGS = -Wall -I. -g
CFLAGS = -Wall -I. -Itest -DTEST -DTEST_I_HAVE -g
CFLAGS = -Wall -I. -Itest -DBIG_ENDIAN=0 -DTEST -DTEST_I_HAVE -g
SRCS = bacdcode.c \
bacstr.c \
+1 -1
View File
@@ -4,7 +4,7 @@ BASEDIR = .
#CFLAGS = -Wall -I.
# -g for debugging with gdb
#CFLAGS = -Wall -I. -g
CFLAGS = -Wall -I. -Itest -DTEST -DTEST_NPDU -g
CFLAGS = -Wall -I. -Itest -DBIG_ENDIAN=0 -DTEST -DTEST_NPDU -g
SRCS = bacdcode.c \
bacstr.c \
+1 -1
View File
@@ -4,7 +4,7 @@ BASEDIR = .
#CFLAGS = -Wall -I.
# -g for debugging with gdb
#CFLAGS = -Wall -I. -g
CFLAGS = -Wall -I. -Itest -DTEST -DTEST_REINITIALIZE_DEVICE -g
CFLAGS = -Wall -I. -Itest -DBIG_ENDIAN=0 -DTEST -DTEST_REINITIALIZE_DEVICE -g
SRCS = bacdcode.c \
bacstr.c \
+1 -1
View File
@@ -4,7 +4,7 @@ BASEDIR = .
#CFLAGS = -Wall -I.
# -g for debugging with gdb
#CFLAGS = -Wall -I. -g
CFLAGS = -Wall -I. -Itest -DTEST -DTEST_REJECT -g
CFLAGS = -Wall -I. -Itest -DBIG_ENDIAN=0 -DTEST -DTEST_REJECT -g
SRCS = bacdcode.c \
bacstr.c \
+1 -1
View File
@@ -4,7 +4,7 @@ BASEDIR = .
#CFLAGS = -Wall -I.
# -g for debugging with gdb
#CFLAGS = -Wall -I. -g
CFLAGS = -Wall -I. -Itest -DTEST -DTEST_READ_PROPERTY_MULTIPLE -g
CFLAGS = -Wall -I. -Itest -DBIG_ENDIAN=0 -DTEST -DTEST_READ_PROPERTY_MULTIPLE -g
SRCS = bacdcode.c \
bacerror.c \
+1 -1
View File
@@ -4,7 +4,7 @@ BASEDIR = .
#CFLAGS = -Wall -I.
# -g for debugging with gdb
#CFLAGS = -Wall -I. -g
CFLAGS = -Wall -I. -Itest -DTEST -DTEST_TIMESYNC -g
CFLAGS = -Wall -I. -Itest -DBIG_ENDIAN=0 -DTEST -DTEST_TIMESYNC -g
SRCS = bacapp.c \
bacdcode.c \
+1 -1
View File
@@ -4,7 +4,7 @@ BASEDIR = .
#CFLAGS = -Wall -I.
# -g for debugging with gdb
#CFLAGS = -Wall -I. -g
CFLAGS = -Wall -I. -Itest -DTEST -DTEST_WHOHAS -g
CFLAGS = -Wall -I. -Itest -DBIG_ENDIAN=0 -DTEST -DTEST_WHOHAS -g
SRCS = bacdcode.c \
bacstr.c \
+1 -1
View File
@@ -4,7 +4,7 @@ BASEDIR = .
#CFLAGS = -Wall -I.
# -g for debugging with gdb
#CFLAGS = -Wall -I. -g
CFLAGS = -Wall -I. -Itest -DTEST -DTEST_WHOIS -g
CFLAGS = -Wall -I. -Itest -DBIG_ENDIAN=0 -DTEST -DTEST_WHOIS -g
SRCS = bacdcode.c \
bacstr.c \
+1 -1
View File
@@ -2,7 +2,7 @@
CC = gcc
BASEDIR = .
# -g for debugging with gdb
DEFINES = -DBACFILE=1 -DBACDL_BIP=1 -DTEST -DTEST_WRITE_PROPERTY
DEFINES = -DBACFILE=1 -DBACDL_BIP=1 -DBIG_ENDIAN=0 -DTEST -DTEST_WRITE_PROPERTY
INCLUDES = -I. -Idemo/object -Itest
CFLAGS = -Wall $(INCLUDES) $(DEFINES) -g