|
@ -6,30 +6,33 @@ |
|
|
#include <iostream> |
|
|
#include <iostream> |
|
|
#include <fstream> |
|
|
#include <fstream> |
|
|
#include <algorithm> |
|
|
#include <algorithm> |
|
|
|
|
|
#include <sstream> |
|
|
|
|
|
|
|
|
using namespace std; |
|
|
using namespace std; |
|
|
using namespace pEp::Adapter; |
|
|
using namespace pEp::Adapter; |
|
|
using namespace pEp::PityTest11; |
|
|
using namespace pEp::PityTest11; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void test_node1(const PityUnit<PityModel>& unit) { |
|
|
void test_node1(const PityUnit<PityModel>& unit) |
|
|
|
|
|
{ |
|
|
|
|
|
unit.log(unit.getModel()->getName()); |
|
|
|
|
|
unit.log(unit.getModel()->own_node->); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int main(int argc, char* argv[]) |
|
|
int main(int argc, char* argv[]) |
|
|
{ |
|
|
{ |
|
|
pEpLog::log("FSDFSD"); |
|
|
|
|
|
PityModel::debug_log_enabled = false; |
|
|
PityModel::debug_log_enabled = false; |
|
|
PityNode::debug_log_enabled = false; |
|
|
PityNode::debug_log_enabled = true; |
|
|
PityModel model{ "test_Model", 3 }; |
|
|
PityModel model{ "test_model", 3 }; |
|
|
|
|
|
|
|
|
for (PityNode n : model.getNodes()) { |
|
|
for (auto n : model.getNodes()) { |
|
|
pEpLog::log(n.to_string()); |
|
|
pEpLog::log(n->getName()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
auto node1_unit = model.getNodes().at(0).getProcessUnit(); |
|
|
PityUnit<PityModel> node1_test1 = PityUnit<PityModel>{ model.getNodeUnit(0), "test1", &test_node1 }; |
|
|
PityUnit<PityModel> node1_test1 = PityUnit<PityModel>{ node1_unit.get(), "test1", nullptr }; |
|
|
PityUnit<PityModel> node2_test1 = PityUnit<PityModel>{ model.getNodeUnit(1), "test2", &test_node1 }; |
|
|
// model.getPerspective(0);
|
|
|
PityUnit<PityModel> node3_test1 = PityUnit<PityModel>{ model.getNodeUnit(2), "test3", &test_node1 }; |
|
|
|
|
|
|
|
|
model.rootUnit().run(); |
|
|
model.rootUnit().run(); |
|
|
// pEpLog::log(model.rootUnit().to_string());
|
|
|
// pEpLog::log(model.rootUnit().to_string());
|
|
|