Add core stack headers into bacdef.h and cleanup includes. (#602)
* Added dependent BACnet stack headers into bacdef.h file. * Changed bacdef.h and other stack includes in c/h files to have a common pattern. * Moved bits.h, bytes.h, and bacnet_stack_exports.h under bacnet/basic/sys/ folder.
This commit is contained in:
@@ -34,11 +34,11 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include "bacnet/bits.h"
|
||||
#include "bacnet/apdu.h"
|
||||
/* BACnet Stack defines - first */
|
||||
#include "bacnet/bacdef.h"
|
||||
/* BACnet Stack API */
|
||||
#include "bacnet/apdu.h"
|
||||
#include "bacnet/bacdcode.h"
|
||||
#include "bacnet/bacenum.h"
|
||||
#include "bacnet/basic/services.h"
|
||||
|
||||
bool apdu_service_supported(BACNET_SERVICES_SUPPORTED service_supported)
|
||||
|
||||
@@ -36,15 +36,16 @@
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
/* BACnet Stack defines - first */
|
||||
#include "bacnet/bacdef.h"
|
||||
/* BACnet Stack API */
|
||||
#include "bacnet/datalink/dlmstp.h"
|
||||
#include "bacnet/datalink/mstpdef.h"
|
||||
#include "bacnet/npdu.h"
|
||||
#include "bacnet/bits.h"
|
||||
#include "bacnet/bytes.h"
|
||||
#include "bacnet/bacaddr.h"
|
||||
#include "bacnet/basic/sys/ringbuf.h"
|
||||
#include "bacnet/datalink/crc.h"
|
||||
/* port specific */
|
||||
#include "rs485.h"
|
||||
#include "timer.h"
|
||||
#include "board.h"
|
||||
|
||||
@@ -34,11 +34,11 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include "bacnet/bits.h"
|
||||
#include "bacnet/apdu.h"
|
||||
/* BACnet Stack defines - first */
|
||||
#include "bacnet/bacdef.h"
|
||||
/* BACnet Stack API */
|
||||
#include "bacnet/apdu.h"
|
||||
#include "bacnet/bacdcode.h"
|
||||
#include "bacnet/bacenum.h"
|
||||
#include "bacnet/basic/services.h"
|
||||
|
||||
bool apdu_service_supported(BACNET_SERVICES_SUPPORTED service_supported)
|
||||
|
||||
@@ -36,18 +36,19 @@
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
/* BACnet Stack defines - first */
|
||||
#include "bacnet/bacdef.h"
|
||||
/* BACnet Stack API */
|
||||
#include "bacnet/datalink/mstpdef.h"
|
||||
#include "bacnet/datalink/dlmstp.h"
|
||||
#include "rs485.h"
|
||||
#include "bacnet/datalink/crc.h"
|
||||
#include "bacnet/npdu.h"
|
||||
#include "bacnet/bits.h"
|
||||
#include "bacnet/bytes.h"
|
||||
#include "bacnet/bacaddr.h"
|
||||
/* special optimization - I-Am response in this module */
|
||||
#include "bacnet/basic/services.h"
|
||||
#include "bacnet/basic/tsm/tsm.h"
|
||||
/* port specific */
|
||||
#include "rs485.h"
|
||||
|
||||
/* This file has been customized for use with small microprocessors */
|
||||
/* Assumptions:
|
||||
|
||||
@@ -38,6 +38,6 @@
|
||||
#endif
|
||||
#endif
|
||||
#include "iar2gcc.h"
|
||||
#include "bacnet/bits.h"
|
||||
#include "bacnet/basic/sys/bits.h"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -36,17 +36,18 @@
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
/* BACnet Stack defines - first */
|
||||
#include "bacnet/bacdef.h"
|
||||
/* BACnet Stack API */
|
||||
#include "bacnet/datalink/dlmstp.h"
|
||||
#include "bacnet/datalink/mstpdef.h"
|
||||
#include "bacnet/datalink/crc.h"
|
||||
#include "rs485.h"
|
||||
#include "bacnet/npdu.h"
|
||||
#include "bacnet/bits.h"
|
||||
#include "bacnet/bytes.h"
|
||||
#include "bacnet/bacaddr.h"
|
||||
#include "bacnet/basic/sys/ringbuf.h"
|
||||
#include "bacnet/basic/sys/mstimer.h"
|
||||
/* port specific */
|
||||
#include "rs485.h"
|
||||
|
||||
/* This file has been customized for use with small microprocessors */
|
||||
/* Assumptions:
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
#endif
|
||||
|
||||
#include "iar2gcc.h"
|
||||
#include "bacnet/bits.h"
|
||||
#include "bacnet/basic/sys/bits.h"
|
||||
|
||||
/* SEEPROM is 24LC128 */
|
||||
/*#define SEEPROM_PAGE_SIZE 64 */
|
||||
|
||||
+3
-3
@@ -23,8 +23,8 @@
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
#ifndef NET_H
|
||||
#define NET_H
|
||||
#ifndef BACPORT_H
|
||||
#define BACPORT_H
|
||||
|
||||
/* common unix sockets headers needed */
|
||||
#include <sys/types.h> /* basic system data types */
|
||||
@@ -88,7 +88,7 @@
|
||||
#include <sys/un.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <netdb.h>
|
||||
#include "bacnet/bacnet_stack_exports.h"
|
||||
#include "bacnet/basic/sys/bacnet_stack_exports.h"
|
||||
|
||||
/** @file bsd/net.h Includes BSD network headers. */
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
#ifndef NET_H
|
||||
#define NET_H
|
||||
#ifndef BACPORT_H
|
||||
#define BACPORT_H
|
||||
|
||||
/* common unix sockets headers needed */
|
||||
#include <sys/types.h> /* basic system data types */
|
||||
@@ -99,7 +99,7 @@
|
||||
#include <sys/un.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <netdb.h>
|
||||
#include "bacnet/bacnet_stack_exports.h"
|
||||
#include "bacnet/basic/sys/bacnet_stack_exports.h"
|
||||
|
||||
#define BACNET_OBJECT_TABLE(table_name, _type, _init, _count, \
|
||||
_index_to_instance, _valid_instance, _object_name, \
|
||||
|
||||
@@ -30,17 +30,19 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/time.h>
|
||||
/* BACnet Stack defines - first */
|
||||
#include "bacnet/bacdef.h"
|
||||
/* BACnet Stack API */
|
||||
#include "bacnet/bacaddr.h"
|
||||
#include "bacnet/npdu.h"
|
||||
#include "bacnet/datalink/mstp.h"
|
||||
#include "bacnet/datalink/dlmstp.h"
|
||||
#include "rs485.h"
|
||||
#include "bacnet/npdu.h"
|
||||
#include "bacnet/bits.h"
|
||||
#include "bacnet/basic/sys/ringbuf.h"
|
||||
#include "bacnet/basic/sys/debug.h"
|
||||
/* OS Specific include */
|
||||
#include "bacport.h"
|
||||
/* port specific */
|
||||
#include "rs485.h"
|
||||
|
||||
/** @file linux/dlmstp.c Provides Linux-specific DataLink functions for MS/TP.
|
||||
*/
|
||||
|
||||
@@ -29,17 +29,19 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
/* BACnet Stack defines - first */
|
||||
#include "bacnet/bacdef.h"
|
||||
/* BACnet Stack API */
|
||||
#include "bacnet/bacdef.h"
|
||||
#include "bacnet/bacaddr.h"
|
||||
#include "bacnet/npdu.h"
|
||||
#include "bacnet/datalink/mstp.h"
|
||||
/*#include "bacnet/datalink/dlmstp.h" */
|
||||
#include "bacnet/basic/sys/ringbuf.h"
|
||||
/* port specific */
|
||||
#include "dlmstp_linux.h"
|
||||
#include "rs485.h"
|
||||
#include "bacnet/npdu.h"
|
||||
#include "bacnet/bits.h"
|
||||
/* OS Specific include */
|
||||
#include "bacport.h"
|
||||
#include "bacnet/basic/sys/ringbuf.h"
|
||||
|
||||
/** @file linux/dlmstp.c Provides Linux-specific DataLink functions for MS/TP.
|
||||
*/
|
||||
|
||||
@@ -32,10 +32,11 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include "bacnet/bacnet_stack_exports.h"
|
||||
#include "bacnet/bacdef.h"
|
||||
#include "bacnet/npdu.h"
|
||||
#include <termios.h>
|
||||
/* BACnet Stack defines - first */
|
||||
#include "bacnet/bacdef.h"
|
||||
/* BACnet Stack API */
|
||||
#include "bacnet/npdu.h"
|
||||
#include "bacnet/basic/sys/fifo.h"
|
||||
#include "bacnet/basic/sys/ringbuf.h"
|
||||
/* defines specific to MS/TP */
|
||||
|
||||
@@ -38,17 +38,20 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
/* OS specific include*/
|
||||
#include "bacport.h"
|
||||
#/* BACnet Stack defines - first */
|
||||
#include "bacnet/bacdef.h"
|
||||
/* BACnet Stack API */
|
||||
#include "bacnet/basic/sys/mstimer.h"
|
||||
/* local includes */
|
||||
#include "bacnet/bytes.h"
|
||||
#include "rs485.h"
|
||||
#include "bacnet/basic/sys/bytes.h"
|
||||
#include "bacnet/datalink/crc.h"
|
||||
#include "bacnet/datalink/mstp.h"
|
||||
#include "bacnet/datalink/dlmstp.h"
|
||||
#include "bacnet/datalink/mstptext.h"
|
||||
#include "bacnet/bacint.h"
|
||||
/* OS specific include*/
|
||||
#include "bacport.h"
|
||||
/* local includes */
|
||||
#include "rs485.h"
|
||||
|
||||
/** @file linux/mstpsnap.c Example application testing BACnet MS/TP on Linux.
|
||||
*/
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
#define RS485_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "bacnet/bacnet_stack_exports.h"
|
||||
#include "bacnet/datalink/mstp.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -34,10 +34,10 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include "bacnet/bits.h"
|
||||
/* BACnet Stack defines - first */
|
||||
#include "bacnet/bacdef.h"
|
||||
/* BACnet Stack API */
|
||||
#include "bacnet/bacdcode.h"
|
||||
#include "bacnet/bacenum.h"
|
||||
#include "bacnet/dcc.h"
|
||||
#include "bacnet/basic/services.h"
|
||||
/* me */
|
||||
|
||||
@@ -49,15 +49,17 @@
|
||||
#if PRINT_ENABLED
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
/* BACnet Stack defines - first */
|
||||
#include "bacnet/bacdef.h"
|
||||
/* BACnet Stack API */
|
||||
#include "bacnet/datalink/mstp.h"
|
||||
#include "bacnet/bytes.h"
|
||||
#include "bacnet/bits.h"
|
||||
#include "crc.h"
|
||||
#include "bacnet/bacaddr.h"
|
||||
#include "rs485.h"
|
||||
#if PRINT_ENABLED
|
||||
#include "bacnet/datalink/mstptext.h"
|
||||
#endif
|
||||
/* port specific */
|
||||
#include "crc.h"
|
||||
#include "rs485.h"
|
||||
|
||||
/* debug print statements */
|
||||
#if PRINT_ENABLED
|
||||
|
||||
@@ -34,10 +34,11 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include "bacnet/bits.h"
|
||||
/* BACnet Stack defines - first */
|
||||
#include "bacnet/bacdef.h"
|
||||
/* BACnet Stack API */
|
||||
#include "bacnet/bacdef.h"
|
||||
#include "bacnet/bacdcode.h"
|
||||
#include "bacnet/bacenum.h"
|
||||
#include "bacnet/dcc.h"
|
||||
#include "bacnet/basic/services.h"
|
||||
/* me */
|
||||
|
||||
@@ -49,15 +49,17 @@
|
||||
#if PRINT_ENABLED
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
/* BACnet Stack defines - first */
|
||||
#include "bacnet/bacdef.h"
|
||||
/* BACnet Stack API */
|
||||
#include "bacnet/datalink/mstp.h"
|
||||
#include "bacnet/bytes.h"
|
||||
#include "bacnet/bits.h"
|
||||
#include "crc.h"
|
||||
#include "bacnet/bacaddr.h"
|
||||
#include "rs485.h"
|
||||
#if PRINT_ENABLED
|
||||
#include "bacnet/datalink/mstptext.h"
|
||||
#endif
|
||||
/* port specific */
|
||||
#include "crc.h"
|
||||
#include "rs485.h"
|
||||
|
||||
/* debug print statements */
|
||||
#if PRINT_ENABLED
|
||||
|
||||
@@ -36,11 +36,11 @@
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
/* BACnet Stack defines - first */
|
||||
#include "bacnet/bacdef.h"
|
||||
/* BACnet Stack API */
|
||||
#include "bacnet/datalink/dlmstp.h"
|
||||
#include "rs485.h"
|
||||
#include "bacnet/npdu.h"
|
||||
#include "bacnet/bits.h"
|
||||
#include "bacnet/bacaddr.h"
|
||||
#include "bacnet/basic/sys/mstimer.h"
|
||||
#include "bacnet/basic/sys/ringbuf.h"
|
||||
@@ -48,6 +48,8 @@
|
||||
#include "bacnet/datalink/mstpdef.h"
|
||||
#include "bacnet/datalink/automac.h"
|
||||
#include "bacnet/basic/object/device.h"
|
||||
/* port specific */
|
||||
#include "rs485.h"
|
||||
|
||||
/* This file has been customized for use with small microprocessors */
|
||||
/* Assumptions:
|
||||
|
||||
@@ -27,11 +27,14 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include "hardware.h"
|
||||
/* BACnet Stack defines - first */
|
||||
#include "bacnet/bacdef.h"
|
||||
/* BACnet Stack API */
|
||||
#include "bacnet/basic/sys/mstimer.h"
|
||||
#include "bacnet/bits.h"
|
||||
#include "bacnet/datalink/dlmstp.h"
|
||||
#include "bacnet/basic/sys/fifo.h"
|
||||
/* port specific */
|
||||
#include "hardware.h"
|
||||
#include "led.h"
|
||||
#include "rs485.h"
|
||||
|
||||
|
||||
@@ -29,12 +29,15 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "stm32f4xx.h"
|
||||
/* BACnet Stack defines - first */
|
||||
#include "bacnet/bacdef.h"
|
||||
/* BACnet Stack API */
|
||||
#include "bacnet/basic/sys/mstimer.h"
|
||||
#include "bacnet/bits.h"
|
||||
#include "bacnet/basic/sys/fifo.h"
|
||||
#include "bacnet/datalink/dlmstp.h"
|
||||
#include "bacnet/datalink/mstpdef.h"
|
||||
/* port specific */
|
||||
#include "stm32f4xx.h"
|
||||
#include "rs485.h"
|
||||
|
||||
#ifndef RS485_LINKSPRITE_ENABLED
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#ifndef BACPORT_H
|
||||
#define BACPORT_H
|
||||
|
||||
#include "bacnet/bacnet_stack_exports.h"
|
||||
#include "bacnet/basic/sys/bacnet_stack_exports.h"
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define STRICT 1
|
||||
|
||||
@@ -29,13 +29,15 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
/* BACnet Stack defines - first */
|
||||
#include "bacnet/bacdef.h"
|
||||
/* BACnet Stack API */
|
||||
#include "bacnet/bacaddr.h"
|
||||
#include "bacnet/datalink/mstp.h"
|
||||
#include "bacnet/datalink/dlmstp.h"
|
||||
#include "rs485.h"
|
||||
#include "bacnet/npdu.h"
|
||||
#include "bacnet/bits.h"
|
||||
/* port specific */
|
||||
#include "rs485.h"
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define STRICT 1
|
||||
|
||||
@@ -30,15 +30,18 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
/* BACnet Stack defines - first */
|
||||
#include "bacnet/bacdef.h"
|
||||
/* BACnet Stack API */
|
||||
#include "bacnet/bacaddr.h"
|
||||
#include "bacnet/bits.h"
|
||||
#include "bacnet/npdu.h"
|
||||
#include "bacnet/basic/sys/ringbuf.h"
|
||||
#include "bacnet/basic/sys/mstimer.h"
|
||||
#include "bacnet/datalink/mstp.h"
|
||||
#include "bacnet/datalink/dlmstp.h"
|
||||
/* OS common includes */
|
||||
#include "bacport.h"
|
||||
/* port specific */
|
||||
#include "rs485.h"
|
||||
|
||||
/* Number of MS/TP Packets Rx/Tx */
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
#define RS485_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "bacnet/bacnet_stack_exports.h"
|
||||
#include "bacnet/datalink/mstp.h"
|
||||
#include "bacport.h"
|
||||
|
||||
|
||||
@@ -36,17 +36,18 @@
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
/* BACnet Stack defines - first */
|
||||
#include "bacnet/bacdef.h"
|
||||
/* BACnet Stack API */
|
||||
#include "bacnet/datalink/dlmstp.h"
|
||||
#include "bacnet/datalink/mstpdef.h"
|
||||
#include "rs485.h"
|
||||
#include "bacnet/datalink/crc.h"
|
||||
#include "bacnet/npdu.h"
|
||||
#include "bacnet/bits.h"
|
||||
#include "bacnet/bytes.h"
|
||||
#include "bacnet/bacaddr.h"
|
||||
#include "bacnet/basic/sys/ringbuf.h"
|
||||
#include "bacnet/basic/sys/mstimer.h"
|
||||
/* port specific */
|
||||
#include "rs485.h"
|
||||
|
||||
/* This file has been customized for use with small microprocessors */
|
||||
/* Assumptions:
|
||||
|
||||
@@ -27,8 +27,9 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include "bacnet/bacnet_stack_exports.h"
|
||||
/* BACnet Stack defines - first */
|
||||
#include "bacnet/bacdef.h"
|
||||
/* BACnet Stack API */
|
||||
#include "bacnet/npdu.h"
|
||||
|
||||
/* specific defines for Ethernet */
|
||||
|
||||
Reference in New Issue
Block a user