ErrorCode LexNode::Init()

in lex_node/src/lex_node.cpp [70:82]


ErrorCode LexNode::Init(std::shared_ptr<PostContentInterface> post_content)
{
  if (!post_content) {
    return INVALID_ARGUMENT;
  }
  RCLCPP_DEBUG(this->get_logger(), "Initialized Lex Node");
  post_content_ = std::move(post_content);
  using namespace std::placeholders;
  auto service_func = std::bind(&LexNode::LexServerCallback, this, _1, _2, _3);
  lex_server_ = this->create_service<AudioTextConversation>("lex_conversation",
      service_func);
  return SUCCESS;
}