1
Prerequisites
Confirm the following before you begin:
- NSP daemon installed and running on port 7842. Download from platform.nelieo.com/download.
- .NET Framework 4.8 or later installed on the host machine. The CLR probe targets both .NET 4.x and .NET 6+ apps.
- The target .NET application is running. The daemon scans for processes every 5 seconds, so start your app before you query for it. This guide uses Mission Planner (a C# Ground Control Station) as the example; the same steps apply to any WinForms, WPF, or .NET console app.
- Python 3.11+ and the NSP SDK installed.
- An NSP API key from platform.nelieo.com, stored in the
NSP_API_KEYenvironment variable.
2
Detect the .NET App
Call the Example response showing Mission Planner as a CLR app:You can also check with the Python SDK:Expected output:
/substrate/v1/apps endpoint to confirm the daemon has detected and classified your application. Look for "runtime": "clr" in the response.The first time the CLR probe attaches to a process, it may take up to 90 seconds to complete the cold probe (heap enumeration + schema learning). Subsequent runs use the cached schema and attach in under a second. Check
probe_status — it progresses from attaching → cold_probe → active.3
Read .NET App State
Once attached, use Expected output:
session.get_*() with dot-notation keys to read values that the CLR probe has normalised into SSF. The exact keys available depend on the application; call session.state.objects to see all discovered keys.4
Explore Available Actions
Iterate Example output for Mission Planner:
session.actions to see what NSP discovered for this CLR app. Each entry shows the action name, its full type signature, and its reversibility classification.5
Execute a CLR Action
Use Expected output:
session.execute() to run an action. For reversible_write actions you do not need a verify_expression, though you can add one. The example below arms the motors — a reversible operation that can be undone with disarm_motors.6
Handle the raw_return Field
When NSP invokes a CLR method rather than a higher-level action, the response includes a
raw_return field containing the .NET method’s return value serialised to JSON. Check this field when you need the actual return value of a method call rather than a simple success boolean.raw_return is null for actions that do not map to a direct method invocation (for example, actions that trigger UI events). The success field always reflects whether the action completed without error, regardless of raw_return.7
Cold Probe Timing and Confidence
The first time NSP attaches the CLR probe to a process, it must enumerate the full CLR heap to build the schema — this is called a cold probe and can take up to 90 seconds. Subsequent attachments use the cached schema and complete in under a second.You can monitor probe progress by polling The
/substrate/v1/apps and checking probe_status and confidence:probe_status field moves through these stages:Actions are gated by
confidence. The CLR probe typically reaches 0.93–0.97 confidence once active. reversible_write actions require confidence >= 0.80; irreversible_write actions require confidence >= 0.95.