Add functions to enable/disable debug logging (#280)
* Add "bip_debug_disable()" * Add "bvlc_debug_disable()" * Add setters for BIP_DL_Debug (BBMD registration debug logging)
This commit is contained in:
@@ -53,6 +53,14 @@ void bip_debug_enable(void)
|
|||||||
BIP_Debug = true;
|
BIP_Debug = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Disalbe debug printing of BACnet/IPv4
|
||||||
|
*/
|
||||||
|
void bip_debug_disable(void)
|
||||||
|
{
|
||||||
|
BIP_Debug = false;
|
||||||
|
}
|
||||||
|
|
||||||
/* gets an IP address by name, where name can be a
|
/* gets an IP address by name, where name can be a
|
||||||
string that is an IP address in dotted form, or
|
string that is an IP address in dotted form, or
|
||||||
a name that is a domain name
|
a name that is a domain name
|
||||||
|
|||||||
@@ -102,6 +102,8 @@ extern "C" {
|
|||||||
|
|
||||||
void bip_debug_enable(void);
|
void bip_debug_enable(void);
|
||||||
|
|
||||||
|
void bip_debug_disable(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|||||||
@@ -97,6 +97,14 @@ void bip_debug_enable(void)
|
|||||||
BIP_Debug = true;
|
BIP_Debug = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Disalbe debug printing of BACnet/IPv4
|
||||||
|
*/
|
||||||
|
void bip_debug_disable(void)
|
||||||
|
{
|
||||||
|
BIP_Debug = false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set the BACnet IPv4 UDP port number
|
* @brief Set the BACnet IPv4 UDP port number
|
||||||
* @param port - IPv4 UDP port number - in host byte order
|
* @param port - IPv4 UDP port number - in host byte order
|
||||||
|
|||||||
@@ -113,6 +113,14 @@ void bip_debug_enable(void)
|
|||||||
BIP_Debug = true;
|
BIP_Debug = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Disalbe debug printing of BACnet/IPv4
|
||||||
|
*/
|
||||||
|
void bip_debug_disable(void)
|
||||||
|
{
|
||||||
|
BIP_Debug = false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set the BACnet IPv4 UDP port number
|
* @brief Set the BACnet IPv4 UDP port number
|
||||||
* @param port - IPv4 UDP port number - in host byte order
|
* @param port - IPv4 UDP port number - in host byte order
|
||||||
|
|||||||
@@ -106,6 +106,14 @@ void bip_debug_enable(void)
|
|||||||
BIP_Debug = true;
|
BIP_Debug = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Disalbe debug printing of BACnet/IPv4
|
||||||
|
*/
|
||||||
|
void bip_debug_disable(void)
|
||||||
|
{
|
||||||
|
BIP_Debug = false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get the text string for Windows Error Codes
|
* @brief Get the text string for Windows Error Codes
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -102,6 +102,14 @@ void bvlc_debug_enable(void)
|
|||||||
BVLC_Debug = true;
|
BVLC_Debug = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Disable debug printing of BACnet/IPv4 BBMD
|
||||||
|
*/
|
||||||
|
void bvlc_debug_disable(void)
|
||||||
|
{
|
||||||
|
BVLC_Debug = true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Print the IPv4 address with debug info for this module
|
* @brief Print the IPv4 address with debug info for this module
|
||||||
* @param str - debug info string
|
* @param str - debug info string
|
||||||
|
|||||||
@@ -85,6 +85,9 @@ void bvlc_init(void);
|
|||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
void bvlc_debug_enable(void);
|
void bvlc_debug_enable(void);
|
||||||
|
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void bvlc_debug_disable(void);
|
||||||
|
|
||||||
/* send a Read BDT request */
|
/* send a Read BDT request */
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
int bvlc_bbmd_read_bdt(BACNET_IP_ADDRESS *bbmd_addr);
|
int bvlc_bbmd_read_bdt(BACNET_IP_ADDRESS *bbmd_addr);
|
||||||
|
|||||||
@@ -113,6 +113,9 @@ extern "C" {
|
|||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
void bip_debug_enable(void);
|
void bip_debug_enable(void);
|
||||||
|
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void bip_debug_disable(void);
|
||||||
|
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
int bip_get_socket(void);
|
int bip_get_socket(void);
|
||||||
|
|
||||||
|
|||||||
@@ -57,6 +57,24 @@ static BACNET_IP_BROADCAST_DISTRIBUTION_TABLE_ENTRY BBMD_Table_Entry;
|
|||||||
/* enable debugging */
|
/* enable debugging */
|
||||||
static bool BIP_DL_Debug = false;
|
static bool BIP_DL_Debug = false;
|
||||||
|
|
||||||
|
/* Debug toggle */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enabled debug printing of BACnet/IPv4 DL
|
||||||
|
*/
|
||||||
|
void bip_dl_debug_enable(void)
|
||||||
|
{
|
||||||
|
BIP_DL_Debug = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Disable debug printing of BACnet/IPv4 DL
|
||||||
|
*/
|
||||||
|
void bip_dl_debug_disable(void)
|
||||||
|
{
|
||||||
|
BIP_DL_Debug = false;
|
||||||
|
}
|
||||||
|
|
||||||
/* Simple setters for BBMD registration variables. */
|
/* Simple setters for BBMD registration variables. */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -473,7 +491,7 @@ void dlenv_init(void)
|
|||||||
if (pEnv) {
|
if (pEnv) {
|
||||||
bip_debug_enable();
|
bip_debug_enable();
|
||||||
bvlc_debug_enable();
|
bvlc_debug_enable();
|
||||||
BIP_DL_Debug = true;
|
bip_dl_debug_enable();
|
||||||
}
|
}
|
||||||
pEnv = getenv("BACNET_IP_PORT");
|
pEnv = getenv("BACNET_IP_PORT");
|
||||||
if (pEnv) {
|
if (pEnv) {
|
||||||
|
|||||||
@@ -39,6 +39,14 @@ extern "C" {
|
|||||||
void dlenv_init(
|
void dlenv_init(
|
||||||
void);
|
void);
|
||||||
|
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void bip_dl_debug_enable(
|
||||||
|
void);
|
||||||
|
|
||||||
|
BACNET_STACK_EXPORT
|
||||||
|
void bip_dl_debug_disable(
|
||||||
|
void);
|
||||||
|
|
||||||
BACNET_STACK_EXPORT
|
BACNET_STACK_EXPORT
|
||||||
int dlenv_register_as_foreign_device(
|
int dlenv_register_as_foreign_device(
|
||||||
void);
|
void);
|
||||||
|
|||||||
Reference in New Issue
Block a user