5b2d420e71
- Node control server now accepts HTTP POST /cmd for command dispatch (in addition to existing WebSocket control) - Added NodeControlClient: engine sends commands to nodes via HTTP POST - New REST endpoints: POST /api/graph/nodes/:id/connect-input - connect node input to MXL flow POST /api/graph/nodes/:id/connect-output - create new MXL flow + connect output POST /api/graph/nodes/:id/disconnect-port - remove reader/writer POST /api/graph/nodes/:id/command - send raw command to node - Flow IDs now use proper UUID v4 format (MXL requires standard UUIDs) - Flow definitions use NMOS format (urn:x-nmos:format:video) - Engine passes --mxl-domain to node processes - User-provided node IDs (via 'id' field in POST body) - End-to-end verified: testsrc → passthrough → new MXL output flow
22 lines
480 B
C++
22 lines
480 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <unordered_map>
|
|
#include <cstdint>
|
|
|
|
namespace dmf_engine {
|
|
|
|
class NodeControlClient {
|
|
public:
|
|
bool send_command(uint16_t port, const std::string& json_cmd);
|
|
|
|
void register_node(const std::string& node_id, uint16_t port);
|
|
void unregister_node(const std::string& node_id);
|
|
uint16_t get_port(const std::string& node_id) const;
|
|
|
|
private:
|
|
std::unordered_map<std::string, uint16_t> node_ports_;
|
|
};
|
|
|
|
} // namespace dmf_engine
|