How the CLR Probe Works
When the NSP daemon detects a .NET process, it injects a managed C# bridge assembly into the target AppDomain via the CLR Hosting API. The bridge runs inside the target process and communicates back to the daemon through a Memory-Mapped File (MMF). This design means:- No process restart required — injection happens while the app is running.
- Zero-copy communication — the MMF is shared memory; no serialization overhead.
- Non-intrusive field reads — field values are read through managed reflection without pausing the JIT.
Prerequisites
.NET App Running
The target .NET application must already be running. The daemon detects it automatically within one scan cycle (default: 5 seconds).
NSP Daemon Running
Run
axon-daemon.exe run or start the Windows Service. Ensure the daemon has permission to inject into the target process (run both as the same user, or as Administrator).SDK Installed
pip install nelieo-nspNo App Changes
You do not need to modify, rebuild, or restart the target .NET application.
Step 1 — Verify Detection
List tracked apps and check for your .NET process. Theruntime field will be clr for any managed .NET target:
CLR confidence baselines typically start at
0.70–0.80 during the first probe while the bridge enumerates assembly types. Confidence reaches 0.95+ once the semantic engine has mapped the major state fields. This usually takes 15–45 seconds after the process is first detected.Step 2 — Attach and Read Normalized State
The CLR probe normalizes extracted fields into the standard NSP state tree (SSF format). Use the same typed accessors you would with any other app:Step 3 — Read .NET Fields Directly via session.clr
When normalized state doesn’t cover what you need, use session.clr — a CLRSessionProxy that gives you direct access to the CLR heap:
- Read a single field
- Read multiple fields at once
- Heap snapshot
Step 4 — Invoke .NET Methods via session.clr
Call any public .NET method with typed arguments. Python values are automatically coerced to the matching .NET parameter types:
Step 5 — Execute NSP Actions
The CLR probe also exposes higher-level NSP actions discovered from the app’s schema. Usesession.execute() for these:
Step 6 — Stream Telemetry in Real Time
Complete Example — Autonomous Waypoint Mission
CLR Proxy Method Reference
session.clr.read_field(type_name, field_name)
session.clr.read_field(type_name, field_name)
Reads a single field from the first matching instance of
type_name on the CLR heap.session.clr.read_fields(type_name, *field_names)
session.clr.read_fields(type_name, *field_names)
Reads multiple fields in a single MMF round-trip. Returns a
dict[str, Any].session.clr.invoke(type_name, method_name, args=[])
session.clr.invoke(type_name, method_name, args=[])
Invokes a method on the first matching instance. Returns the method’s return value, coerced back to a Python type.
session.clr.heap_snapshot(include_prefix, max_instances, timeout_ms)
session.clr.heap_snapshot(include_prefix, max_instances, timeout_ms)
Walks the CLR heap and returns a list of objects whose type names start with
include_prefix. Each object contains type_name and fields keys. This is an expensive operation — use sparingly.