From 8aa905ce682bafcda064af069855dd9e1145e710 Mon Sep 17 00:00:00 2001 From: skarg Date: Fri, 31 Aug 2007 22:05:02 +0000 Subject: [PATCH] Corrected unit test builds on Linux. --- bacnet-stack/address.mak | 3 ++- bacnet-stack/config.h | 2 +- bacnet-stack/demo/object/device.mak | 2 +- bacnet-stack/mstp.c | 12 ++++++++---- bacnet-stack/tsm.mak | 1 + 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/bacnet-stack/address.mak b/bacnet-stack/address.mak index 8d11a224..2b915b0e 100644 --- a/bacnet-stack/address.mak +++ b/bacnet-stack/address.mak @@ -7,7 +7,8 @@ BASEDIR = . CFLAGS = -Wall -I. -Itest -DTEST -DTEST_ADDRESS -g SRCS = address.c \ - test/ctest.c + bacaddr.c \ + test/ctest.c OBJS = ${SRCS:.c=.o} diff --git a/bacnet-stack/config.h b/bacnet-stack/config.h index 69f3265e..267be280 100644 --- a/bacnet-stack/config.h +++ b/bacnet-stack/config.h @@ -6,7 +6,7 @@ /* declare a single physical layer using your compiler define. see datalink.h for possible defines. */ -#if !(defined(BACDL_ETHERNET) || defined(BACDL_ARCNET) || defined(BACDL_MSTP) || defined(BACDL_BIP)) +#if !(defined(BACDL_ETHERNET) || defined(BACDL_ARCNET) || defined(BACDL_MSTP) || defined(BACDL_BIP) || defined(BACDL_TEST)) #define BACDL_BIP #endif diff --git a/bacnet-stack/demo/object/device.mak b/bacnet-stack/demo/object/device.mak index 8063d6a9..4c42ae9f 100644 --- a/bacnet-stack/demo/object/device.mak +++ b/bacnet-stack/demo/object/device.mak @@ -4,7 +4,7 @@ BASEDIR = . #CFLAGS = -Wall -I. # -g for debugging with gdb #CFLAGS = -Wall -I. -g -CFLAGS = -Wall -I. -Itest -DBIG_ENDIAN=0 -DTEST -DTEST_DEVICE -g +CFLAGS = -g -Wall -I. -Itest -DBIG_ENDIAN=0 -DTEST -DTEST_DEVICE -DBACDL_TEST -DMAX_TSM_TRANSACTIONS=0 # NOTE: this file is normally called by the unittest.sh from up directory SRCS = bacdcode.c \ diff --git a/bacnet-stack/mstp.c b/bacnet-stack/mstp.c index 52016517..c252e330 100644 --- a/bacnet-stack/mstp.c +++ b/bacnet-stack/mstp.c @@ -1237,9 +1237,14 @@ uint16_t MSTP_Put_Receive( /* for the MS/TP state machine to use for getting data to send */ /* Return: amount of PDU data */ uint16_t MSTP_Get_Send( - uint8_t src, /* source MS/TP address for creating packet */ - uint8_t * pdu, /* data to send */ - uint16_t max_pdu, /* amount of space available */ + volatile struct mstp_port_struct_t *mstp_port, + unsigned timeout) /* milliseconds to wait for a packet */ +{ + return 0; +} + +uint16_t MSTP_Get_Reply( + volatile struct mstp_port_struct_t *mstp_port, unsigned timeout) /* milliseconds to wait for a packet */ { return 0; @@ -1266,7 +1271,6 @@ void testReceiveNodeFSM(Test * pTest) size_t i; /* used to loop through the message bytes */ uint8_t buffer[MAX_MPDU] = { 0 }; uint8_t data[MAX_PDU] = { 0 }; - uint8_t dummy[8] = {1,2,3,4,5,6,7,8}; mstp_port.InputBuffer = &RxBuffer[0]; mstp_port.InputBufferSize = sizeof(RxBuffer); diff --git a/bacnet-stack/tsm.mak b/bacnet-stack/tsm.mak index 7c9ce5df..7599c906 100644 --- a/bacnet-stack/tsm.mak +++ b/bacnet-stack/tsm.mak @@ -6,6 +6,7 @@ INCLUDES = -I. -Idemo/object -Idemo/handler -Itest -Iports/linux CFLAGS = -Wall $(INCLUDES) $(DEFINES) -g SRCS = address.c \ + bacaddr.c \ bacdcode.c \ bacint.c \ bacstr.c \