v2.0.0
Loading...
Searching...
No Matches
mna_node.cpp File Reference

JSON and CBOR codecs for MnaNode covering ports, attributes, IPC/Script configuration, verification, provenance and execution metadata. More...

#include "mna_node.h"
#include <QJsonArray>
#include <QCborArray>
Include dependency graph for mna_node.cpp:

Go to the source code of this file.

Detailed Description

JSON and CBOR codecs for MnaNode covering ports, attributes, IPC/Script configuration, verification, provenance and execution metadata.

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

The implementation serialises every field declared in mna_node.h and routes nested structs through their own codecs (MnaPort, MnaScript, MnaVerification), which keeps the per-node payload self-describing. The MnaNodeExecMode enum is encoded as a stable lowercase string (batch / stream / ipc / script) so manual edits to a .mna file remain readable. Conditional fields (IPC parameters when execMode == Ipc, script body when execMode == Script) are written only when meaningful so the on-disk representation stays compact, while extras preserves forward-compatible additions through the round-trip.

Definition in file mna_node.cpp.