Feature/makefile add apps library (#218)
* add BACnet stack library at apps/lib * convert apps to use apps/lib for smaller binary * fix -DBACDL_ALL=1 build * fix piface build * datalink MAX_MPDU and MAX_HEADER cleanup * add bip6 to git workflow * fix system library dependency of BACnet library Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
@@ -77,7 +77,7 @@ static bool BVLC_NAT_Handling = false;
|
||||
static BACNET_IP_ADDRESS Remote_BBMD;
|
||||
#if BBMD_ENABLED
|
||||
/* local buffer & length for sending */
|
||||
static uint8_t BVLC_Buffer[MAX_MPDU];
|
||||
static uint8_t BVLC_Buffer[BIP_MPDU_MAX];
|
||||
static uint16_t BVLC_Buffer_Len;
|
||||
/* Broadcast Distribution Table */
|
||||
#ifndef MAX_BBMD_ENTRIES
|
||||
@@ -317,7 +317,7 @@ static uint16_t bbmd_forward_npdu(
|
||||
BACNET_IP_ADDRESS *bip_src, uint8_t *npdu, uint16_t npdu_length)
|
||||
{
|
||||
BACNET_IP_ADDRESS broadcast_address = { 0 };
|
||||
uint8_t mtu[MAX_MPDU] = { 0 };
|
||||
uint8_t mtu[BIP_MPDU_MAX] = { 0 };
|
||||
uint16_t mtu_len = 0;
|
||||
|
||||
mtu_len = (uint16_t)bvlc_encode_forwarded_npdu(
|
||||
@@ -345,7 +345,7 @@ static uint16_t bbmd_bdt_forward_npdu(BACNET_IP_ADDRESS *bip_src,
|
||||
uint16_t npdu_length,
|
||||
bool original)
|
||||
{
|
||||
uint8_t mtu[MAX_MPDU] = { 0 };
|
||||
uint8_t mtu[BIP_MPDU_MAX] = { 0 };
|
||||
uint16_t mtu_len = 0;
|
||||
unsigned i = 0; /* loop counter */
|
||||
BACNET_IP_ADDRESS bip_dest = { 0 };
|
||||
@@ -410,7 +410,7 @@ static uint16_t bbmd_fdt_forward_npdu(BACNET_IP_ADDRESS *bip_src,
|
||||
uint16_t npdu_length,
|
||||
bool original)
|
||||
{
|
||||
uint8_t mtu[MAX_MPDU] = { 0 };
|
||||
uint8_t mtu[BIP_MPDU_MAX] = { 0 };
|
||||
uint16_t mtu_len = 0;
|
||||
unsigned i = 0; /* loop counter */
|
||||
BACNET_IP_ADDRESS bip_dest = { 0 };
|
||||
@@ -566,7 +566,7 @@ int bvlc_send_pdu(BACNET_ADDRESS *dest,
|
||||
unsigned pdu_len)
|
||||
{
|
||||
BACNET_IP_ADDRESS bvlc_dest = { 0 };
|
||||
uint8_t mtu[MAX_MPDU] = { 0 };
|
||||
uint8_t mtu[BIP_MPDU_MAX] = { 0 };
|
||||
uint16_t mtu_len = 0;
|
||||
#if BBMD_ENABLED
|
||||
BACNET_IP_ADDRESS bip_src = { 0 };
|
||||
@@ -633,7 +633,7 @@ int bvlc_send_pdu(BACNET_ADDRESS *dest,
|
||||
*/
|
||||
static int bvlc_send_result(BACNET_IP_ADDRESS *dest_addr, uint16_t result_code)
|
||||
{
|
||||
uint8_t mtu[MAX_MPDU] = { 0 };
|
||||
uint8_t mtu[BIP_MPDU_MAX] = { 0 };
|
||||
uint16_t mtu_len = 0;
|
||||
|
||||
mtu_len = bvlc_encode_result(&mtu[0], sizeof(mtu), result_code);
|
||||
|
||||
@@ -67,7 +67,7 @@ static uint8_t BVLC6_Function_Code = BVLC6_RESULT;
|
||||
static BACNET_IP6_ADDRESS Remote_BBMD;
|
||||
#if defined(BACDL_BIP6) && BBMD6_ENABLED
|
||||
/* local buffer & length for sending */
|
||||
static uint8_t BVLC6_Buffer[MAX_MPDU];
|
||||
static uint8_t BVLC6_Buffer[BIP6_MPDU_MAX];
|
||||
static uint16_t BVLC6_Buffer_Len;
|
||||
/* Broadcast Distribution Table */
|
||||
#ifndef MAX_BBMD6_ENTRIES
|
||||
@@ -281,7 +281,7 @@ int bvlc6_send_pdu(BACNET_ADDRESS *dest,
|
||||
unsigned pdu_len)
|
||||
{
|
||||
BACNET_IP6_ADDRESS bvlc_dest = { { 0 } };
|
||||
uint8_t mtu[MAX_MPDU] = { 0 };
|
||||
uint8_t mtu[BIP6_MPDU_MAX] = { 0 };
|
||||
uint16_t mtu_len = 0;
|
||||
uint32_t vmac_src = 0;
|
||||
uint32_t vmac_dst = 0;
|
||||
@@ -403,7 +403,7 @@ static void bbmd6_send_forward_npdu(BACNET_IP6_ADDRESS *address,
|
||||
uint8_t *npdu,
|
||||
unsigned int npdu_len)
|
||||
{
|
||||
uint8_t mtu[MAX_MPDU] = { 0 };
|
||||
uint8_t mtu[BIP6_MPDU_MAX] = { 0 };
|
||||
uint16_t mtu_len = 0;
|
||||
unsigned i = 0; /* loop counter */
|
||||
|
||||
@@ -443,7 +443,7 @@ static void bbmd6_send_forward_npdu(BACNET_IP6_ADDRESS *address,
|
||||
static int bvlc6_send_result(
|
||||
BACNET_IP6_ADDRESS *dest_addr, uint32_t vmac_src, uint16_t result_code)
|
||||
{
|
||||
uint8_t mtu[MAX_MPDU] = { 0 };
|
||||
uint8_t mtu[BIP6_MPDU_MAX] = { 0 };
|
||||
uint16_t mtu_len = 0;
|
||||
|
||||
mtu_len = bvlc6_encode_result(&mtu[0], sizeof(mtu), vmac_src, result_code);
|
||||
@@ -465,7 +465,7 @@ static int bvlc6_send_result(
|
||||
static int bvlc6_send_address_resolution_ack(
|
||||
BACNET_IP6_ADDRESS *dest_addr, uint32_t vmac_src, uint32_t vmac_dst)
|
||||
{
|
||||
uint8_t mtu[MAX_MPDU] = { 0 };
|
||||
uint8_t mtu[BIP6_MPDU_MAX] = { 0 };
|
||||
uint16_t mtu_len = 0;
|
||||
|
||||
mtu_len = bvlc6_encode_address_resolution_ack(
|
||||
@@ -489,7 +489,7 @@ static int bvlc6_send_address_resolution_ack(
|
||||
static int bvlc6_send_virtual_address_resolution_ack(
|
||||
BACNET_IP6_ADDRESS *dest_addr, uint32_t vmac_src, uint32_t vmac_dst)
|
||||
{
|
||||
uint8_t mtu[MAX_MPDU] = { 0 };
|
||||
uint8_t mtu[BIP6_MPDU_MAX] = { 0 };
|
||||
uint16_t mtu_len = 0;
|
||||
|
||||
mtu_len = bvlc6_encode_virtual_address_resolution_ack(
|
||||
@@ -1036,7 +1036,7 @@ int bvlc6_register_with_bbmd(BACNET_IP6_ADDRESS *bbmd_addr,
|
||||
uint32_t vmac_src,
|
||||
uint16_t time_to_live_seconds)
|
||||
{
|
||||
uint8_t mtu[MAX_MPDU] = { 0 };
|
||||
uint8_t mtu[BIP6_MPDU_MAX] = { 0 };
|
||||
uint16_t mtu_len = 0;
|
||||
|
||||
mtu_len = bvlc6_encode_register_foreign_device(
|
||||
|
||||
Reference in New Issue
Block a user