#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< PostContentInterface > | post_content_ |
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.
Definition at line 37 of file lex_node.h.
Aws::Lex::LexNode::LexNode | ( | ) |
Constructor.
Definition at line 51 of file lex_node.cpp.
|
default |
Destructor.
ErrorCode Aws::Lex::LexNode::Init | ( | std::shared_ptr< PostContentInterface > | lex_interactor | ) |
Initialize the lex node.
lex_interactor | to use as the method to call lex. |
Definition at line 53 of file lex_node.cpp.
|
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.
request | to handle |
response | to fill |
Definition at line 64 of file lex_node.cpp.
|
inlineexplicit |
Conversion function since in ROS2, this class will inherit from Node.
Definition at line 89 of file lex_node.h.
|
private |
The ros server for lex requests.
Definition at line 43 of file lex_node.h.
|
private |
The ros node handle.
Definition at line 53 of file lex_node.h.
|
private |
Post content function.
Definition at line 48 of file lex_node.h.