24 yCError(CHATBOT_NWC_YARP) <<
"Cannot open rpc port, check network";
35 yCError(CHATBOT_NWC_YARP) <<
"open() error could not connect to" <<
m_remote;
41 yCError(CHATBOT_NWC_YARP) <<
"Cannot attach the m_thriftClientPort port as client";
45 yCDebug(CHATBOT_NWC_YARP) <<
"Opening of nwc successful";
60 yCError(CHATBOT_NWC_YARP) <<
"Could not interact with the chatbot";
73 yCError(CHATBOT_NWC_YARP) <<
"Could not set the chatbot language to" << language;
84 yCError(CHATBOT_NWC_YARP) <<
"Could not retrieve the currently set language";
87 language = output.language;
96 yCError(CHATBOT_NWC_YARP) <<
"Could not retrieve the current bot status";
99 status = output.status;
108 yCError(CHATBOT_NWC_YARP) <<
"Could not reset the chatbot";
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
yarp::dev::ReturnValue setLanguage(const std::string &language) override
Sets the chat bot language.
yarp::dev::ReturnValue getStatus(std::string &status) override
Gets the current status of the bot.
yarp::dev::ReturnValue getLanguage(std::string &language) override
Gets the current chatbot language.
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
IChatBotMsgs m_thriftClient
yarp::dev::ReturnValue interact(const std::string &messageIn, std::string &messageOut) override
Sends a message to the chatbot.
yarp::dev::ReturnValue resetBot() override
Resets the chatbot.
bool close() override
Close the DeviceDriver.
yarp::os::Port m_thriftClientPort
virtual yarp::dev::ReturnValue resetBotRPC()
virtual yarp::dev::ReturnValue setLanguageRPC(const std::string &language)
virtual return_getStatus getStatusRPC()
virtual return_interact interactRPC(const std::string &messageIn)
virtual return_getLanguage getLanguageRPC()
yarp::dev::ReturnValue result
yarp::dev::ReturnValue result
yarp::dev::ReturnValue result
static bool connect(const std::string &src, const std::string &dest, const std::string &carrier="", bool quiet=true)
Request that an output port connect to an input port.
void close() override
Stop port activity.
bool open(const std::string &name) override
Start port operation, with a specific name, with automatically-chosen network parameters.
A base class for nested structures that can be searched.
bool attachAsClient(yarp::os::UnbufferedContactable &port)
Tag this WireLink as a client, sending data via the specified port.
yarp::os::WireLink & yarp()
Get YARP state associated with this object.
#define yCError(component,...)
#define yCDebug(component,...)
#define YARP_LOG_COMPONENT(name,...)
For streams capable of holding different kinds of content, check what they actually have.