Repository navigation
Tools
Back to Home to install and connect, or Internals for how the index is built. En francais: Outils.
Thirty-eight tools, all read-only. Every call is written to the audit log. The index is refreshed before each call, incrementally: nothing to launch by hand.
Conventions that hold everywhere:
-
Compiled code only. The preprocessor is replayed with the
.prjdefines, include paths and build configuration. Code excluded by an#ifis left out of counts, graphs and analyses;include_inactive=truebrings it back where it makes sense. -
Summary first, then pages. Long lists come with
total,offset,limitandnext_offset(nullon the last page). -
Size budget. No answer exceeds
CVI_MCP_MAX_CHARS(40000 by default): the largest list is cut,truncatedsays which one andnext_offsetstill leads to the rest.format="compact"(orCVI_MCP_FORMAT=compact) turns lists into columns plus rows. -
Empty means explained. An empty result says why: unknown file filter,
symbol only in excluded code, name only tested by an
#if, or a fewdid_you_meannames. -
Confidence. Heuristic findings carry
confidence:haute,moyenneorfaible, with the reason. -
Paths are relative to the common root of the project and its sources.
index_infocloses every answer: version, files, last index date, build configuration, root change if any.
Files have an origin: project, generated (the .h CVI writes for a
.uir) or library (third-party header). They also carry in_build.
| Tool | What it gives |
|---|---|
cvi_environment() |
platform, CVI installations, SDK folders, build executable, settings, index state |
self_check() |
.prj reading (sources, include paths, missing libraries), unresolved includes (SDK or really missing), files outside the build, branches left undecided, parse errors, encodings |
use_project(name_or_path=None) |
switch project without restarting; without argument, current and known projects. One index per project |
reindex(force=False) |
incremental or full reindex, with headers reached and configuration |
| Tool | What it gives |
|---|---|
project_overview(section, scope, contains, limit, offset) |
totals per origin, entry points, top lists. section: files, domains, libraries, callbacks, static_functions, externals (with category libc, sdk, unknown and SDK signature), entry_points
|
list_symbols(kind, file, name_contains, scope, include_inactive, format) |
symbols; file accepts a name, a folder or a pattern (Commun/Includes/*) |
find_symbol(name, exact, kind, include_inactive) |
case-insensitive; several words must all appear (turbine max); common abbreviations match (nb finds NOMBRE) |
get_function(name, include_body, lines, skeleton) |
signature, size, cyclomatic and cognitive complexity, locals, stack estimate, callers, callees with SDK signature, and touches: globals read and written, locks, panels, controls, INI keys, SQL. skeleton gives the control structure without any expression. lines: N or a-b
|
find_usages(name, kind, file, group_by, include_inactive, format) |
call, read, write, ref, plus cond (#if), macro (inside another macro), dim (array size), decl (initializer). group_by: function or file
|
call_graph(function, direction, depth, include_external, include_inactive) |
callers or callees; edges through pointers or tables carry confidence
|
file_outline(file) |
one file: includes with how they were resolved, symbols, encoding, in_build, guard, branches |
| Tool | What it gives |
|---|---|
search_text(pattern, scope, regex, file, origin) |
text search in code, comments or strings: position, zone, enclosing function and the matching text only |
find_by_topic(topic) |
everything named after a theme: files, functions, callbacks, globals, macros, types, panels, controls, string literals |
related(name) |
same numbered series, used together, same file, similar names |
series(name, min_members) |
numbered identifiers (X1..Xn): range, gaps, and files that stop earlier than elsewhere |
impact(name) |
checklist to change or extend a symbol: definitions, #if, arrays, derived macros, functions with their panels and INI keys, numbered series to extend |
peek(file, line, before, after) |
a few lines around a position; requires CVI_MCP_ALLOW_PEEK=1, capped, logged |
| Tool | What it gives |
|---|---|
config_map(scope) |
every macro tested by an #if: current value or off, blocks driven (active, excluded), commented-out definition to turn it on; build configuration, .prj defines, include paths |
macro_usages(name, defines) |
definitions (raw and evaluated), #if with state, functions, arrays sized, macros and initializers citing it |
config_diff(defines) |
what-if without touching files: branches switched, symbols appearing or disappearing, functions affected, derived macros, arrays resized |
ui_map(panel, contains, sort, limit, offset, uir). Without panel: one line
per panel, totals, callbacks_reconciliation, callbacks registered by code
(timer, thread, TCP, pointer table), unwired callbacks with reason and
confidence, panel_variants (panels that are copies of each other and what
differs), unused controls by type. sort: name, controls, unused,
callbacks, wired, file. uir keeps one .uir. limit=0 returns all.
With panel: each control, its type, its callback and what it calls.
| Tool | What it gives |
|---|---|
dead_code(section) |
functions unreachable from entry points (never_called, only_called_by_dead_code, only_used_in_excluded_code), unwired callbacks, globals unused or write-only, macros, panels (never_loaded, only_in_excluded_code, indirect_load_possible with evidence) |
lock_check(kind) |
locks followed path by path on compiled code; wrapper functions, lock order inversions, blocking calls while held |
risks(check, file, min_confidence) |
unbounded_copy, format_mismatch, ignored_return, unchecked_alloc, leak_on_return, leak_at_end, double_release, ui_from_thread, shared_global_unlocked
|
consistency(check) |
duplicate_definition, prototype_mismatch, declared_not_defined, could_be_static, extern_mismatch, callback_signature, control_on_wrong_panel
|
complexity(sort, file, min_risk, section) |
lines, cyclomatic, cognitive, depth, params, locals, stack; section: by_file or duplicates (functions copied from one model) |
module_graph(file, format) |
file dependencies, cycles, mutual pairs with the lightest edge to cut; format: json, mermaid, dot
|
threads(global_name) |
execution contexts (UI, thread pool, async timers), what each reaches, UI timers, shared globals; with global_name, who writes and reads it from where, lock or not |
| Tool | What it gives |
|---|---|
call_sites(pattern, position) |
constant arguments passed to Modbus*, *Wago*, MBT*...: addresses, registers, bits, evaluated macros, calling functions |
persistence(kind, section) |
ini: sections, keys, readers and writers, keys written never read and the reverse. sql: tables and statements per function |
| Tool | What it gives |
|---|---|
sdk_index(paths, force) |
index NI headers and function panels; done automatically the first time it is needed if CVI is installed |
sdk_lookup(name, exact) |
prototype, parameters and comment of an SDK function |
build_check(target, dry_run, config) |
compile with compile.exe; diagnostics per file, change since the previous build, warning when the project's CVI version is not installed. config: Debug, Release, Debug64, Release64 or a .prj configuration |
| Tool | What it gives |
|---|---|
snapshot_save(label), snapshot_list(), snapshot_delete(label)
|
named states of the index |
diff_versions(before, after, path, files) |
headline in a few sentences, then added, removed, moved, signature, value and body changes, symbols switched between compiled and excluded, UI constants and INI keys added or removed, calls. Sides: a snapshot, current or path:<folder> (another version or variant). files restricts both sides |
history(target) |
git history when the project is a repository: commits on a function's lines, on a file, or the latest ones |
- Home install and connect
- Tools the 38 tools
- Internals design, limits, troubleshooting
- Accueil installer et brancher
- Outils les 38 outils
- Fonctionnement mecanique, limites, depannage