Skip to content

Commit

Permalink
chatBot_nwc_yarp updated
Browse files Browse the repository at this point in the history
  • Loading branch information
elandini84 committed Oct 20, 2023
1 parent a5295d3 commit 65ab1c9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/devices/chatBot_nwc_yarp/ChatBot_nwc_yarp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,18 @@ bool ChatBot_nwc_yarp::getLanguage(std::string& language)
return true;
}

bool ChatBot_nwc_yarp::getStatus(std::string& status)
{
return_getStatus output = m_thriftClient.getStatusRPC();
if(!output.result)
{
yCError(CHATBOT_NWC_YARP) << "Could not retrieve the current bot status";
return false;
}
status = output.status;
return true;
}

bool ChatBot_nwc_yarp::resetBot()
{
if(!m_thriftClient.resetBotRPC())
Expand Down
1 change: 1 addition & 0 deletions src/devices/chatBot_nwc_yarp/ChatBot_nwc_yarp.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class ChatBot_nwc_yarp : public yarp::dev::DeviceDriver,
bool interact(const std::string& messageIn, std::string& messageOut) override;
bool setLanguage(const std::string& language) override;
bool getLanguage(std::string& language) override;
bool getStatus(std::string& status) override;
bool resetBot() override;
};

Expand Down

0 comments on commit 65ab1c9

Please sign in to comment.