BACnetStack_RegisterCallbackLogDebugMessage
void BACnetStack_RegisterCallbackLogDebugMessage( void (*FPCallbackLogDebugMessage)(const char *message, const uint16_t messageLength, const uint8_t messageType));Registers the callback that receives the stack’s own diagnostic log lines.
Fires from wherever the stack logs - inside Tick(), inside any export, at any depth.
IF YOU DO NOT REGISTER IT, THE STACK printf()s EVERY LINE TO stdout. Silence is not the default; registering a no-op callback is how you get silence.
THIS ONE SURVIVES BACnetStack_Reset(). Unlike every other callback in this header it is stored outside the callback table, so Reset() leaves it in place. Register NULL to clear it.
Each message is NUL-terminated and ends with a newline; messageLength counts the bytes before the NUL. The buffer belongs to the stack and is valid only for the duration of the call. The formatted text is capped at 255 characters and truncated past that.
See also: CASBACnetStack::FPCallbackLogDebugMessage
Parameters
Section titled “Parameters”| Parameter | Direction | Description |
|---|---|---|
FPCallbackLogDebugMessage |
in | The function pointer for the CallbackLogDebugMessage function. messageType is 0 for error, 1 for informational, 2 for debug. See CASBACnetStack::FPCallbackLogDebugMessage for more info. |
Callback type
Section titled “Callback type”Topic: Data link and system callbacks. Declared in CASBACnetStackDLL.h.