Fixed compilation with BACNET_SVC_SERVER=1 for apps. (#552)

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
Steve Karg
2024-01-03 10:35:03 -06:00
committed by GitHub
parent ead190584c
commit 7f3b82db9a
18 changed files with 72 additions and 5 deletions
+6 -2
View File
@@ -559,16 +559,18 @@ void apdu_handler(BACNET_ADDRESS *src,
uint16_t apdu_len)
{
BACNET_CONFIRMED_SERVICE_DATA service_data = { 0 };
BACNET_CONFIRMED_SERVICE_ACK_DATA service_ack_data = { 0 };
uint8_t invoke_id = 0;
uint8_t service_choice = 0;
uint8_t *service_request = NULL;
uint16_t service_request_len = 0;
int len = 0; /* counts where we are in PDU */
#if !BACNET_SVC_SERVER
uint8_t invoke_id = 0;
BACNET_CONFIRMED_SERVICE_ACK_DATA service_ack_data = { 0 };
BACNET_ERROR_CODE error_code = ERROR_CODE_SUCCESS;
BACNET_ERROR_CLASS error_class = ERROR_CLASS_SERVICES;
uint8_t reason = 0;
bool server = false;
#endif
if (apdu) {
/* PDU Type */
@@ -620,6 +622,7 @@ void apdu_handler(BACNET_ADDRESS *src,
}
}
break;
#if !BACNET_SVC_SERVER
case PDU_TYPE_SIMPLE_ACK:
if (apdu_len < 3) {
break;
@@ -716,6 +719,7 @@ void apdu_handler(BACNET_ADDRESS *src,
}
tsm_free_invoke_id(invoke_id);
break;
#endif
default:
break;
}
+4 -3
View File
@@ -244,9 +244,10 @@
*/
/*
** Note: I've left everything enabled here in the default config.h. You should
** use a local copy of config.h with settings configured for your needs to
** make use of any code space reductions in your device.
** Note: these are enabled by default for the example apps to build.
** Use a local copy named "bacnet-config.h" with settings configured for
** the product specific needs for code space reductions in your device.
** Alternately, use a compiler and linker the have code reduction features.
**/
#define BACNET_SVC_I_HAVE_A 1
+2
View File
@@ -351,6 +351,7 @@ int create_object_error_ack_encode(
return len;
}
#if !BACNET_SVC_SERVER
/**
* @brief Decode a CreateObject-Error ACK APDU
*
@@ -419,3 +420,4 @@ int create_object_error_ack_service_decode(
return apdu_len;
}
#endif
+2
View File
@@ -273,6 +273,7 @@ int list_element_error_ack_encode(
return apdu_len;
}
#if !BACNET_SVC_SERVER
/**
* @brief Decoding for AddListElement or RemoveListElement Error Ack
* AddListElement-Error ::= SEQUENCE {
@@ -361,3 +362,4 @@ int list_element_error_ack_decode(
return apdu_len;
}
#endif
+2
View File
@@ -437,6 +437,7 @@ int wpm_error_ack_encode_apdu(
return len;
}
#if !BACNET_SVC_SERVER
/** Decoding for WritePropertyMultiple Error
* @ingroup DSWPM
* WritePropertyMultiple-Error ::= SEQUENCE {
@@ -571,6 +572,7 @@ int wpm_error_ack_decode_apdu(
return apdu_len;
}
#endif
/**
* @brief Convert an array of BACnetWriteAccessData to linked list