v2.0.0
Loading...
Searching...
No Matches
mna_script.h File Reference

Inline source code carried by a Script-mode graph node — language, interpreter command, code body, optional authoring URI and integrity hash. More...

#include "mna_global.h"
#include <QString>
#include <QStringList>
#include <QJsonObject>
#include <QCborMap>
Include dependency graph for mna_script.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  MNALIB::MnaScript
 Inline interpreter-launched source code carried by a Script-mode MnaNode. More...

Namespaces

namespace  MNALIB
 MNE Analysis Container Format (mna/mnx).

Detailed Description

Inline source code carried by a Script-mode graph node — language, interpreter command, code body, optional authoring URI and integrity hash.

SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors

Author
Christoph Dinh chris.nosp@m.toph.nosp@m..dinh.nosp@m.@mne.nosp@m.-cpp..nosp@m.org
Since
2.2.0
Date
April 2026

MnaScript is the payload that turns a generic MnaNode into a one-off custom step without forcing every user-written snippet through the MnaOpRegistry. When the host node's execMode is MnaNodeExecMode::Script the executor writes code to a temporary file, launches interpreter (auto- detected from language when unset) with interpreterArgs prepended, captures stdout/stderr and the exit code, and marshals results back into the node's typed output ports.

Supported languages cover the day-to-day MEG/EEG glue work: python, shell, r, matlab, octave and julia. sourceUri lets the authoring GUI keep a link back to the original file on disk; serialisation resolves that link into code so a shipped project is self-contained. codeSha256 detects tampering between save and load, and keepTempFile is a debug aid that preserves the on-disk script after execution.

Definition in file mna_script.h.