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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user