skip to content
==> include/mesh/top_ui_mesh.h <==
1/* @ajax/mesh-top-ui-mesh: mesh-top's Mesh tab (crates/mesh-top src/ui.rs, "1 mesh"): the cluster
2 * overview (one row per system, from its own endpoint or another member's record of it), and one
3 * panel per machine: GPU, nodes, blinks, peers, the program chips, the tasks/s sparkline, the
4 * Network and Load boxes and the node grid. */
5#ifndef MESH_TOP_UI_MESH_H
6#define MESH_TOP_UI_MESH_H
7
8#include "mesh/top_ui_kit.h"
9
10/* One overview row: a system (from its own endpoint, or only another member's record of it) or a
11 * single machine. */
12typedef struct {
13    bool has_system;
14    uint32_t system;
15    bool has_machine;
16    size_t machine; /* the endpoint index reporting it */
17    bool has_member;
18    mt_member member; /* its record as another member sees it (no endpoint of its own) */
19} mt_cluster_row;
20/* Systems 0..N-1 in order, then machines that are not in a cluster; returns the count (malloc'd). */
21size_t mt_cluster_rows(const mt_app *app, mt_cluster_row **out);
22
23/* The gpt2 workers' last request as spans; false without a gpt2 program. */
24bool mt_infer_spans(mt_frame *f, const mt_snapshot *s, tui_line *out);
25
26void mt_draw_mesh(mt_frame *f, tui_rect area, const mt_app *app, mt_instant now);
27
28#endif