feat: scaffold project framework with engine, node skeleton, and passthrough node
- CMake build system with vcpkg dependency management - libdmf-node: Node interface, port definitions, WebSocket control server, node runner with MXL lifecycle management - libdmf-engine: Graph model (nodes/edges CRUD, serialization), FlowManager (UUID + V210 NMOS flow definitions), ProcessManager (fork/exec node processes), ApiServer (REST API for graph control) - Passthrough node: reads V210 grains from MXL, copies, writes to MXL - Unit tests for Graph and FlowManager (6 cases, 21 assertions) - MXL SDK as git submodule (symlinked from extern/mxl)
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
#include <dmf-engine/api_server.hpp>
|
||||
#include <dmf-engine/graph.hpp>
|
||||
#include <dmf-engine/flow_manager.hpp>
|
||||
#include <dmf-engine/process_manager.hpp>
|
||||
|
||||
#include <spdlog/spdlog.h>
|
||||
|
||||
#include <csignal>
|
||||
#include <atomic>
|
||||
|
||||
static std::atomic<bool> g_running{true};
|
||||
|
||||
static void signal_handler(int /*signum*/) {
|
||||
g_running = false;
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
uint16_t port = 8080;
|
||||
|
||||
for (int i = 1; i < argc; ++i) {
|
||||
std::string arg = argv[i];
|
||||
if ((arg == "--port" || arg == "-p") && i + 1 < argc) {
|
||||
port = static_cast<uint16_t>(std::stoi(argv[++i]));
|
||||
}
|
||||
}
|
||||
|
||||
std::signal(SIGINT, signal_handler);
|
||||
std::signal(SIGTERM, signal_handler);
|
||||
|
||||
spdlog::info("DMF Studio Engine starting on port {}", port);
|
||||
|
||||
dmf_engine::Graph graph;
|
||||
dmf_engine::FlowManager flow_manager;
|
||||
dmf_engine::ProcessManager process_manager;
|
||||
|
||||
dmf_engine::ApiServer api_server(port, graph, flow_manager, process_manager);
|
||||
|
||||
spdlog::info("DMF Studio Engine ready");
|
||||
|
||||
while (g_running) {
|
||||
api_server.poll(100);
|
||||
}
|
||||
|
||||
spdlog::info("DMF Studio Engine shutting down");
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user