Class ManifestManager

Class Documentation

class ManifestManager

Manages manifest loading, validation, and entity access.

Thread-safe class for managing the manifest lifecycle. Provides access to parsed entities and relationship queries.

Public Functions

explicit ManifestManager(rclcpp::Node *node = nullptr)

Construct ManifestManager.

Parameters:

node – ROS node for logging (can be nullptr for testing)

bool load_manifest(const std::string &file_path, bool strict = true)

Load manifest from file.

Note

ERRORs (broken references, circular deps, duplicate bindings) always cause failure regardless of strict mode, as they indicate a fundamentally broken manifest. Only WARNINGs are affected by the strict flag.

Parameters:
  • file_path – Path to manifest YAML file

  • strict – If true, also fail on warnings; errors always cause failure

Returns:

true if loaded and validated successfully

bool load_manifest_from_string(const std::string &yaml_content, bool strict = true)

Load manifest from YAML string (useful for testing)

Note

See load_manifest() for behavior details.

Parameters:
  • yaml_content – YAML content

  • strict – If true, also fail on warnings; errors always cause failure

Returns:

true if loaded and validated successfully

bool reload_manifest()

Reload manifest from previously loaded file path.

Returns:

true if reloaded successfully

void unload_manifest()

Unload current manifest (revert to runtime-only mode)

bool is_manifest_active() const

Check if manifest is loaded and active.

std::string get_manifest_path() const

Get the loaded manifest file path.

ValidationResult get_validation_result() const

Get last validation result.

std::optional<ManifestMetadata> get_metadata() const

Get manifest metadata.

ManifestConfig get_config() const

Get manifest config.

std::unordered_map<std::string, ManifestLockConfig> get_lock_overrides() const

Get per-entity lock configuration overrides from manifest.

std::vector<ScriptEntryConfig> get_scripts() const

Get script entries defined in manifest.

std::vector<Area> get_areas() const

Get all areas from manifest.

std::vector<Component> get_components() const

Get all components from manifest.

std::vector<App> get_apps() const

Get all apps from manifest.

std::vector<Function> get_functions() const

Get all functions from manifest.

std::optional<Area> get_area(const std::string &id) const

Get area by ID.

std::optional<Component> get_component(const std::string &id) const

Get component by ID.

std::optional<App> get_app(const std::string &id) const

Get app by ID.

std::optional<Function> get_function(const std::string &id) const

Get function by ID.

std::vector<Component> get_components_for_area(const std::string &area_id) const

Get components belonging to an area.

std::vector<App> get_apps_for_component(const std::string &component_id) const

Get apps located on a component.

std::vector<std::string> get_hosts_for_function(const std::string &function_id) const

Get entities hosted by a function.

std::vector<Area> get_subareas(const std::string &area_id) const

Get subareas of an area.

std::vector<Component> get_subcomponents(const std::string &component_id) const

Get subcomponents of a component.

std::optional<json> get_capabilities_override(const std::string &entity_id) const

Get custom capabilities override for an entity.

json get_status_json() const

Get manifest status as JSON (for /manifest/status endpoint)