refactored the custom config settings.
This commit is contained in:
+1
-24
@@ -35,6 +35,7 @@
|
||||
#define BACDEF_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "config.h"
|
||||
|
||||
// largest BACnet Instance Number
|
||||
// Also used as a device instance number wildcard address
|
||||
@@ -60,31 +61,7 @@ struct BACnet_Device_Address {
|
||||
};
|
||||
typedef struct BACnet_Device_Address BACNET_ADDRESS;
|
||||
|
||||
// Max number of bytes in an APDU.
|
||||
// Typical sizes are 50, 128, 206, 480, 1024, and 1476 octets
|
||||
// This is used in constructing messages and to tell others our limits
|
||||
// 50 is the minimum; adjust to your memory and physical layer constraints
|
||||
// Lon=206, MS/TP=480, ARCNET=480, Ethernet=1476
|
||||
#define MAX_APDU 50
|
||||
#define MAX_NPDU (1+1+2+1+MAX_MAC_LEN+2+1+MAX_MAC_LEN+1+1+2)
|
||||
#define MAX_PDU (MAX_APDU + MAX_NPDU)
|
||||
|
||||
// FIXME: maybe we can encapsulate the Physical layer details in the
|
||||
// physical layer modules and not have to allocate the entire packet
|
||||
|
||||
// packet includes physical layer octets such as destination, len, etc.
|
||||
// this is highly dependent on the physical layer used
|
||||
// ARCNET=1+1+2+2+1+1+1+1=10
|
||||
// MS/TP=2+1+1+1+2+1+2+1=11
|
||||
// Ethernet=6+6+2+1+1+1=17
|
||||
#ifdef BACNET_ARCNET
|
||||
#define MAX_HEADER 10
|
||||
#endif
|
||||
#ifdef BACNET_MSTP
|
||||
#define MAX_HEADER 11
|
||||
#endif
|
||||
#ifdef BACNET_ETHERNET
|
||||
#define MAX_HEADER 17
|
||||
#endif
|
||||
#define MAX_MPDU (MAX_HEADER+MAX_PDU)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user