1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//! Topology command arguments
use clap::{Args, ValueEnum};
/// Analyze and visualize project topology (nodes, topics, ports)
#[derive(Args, Debug)]
pub struct TopologyArgs {
/// Group output by nodes or topics
#[arg(short, long, default_value = "nodes")]
pub group_by: GroupBy,
/// Output format
#[arg(short, long, default_value = "table")]
pub format: OutputFormat,
/// Show only nodes
#[arg(long)]
pub nodes_only: bool,
/// Show only topics
#[arg(long)]
pub topics_only: bool,
/// Show only ports and services
#[arg(long)]
pub ports_only: bool,
}
#[derive(Debug, Clone, ValueEnum)]
pub enum GroupBy {
/// Group by nodes (show each node with its topics)
Nodes,
/// Group by topics (show each topic with its publishers/subscribers)
Topics,
}
#[derive(Debug, Clone, ValueEnum)]
pub enum OutputFormat {
/// Table format (default)
Table,
/// JSON format
Json,
/// ASCII graph visualization
Graph,
}