NetBurner 3.5.6
PDF Version |
Classes | |
class | DiagItemClass |
Base class for all diagnostic items. More... | |
class | DiagCallBack |
Callback-based diagnostic item that calls a custom function to generate diagnostic content. More... | |
class | DiagVarMon |
Monitor and report the value of numeric variables. More... | |
class | DiagStrMon |
Monitor and report string values. More... | |
class | DiagPtrMon |
Monitor and report pointer values. More... | |
Typedefs | |
typedef void | diagcallback(int sock) |
Callback function type for custom diagnostic reports. | |
Functions | |
bool | SendDiagReport (const char *pUrl, const char *pUser=0, const char *pPass=0) |
Send the complete diagnostic report to an external URL via HTTP POST. | |
bool | SendDiagReport (ParsedURI &uri, const char *pUser=0, const char *pPass=0) |
Send the complete diagnostic report to an external URL via HTTP POST. | |
void | InitPlatformDiag () |
Initialize platform-specific diagnostics. | |
#include< diagnostics.h>
The functions in this header are used to add diagnostic reports to the diagnostics tab under the config page when diagnostics.h is included and EnableSystemDiagnostics() is called.
The resulting JSON blob can be accessed directly (replace 10.1.1.100 with your IP or dns name) http://10.1.1.100:20034/DIAG
You can also access subgroups directly from the diagnostics: http://10.1.1.100:20034/DIAG/Buffers or http://10.1.1.100:20034/DIAG/Tasks
typedef void diagcallback(int sock) |
#include <diagnostics.h>
Callback function type for custom diagnostic reports.
This function type is used to create custom diagnostic output functions that can be called when the diagnostic system needs to output data for a specific diagnostic item.
sock | File descriptor to write diagnostic output to |
void InitPlatformDiag | ( | ) |
#include <diagnostics.h>
Initialize platform-specific diagnostics.
This function is called by EnableSystemDiagnostics() to allow platforms to register their own diagnostic items. The default implementation is weak-linked and does nothing. Platforms can override this by providing their own implementation without weak linkage.
bool SendDiagReport | ( | const char * | pUrl, |
const char * | pUser = 0, | ||
const char * | pPass = 0 ) |
#include <diagnostics.h>
Send the complete diagnostic report to an external URL via HTTP POST.
This function collects all diagnostic data and sends it as a JSON payload via HTTP POST to the specified URL. This is useful for remote monitoring and logging of device diagnostics.
pUrl | Target URL to send the diagnostic data to |
pUser | Optional username for HTTP authentication |
pPass | Optional password for HTTP authentication |
bool SendDiagReport | ( | ParsedURI & | uri, |
const char * | pUser = 0, | ||
const char * | pPass = 0 ) |
#include <diagnostics.h>
Send the complete diagnostic report to an external URL via HTTP POST.
This function collects all diagnostic data and sends it as a JSON payload via HTTP POST to the specified URL using a ParsedURI object.
uri | ParsedURI object containing the target URL |
pUser | Optional username for HTTP authentication |
pPass | Optional password for HTTP authentication |