FreeRTOS:
Platform
Platform portability layer
|
Return to main page ↑ |
Functions for retrieving Device Defender metrics. More...
#include "iot_config.h"
#include <stdbool.h>
#include "iot_linear_containers.h"
Go to the source code of this file.
Functions | |
bool | IotMetrics_Init (void) |
One-time initialization function for the platform metrics component. More... | |
void | IotMetrics_Cleanup (void) |
One-time deinitialization function for the platform metrics component. More... | |
void | IotMetrics_GetTcpConnections (void *pContext, void(*metricsCallback)(void *, const IotListDouble_t *)) |
Retrieve a list of active TCP connections from the system. More... | |
Functions for retrieving Device Defender metrics.
The functions in this header are only required by Device Defender. They do not need to be implemented if Device Defender is not used.
bool IotMetrics_Init | ( | void | ) |
One-time initialization function for the platform metrics component.
This function initializes the platform metrics component. It must be called once (and only once) before calling any other metrics or Device Defender function. Calling this function more than once without first calling IotMetrics_Cleanup may result in a crash.
true
is initialization succeeded; false
otherwise.void IotMetrics_Cleanup | ( | void | ) |
One-time deinitialization function for the platform metrics component.
This function frees resources taken in IotMetrics_Init. No other metrics or Device Defender functions may be called unless IotMetrics_Init is called again.
void IotMetrics_GetTcpConnections | ( | void * | pContext, |
void(*)(void *, const IotListDouble_t *) | metricsCallback | ||
) |
Retrieve a list of active TCP connections from the system.
The provided connections are reported by Device Defender.
[in] | pContext | Context passed as the first parameter of metricsCallback . |
[in] | metricsCallback | Called by this function to provide the list of TCP connections. The list given by this function is should not be used after the callback returns. |