Public Member Functions | Private Member Functions | Private Attributes | List of all members
Aws::Lex::LexNode Class Reference

#include <lex_node.h>

Public Member Functions

ErrorCode Init (std::shared_ptr< PostContentInterface > lex_interactor)
 
 LexNode ()
 
 operator ros::NodeHandle & ()
 
 ~LexNode ()=default
 

Private Member Functions

bool LexServerCallback (lex_common_msgs::AudioTextConversationRequest &request, lex_common_msgs::AudioTextConversationResponse &response)
 

Private Attributes

ros::ServiceServer lex_server_
 
ros::NodeHandle node_handle_
 
std::shared_ptr< PostContentInterfacepost_content_
 

Detailed Description

LexNode is responsible for providing ROS API's and configuration for Amazon Lex. The lex node will work on each incoming message serially and respond with the lex info.

Todo:
decide how the lex node will handle multiple requests.

Definition at line 37 of file lex_node.h.

Constructor & Destructor Documentation

Aws::Lex::LexNode::LexNode ( )

Constructor.

Definition at line 51 of file lex_node.cpp.

Aws::Lex::LexNode::~LexNode ( )
default

Destructor.

Member Function Documentation

ErrorCode Aws::Lex::LexNode::Init ( std::shared_ptr< PostContentInterface lex_interactor)

Initialize the lex node.

Parameters
lex_interactorto use as the method to call lex.

Definition at line 53 of file lex_node.cpp.

bool Aws::Lex::LexNode::LexServerCallback ( lex_common_msgs::AudioTextConversationRequest &  request,
lex_common_msgs::AudioTextConversationResponse &  response 
)
private

Service callback for lex. Only allow one interaction with Lex at a time. If a new request comes in, fail the last request, then make a new request.

Parameters
requestto handle
responseto fill
Returns
true if the service request was successful

Definition at line 64 of file lex_node.cpp.

Aws::Lex::LexNode::operator ros::NodeHandle & ( )
inlineexplicit

Conversion function since in ROS2, this class will inherit from Node.

Returns
this functions node handle.

Definition at line 89 of file lex_node.h.

Member Data Documentation

ros::ServiceServer Aws::Lex::LexNode::lex_server_
private

The ros server for lex requests.

Definition at line 43 of file lex_node.h.

ros::NodeHandle Aws::Lex::LexNode::node_handle_
private

The ros node handle.

Definition at line 53 of file lex_node.h.

std::shared_ptr<PostContentInterface> Aws::Lex::LexNode::post_content_
private

Post content function.

Definition at line 48 of file lex_node.h.


The documentation for this class was generated from the following files:


lex_node
Author(s): AWS RoboMaker
autogenerated on Fri Mar 5 2021 03:13:38