Inventory¶
Use ncc inventory to inspect a NodeSet's nodes and references before generating
C or Python code. It produces JSON and needs no application runtime or SDK.
Inspect a model¶
Pass the target XML and its dependencies:
The command writes JSON to standard output. To save it to a file:
-o names a file. Missing parent directories are created and an existing
file is overwritten. Diagnostics go to standard error, so stdout can also be
redirected or piped to a JSON tool.
Dependencies¶
Repeat -e for each dependency, including transitive dependencies, in dependency
order. Use a bundled name such as ns0 or di, or a path to a custom XML file:
Bundled models are available offline, including source-only models without an
o6 runtime module. Custom dependencies use plain XML paths; Python package
mappings and --shortname are unnecessary. The target is always an XML path.
Command reference¶
| Argument | Meaning |
|---|---|
<xml> |
Target NodeSet XML to inspect. |
-e, --existing |
Bundled dependency name or XML path. Repeat for all dependencies. |
-o, --output |
Output JSON file. Omit to write to stdout. |
--description-cache |
Description-URL cache JSON used by the XML loader; defaults to description_cache.json in the current working directory. |
-v, --verbose |
Increase diagnostic verbosity; repeat for debug logging. |
-h, --help |
Show command help. |
Exit status 0 means success, 2 indicates a CLI argument or unknown bundled
dependency error, and 1 indicates a loading or output error.
Output¶
The JSON object has four fields:
| Field | Contents |
|---|---|
source |
Target XML path. |
namespace_uris |
Namespace URIs in the parsed graph's index order. |
nodes |
Target nodes, each with node_id, node_class, and browse_name. Dependency nodes are excluded. |
references |
References from the combined graph, including dependencies, each with source, reference_type, and target. |
For example, a target node record can look like this:
Here, namespace index 1 refers to the second entry of namespace_uris.
References are normalized to their forward direction and deduplicated; unresolved
or external endpoints may also appear. Nodes and references are sorted so
identical inputs and arguments produce identical JSON.
The inventory describes the parsed graph. It does not validate whether a particular backend supports every feature in the model and is not generated runtime code. Treat its details as diagnostic output rather than a versioned data interchange contract.