|
Zephyr API Documentation 4.3.0-rc1
A Scalable Open Source RTOS
|
Latency Monitor. More...
Typedefs | |
| typedef int(* | net_latmon_measure_t) (uint32_t *delta) |
| Callback function type for retrieving latency deltas. | |
Functions | |
| void | net_latmon_start (int latmus, net_latmon_measure_t measure_func) |
| Start the latency monitor. | |
| int | net_latmon_connect (int socket, struct in_addr *ip) |
| Wait for a connection from a Latmus client. | |
| int | net_latmon_get_socket (struct sockaddr *bind_addr) |
| Get a socket for the Latmus service. | |
| bool | net_latmon_running (void) |
| Check if the latency monitor is running. | |
Latency Monitor.
| typedef int(* net_latmon_measure_t) (uint32_t *delta) |
#include <zephyr/net/latmon.h>
Callback function type for retrieving latency deltas.
| delta | Pointer to store the calculated latency delta in cycles. |
| int net_latmon_connect | ( | int | socket, |
| struct in_addr * | ip ) |
#include <zephyr/net/latmon.h>
Wait for a connection from a Latmus client.
This function blocks until a Latmus client connects to the specified socket. Once connected, the client's IP address is stored in the provided ip structure.
| socket | A valid socket descriptor for listening. |
| ip | The client's IP address. |
| int net_latmon_get_socket | ( | struct sockaddr * | bind_addr | ) |
#include <zephyr/net/latmon.h>
Get a socket for the Latmus service.
This function creates and returns a socket to wait for Latmus connections
| bind_addr | The address to bind the socket to. If NULL, the socket will be bound to the first available address using the build time configured latmus port. |
| bool net_latmon_running | ( | void | ) |
#include <zephyr/net/latmon.h>
Check if the latency monitor is running.
This function checks whether the latency monitor is currently active and running.
| void net_latmon_start | ( | int | latmus, |
| net_latmon_measure_t | measure_func ) |
#include <zephyr/net/latmon.h>
Start the latency monitor.
This function starts the latency monitor, which measures latency using the provided callback function to calculate deltas. Samples are sent to the connected Latmus client.
| latmus | A valid socket descriptor connected to latmus |
| measure_func | A callback function to execute the delta calculation. |