mirror of
https://github.com/micro-ROS/micro-ROS-Agent.git
synced 2026-09-06 09:55:15 +02:00
Create graph manager after checking passed CLI arguments and launch xrce-dds server (#41)
This commit is contained in:
@@ -22,8 +22,19 @@ namespace agent {
|
|||||||
|
|
||||||
Agent::Agent()
|
Agent::Agent()
|
||||||
: xrce_dds_agent_instance_(xrce_dds_agent_instance_.getInstance())
|
: xrce_dds_agent_instance_(xrce_dds_agent_instance_.getInstance())
|
||||||
, graph_manager_(std::make_unique<graph_manager::GraphManager>())
|
, graph_manager_(nullptr)
|
||||||
{
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Agent::create(
|
||||||
|
int argc,
|
||||||
|
char** argv)
|
||||||
|
{
|
||||||
|
bool result = xrce_dds_agent_instance_.create(argc, argv);
|
||||||
|
if (result)
|
||||||
|
{
|
||||||
|
graph_manager_.reset(new graph_manager::GraphManager());
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add CREATE_PARTICIPANT callback.
|
* Add CREATE_PARTICIPANT callback.
|
||||||
*/
|
*/
|
||||||
@@ -149,11 +160,7 @@ Agent::Agent()
|
|||||||
std::move(on_delete_datareader));
|
std::move(on_delete_datareader));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Agent::create(
|
return result;
|
||||||
int argc,
|
|
||||||
char** argv)
|
|
||||||
{
|
|
||||||
return xrce_dds_agent_instance_.create(argc, argv);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Agent::run()
|
void Agent::run()
|
||||||
|
|||||||
Reference in New Issue
Block a user