Goby3 3.7.0
2026.11.12
Loading...
Searching...
No Matches
goby::middleware::tool::interface Namespace Reference

Namespaces

namespace  detail
 
namespace  style
 

Classes

struct  Application
 
struct  Connection
 
struct  D2Params
 
struct  Deployment
 
class  DiagramView
 What a diagram draws of a resolved deployment, shared by the DOT and D2 writers. More...
 
struct  DotParams
 
struct  Endpoint
 Where in a deployment a publication or subscription is made. More...
 
struct  Issue
 A problem found while loading or checking a deployment. More...
 
struct  LaunchDifference
 A difference between a launch file and a deployment's launch lines. More...
 
struct  LaunchEntry
 How one run: entry is started by goby_launch. More...
 
struct  LaunchLine
 One goby_launch line, worked out from a run: entry. More...
 
struct  LaunchSettings
 A platform's launch: settings. More...
 
struct  LaunchUnit
 What one launch file starts: a platform, or one module (one gobyd) of a platform. More...
 
struct  LoadParams
 Where to find interface files and the values of ${NAME} in a deployment file. More...
 
struct  Module
 
struct  ParsedLaunchLine
 One line of an existing launch file, as goby_launch would read it. More...
 
struct  Platform
 
struct  PlatformSystemd
 A platform's systemd: settings. More...
 
class  PublishIndexer
 Hands out the per-layer publication numbers (P0, P1, ...) shown in diagrams. More...
 
struct  PubSubEntry
 One publication or subscription as written to (and read from) an interface file. More...
 
struct  Resolution
 
struct  SystemdSettings
 systemd: settings, on a run: entry or as a platform's defaults More...
 
struct  SystemdUnitFile
 
struct  Thread
 
struct  Unmatched
 
struct  ValidateParams
 
struct  ValidationSummary
 
class  ViewFilter
 Which groups and nodes a diagram (or a filtered check) shows. More...
 

Typedefs

using Issues = std::vector< Issue >
 
using KeyValues = std::vector< std::pair< std::string, std::string > >
 

Enumerations

enum class  Layer {
  UNKNOWN = -1 , INTERTHREAD = 0 , INTERPROCESS = 10 , INTERMODULE = 20 ,
  INTERVEHICLE = 30
}
 
enum class  GroupMatch { NONE , EXACT , LOOSE }
 How a publication's group reaches a subscription's. More...
 

Functions

std::vector< LaunchUnit > launch_units (const Deployment &deployment)
 Every launch file a deployment makes: one per platform, or per module where a platform has modules.
 
std::vector< std::string > auto_hold (const LaunchUnit &unit)
 gobyd's hold: applications with a required intervehicle subscription, which must be subscribed before anything is published to them, and goby_intervehicle_portal, which carries their subscriptions
 
std::vector< std::string > auto_expected (const LaunchUnit &unit, const LaunchEntry &coroner)
 goby_coroner's expected names: every Goby application in the unit but the coroner itself and those marked expected: false
 
std::vector< LaunchLine > launch_lines (const LaunchUnit &unit)
 The goby_launch lines for a unit, in run: order (disabled entries included)
 
std::string launch_line_text (const LaunchLine &line)
 "[kill=..., name=..., env=...] command", as goby_launch reads it
 
std::string render_launch (const LaunchUnit &unit, const std::string &deployment_file)
 A goby_launch file for the unit.
 
void check_launch (const Deployment &deployment, Issues &issues)
 Problems with a deployment's launch data: anything goby_launch would cut at a '#', a Goby application listed before gobyd, a hold list that misses a required intervehicle subscriber, and an expected list that differs from what is launched.
 
std::vector< ParsedLaunchLine > parse_launch_file (const std::string &text)
 
std::vector< LaunchDifference > check_launch_file (const LaunchUnit &unit, const std::string &launch_text)
 Compare a hand-written launch file with what the deployment would launch.
 
void add_issue (Issues &issues, Issue::Severity severity, std::string code, std::string message, std::string location="")
 
std::ostream & operator<< (std::ostream &os, const Issue &issue)
 
bool has_errors (const Issues &issues)
 
Deployment load_deployment (const std::string &path, Issues &issues, const LoadParams &params=LoadParams())
 Load a deployment file, or a single interface file as a one-platform stub deployment.
 
std::string layer_name (Layer layer)
 
char layer_code (Layer layer)
 
std::string necessity_name (goby::middleware::Necessity n)
 
goby::middleware::Necessity necessity_from_name (const std::string &s)
 
std::string compact_numerics (const std::set< std::uint32_t > &values)
 e.g. {1, 2, 3, 7} -> "1-3,7"
 
GroupMatch group_match (const PubSubEntry &a, const PubSubEntry &b)
 
std::ostream & operator<< (std::ostream &os, const PubSubEntry &e)
 
bool operator< (const PubSubEntry &a, const PubSubEntry &b)
 
GroupMatch connection (const PubSubEntry &a, const PubSubEntry &b)
 Would a publication a reach subscription b (or vice versa) if they share a scope?
 
bool connects (const PubSubEntry &a, const PubSubEntry &b)
 
void write_d2 (std::ostream &os, const Deployment &deployment, const Resolution &resolution, const D2Params &params)
 Write a D2 diagram of the deployment's publish/subscribe connections.
 
void write_dot (std::ostream &os, const Deployment &deployment, const Resolution &resolution, const DotParams &params)
 Write a Graphviz digraph of the deployment's publish/subscribe connections.
 
bool in_scope (Layer layer, const Endpoint &pub, const Endpoint &sub)
 Can a publication made at pub reach a subscription made at sub on layer?
 
void collect_entries (const Deployment &deployment, std::vector< Unmatched > &pubs, std::vector< Unmatched > &subs)
 Every publication and subscription in a deployment, with where it is made.
 
Resolution resolve (const Deployment &deployment)
 Match every publication to the subscriptions it reaches.
 
bool is_goby_application (const Application &app)
 Goby's own applications, which a diagram draws as one node without their threads.
 
bool is_goby_thread (const std::string &name)
 A thread from Goby itself: a goby:: class, or a lambda in one of Goby's headers.
 
std::string display_thread_name (const std::string &name)
 A thread's name as drawn: a lambda by its file and line, a template without its arguments.
 
std::string systemd_target (const Deployment &deployment, const LaunchUnit &unit)
 The target (generated, or the platform's systemd: target:) that a unit's services belong to.
 
std::vector< SystemdUnitFile > render_systemd (const Deployment &deployment, const LaunchUnit &unit, Issues &issues)
 The systemd units that start a launch unit: one service per enabled entry and, unless the platform names its own, a target that brings them all up.
 
ValidationSummary validate (const Deployment &deployment, const Resolution &resolution, const ValidateParams &params, Issues &issues)
 Check every required and recommended subscription in a resolved deployment.
 

Typedef Documentation

◆ Issues

using goby::middleware::tool::interface::Issues = typedef std::vector<Issue>

Definition at line 89 of file model.h.

◆ KeyValues

using goby::middleware::tool::interface::KeyValues = typedef std::vector<std::pair<std::string, std::string> >

Definition at line 303 of file model.h.

Enumeration Type Documentation

◆ GroupMatch

How a publication's group reaches a subscription's.

Enumerator
NONE 
EXACT 
LOOSE 

Definition at line 248 of file pubsub_entry.h.

◆ Layer

Enumerator
UNKNOWN 
INTERTHREAD 
INTERPROCESS 
INTERMODULE 
INTERVEHICLE 

Definition at line 45 of file pubsub_entry.h.

Function Documentation

◆ add_issue()

void goby::middleware::tool::interface::add_issue ( Issues &  issues,
Issue::Severity  severity,
std::string  code,
std::string  message,
std::string  location = "" 
)
inline

Definition at line 91 of file model.h.

◆ auto_expected()

std::vector< std::string > goby::middleware::tool::interface::auto_expected ( const LaunchUnit &  unit,
const LaunchEntry &  coroner 
)
inline

goby_coroner's expected names: every Goby application in the unit but the coroner itself and those marked expected: false

Definition at line 187 of file launch.h.

◆ auto_hold()

std::vector< std::string > goby::middleware::tool::interface::auto_hold ( const LaunchUnit &  unit)
inline

gobyd's hold: applications with a required intervehicle subscription, which must be subscribed before anything is published to them, and goby_intervehicle_portal, which carries their subscriptions

Definition at line 170 of file launch.h.

◆ check_launch()

void goby::middleware::tool::interface::check_launch ( const Deployment &  deployment,
Issues &  issues 
)
inline

Problems with a deployment's launch data: anything goby_launch would cut at a '#', a Goby application listed before gobyd, a hold list that misses a required intervehicle subscriber, and an expected list that differs from what is launched.

Definition at line 332 of file launch.h.

◆ check_launch_file()

std::vector< LaunchDifference > goby::middleware::tool::interface::check_launch_file ( const LaunchUnit &  unit,
const std::string &  launch_text 
)
inline

Compare a hand-written launch file with what the deployment would launch.

Definition at line 473 of file launch.h.

◆ collect_entries()

void goby::middleware::tool::interface::collect_entries ( const Deployment &  deployment,
std::vector< Unmatched > &  pubs,
std::vector< Unmatched > &  subs 
)
inline

Every publication and subscription in a deployment, with where it is made.

Definition at line 97 of file resolve.h.

◆ compact_numerics()

std::string goby::middleware::tool::interface::compact_numerics ( const std::set< std::uint32_t > &  values)
inline

e.g. {1, 2, 3, 7} -> "1-3,7"

Definition at line 220 of file pubsub_entry.h.

◆ connection()

GroupMatch goby::middleware::tool::interface::connection ( const PubSubEntry &  a,
const PubSubEntry &  b 
)
inline

Would a publication a reach subscription b (or vice versa) if they share a scope?

Definition at line 356 of file pubsub_entry.h.

◆ connects()

bool goby::middleware::tool::interface::connects ( const PubSubEntry &  a,
const PubSubEntry &  b 
)
inline

Definition at line 378 of file pubsub_entry.h.

◆ display_thread_name()

std::string goby::middleware::tool::interface::display_thread_name ( const std::string &  name)
inline

A thread's name as drawn: a lambda by its file and line, a template without its arguments.

Definition at line 296 of file resolve.h.

◆ group_match()

GroupMatch goby::middleware::tool::interface::group_match ( const PubSubEntry &  a,
const PubSubEntry &  b 
)
inline

Definition at line 308 of file pubsub_entry.h.

◆ has_errors()

bool goby::middleware::tool::interface::has_errors ( const Issues &  issues)
inline

Definition at line 111 of file model.h.

◆ in_scope()

bool goby::middleware::tool::interface::in_scope ( Layer  layer,
const Endpoint &  pub,
const Endpoint &  sub 
)
inline

Can a publication made at pub reach a subscription made at sub on layer?

Interprocess stops at the module (one gobyd), intermodule at the platform, and intervehicle reaches every other platform.

Definition at line 83 of file resolve.h.

◆ is_goby_application()

bool goby::middleware::tool::interface::is_goby_application ( const Application &  app)
inline

Goby's own applications, which a diagram draws as one node without their threads.

Definition at line 283 of file resolve.h.

◆ is_goby_thread()

bool goby::middleware::tool::interface::is_goby_thread ( const std::string &  name)
inline

A thread from Goby itself: a goby:: class, or a lambda in one of Goby's headers.

Definition at line 289 of file resolve.h.

◆ launch_line_text()

std::string goby::middleware::tool::interface::launch_line_text ( const LaunchLine &  line)
inline

"[kill=..., name=..., env=...] command", as goby_launch reads it

Definition at line 295 of file launch.h.

◆ launch_lines()

std::vector< LaunchLine > goby::middleware::tool::interface::launch_lines ( const LaunchUnit &  unit)
inline

The goby_launch lines for a unit, in run: order (disabled entries included)

Definition at line 221 of file launch.h.

◆ launch_units()

std::vector< LaunchUnit > goby::middleware::tool::interface::launch_units ( const Deployment &  deployment)
inline

Every launch file a deployment makes: one per platform, or per module where a platform has modules.

Definition at line 152 of file launch.h.

◆ layer_code()

char goby::middleware::tool::interface::layer_code ( Layer  layer)
inline

Definition at line 67 of file pubsub_entry.h.

◆ layer_name()

std::string goby::middleware::tool::interface::layer_name ( Layer  layer)
inline

Definition at line 54 of file pubsub_entry.h.

◆ load_deployment()

Deployment goby::middleware::tool::interface::load_deployment ( const std::string &  path,
Issues &  issues,
const LoadParams &  params = LoadParams() 
)
inline

Load a deployment file, or a single interface file as a one-platform stub deployment.

Problems are added to issues; on an error the returned deployment may be incomplete.

Definition at line 1524 of file model.h.

◆ necessity_from_name()

goby::middleware::Necessity goby::middleware::tool::interface::necessity_from_name ( const std::string &  s)
inline

Definition at line 91 of file pubsub_entry.h.

◆ necessity_name()

std::string goby::middleware::tool::interface::necessity_name ( goby::middleware::Necessity  n)
inline

Definition at line 80 of file pubsub_entry.h.

◆ operator<()

bool goby::middleware::tool::interface::operator< ( const PubSubEntry &  a,
const PubSubEntry &  b 
)
inline

Definition at line 341 of file pubsub_entry.h.

◆ operator<<() [1/2]

std::ostream & goby::middleware::tool::interface::operator<< ( std::ostream &  os,
const Issue &  issue 
)
inline

Definition at line 97 of file model.h.

◆ operator<<() [2/2]

std::ostream & goby::middleware::tool::interface::operator<< ( std::ostream &  os,
const PubSubEntry &  e 
)
inline

Definition at line 335 of file pubsub_entry.h.

◆ parse_launch_file()

std::vector< ParsedLaunchLine > goby::middleware::tool::interface::parse_launch_file ( const std::string &  text)
inline

Definition at line 408 of file launch.h.

◆ render_launch()

std::string goby::middleware::tool::interface::render_launch ( const LaunchUnit &  unit,
const std::string &  deployment_file 
)
inline

A goby_launch file for the unit.

Definition at line 315 of file launch.h.

◆ render_systemd()

std::vector< SystemdUnitFile > goby::middleware::tool::interface::render_systemd ( const Deployment &  deployment,
const LaunchUnit &  unit,
Issues &  issues 
)
inline

The systemd units that start a launch unit: one service per enabled entry and, unless the platform names its own, a target that brings them all up.

Definition at line 135 of file systemd.h.

◆ resolve()

Resolution goby::middleware::tool::interface::resolve ( const Deployment &  deployment)
inline

Match every publication to the subscriptions it reaches.

Definition at line 128 of file resolve.h.

◆ systemd_target()

std::string goby::middleware::tool::interface::systemd_target ( const Deployment &  deployment,
const LaunchUnit &  unit 
)
inline

The target (generated, or the platform's systemd: target:) that a unit's services belong to.

Definition at line 126 of file systemd.h.

◆ validate()

ValidationSummary goby::middleware::tool::interface::validate ( const Deployment &  deployment,
const Resolution &  resolution,
const ValidateParams &  params,
Issues &  issues 
)
inline

Check every required and recommended subscription in a resolved deployment.

Adds an issue for each problem and returns counts for a summary line.

Definition at line 89 of file validate.h.

◆ write_d2()

void goby::middleware::tool::interface::write_d2 ( std::ostream &  os,
const Deployment &  deployment,
const Resolution &  resolution,
const D2Params &  params 
)
inline

Write a D2 diagram of the deployment's publish/subscribe connections.

Definition at line 434 of file render_d2.h.

◆ write_dot()

void goby::middleware::tool::interface::write_dot ( std::ostream &  os,
const Deployment &  deployment,
const Resolution &  resolution,
const DotParams &  params 
)
inline

Write a Graphviz digraph of the deployment's publish/subscribe connections.

Definition at line 449 of file render_dot.h.