| 331 | } |
| 332 | |
| 333 | NodeConfig create_assemble_node(int id, std::vector<StreamConfig> input_streams, |
| 334 | int scheduler, int dist_nums) { |
| 335 | nlohmann:json info; |
| 336 | |
| 337 | info["id"] = id; |
| 338 | // info["alias"] = alias_; |
| 339 | info["module_info"] = { |
| 340 | {"entry", "assemble_module:AssembleModule"}, |
| 341 | {"name", "assemble_module"}, |
| 342 | {"path", "libengine.so"}, |
| 343 | {"type", "c++"} |
| 344 | }; |
| 345 | // info["meta_info"] = { |
| 346 | // "callback_binding", [] |
| 347 | // "premodule_id", 0 |
| 348 | // }; |
| 349 | info["input_streams"] = nlohmann::json::array(); |
| 350 | for (auto &s : input_streams) { |
| 351 | info["input_streams"].push_back({ |
| 352 | {"alias", s.get_alias()}, |
| 353 | {"identifier", s.get_identifier()}, |
| 354 | {"notify", s.get_notify()} |
| 355 | }); |
| 356 | } |
| 357 | |
| 358 | std::ostringstream output_identifier; |
| 359 | output_identifier << "assemble_module_" << id << "_0"; |
| 360 | |
| 361 | info["output_streams"] = nlohmann::json::array(); |
| 362 | info["output_streams"].push_back({ |
| 363 | {"alias", ""}, |
| 364 | {"identifier", output_identifier.str()}, |
| 365 | {"notify", ""} |
| 366 | }); |
| 367 | // info["option"] = option_.json_value_; |
| 368 | info["scheduler"] = scheduler; |
| 369 | info["dist_nums"] = 1; |
| 370 | info["input_manager"] = "immediate"; |
| 371 | |
| 372 | return NodeConfig(info); |
| 373 | } |
| 374 | |
| 375 | void process_distributed_node(std::vector<bmf_engine::NodeConfig> &nodes) { |
| 376 | NodeConfig *upstream_node = nullptr; |
no test coverage detected