YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
ChatBot_nwc_yarp.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2023-2023 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef YARP_DEV_CHATBOT_NWC_YARP_H
7#define YARP_DEV_CHATBOT_NWC_YARP_H
8
9#include <yarp/os/Network.h>
11#include <yarp/dev/IChatBot.h>
12#include "IChatBotMsgs.h"
14
26{
27protected:
28 // thrift interface
30
31 // rpc port
33
34public:
35
36 //From DeviceDriver
37 bool open(yarp::os::Searchable& config) override;
38 bool close() override;
39
40 //From IChatBot
41 yarp::dev::ReturnValue interact(const std::string& messageIn, std::string& messageOut) override;
42 yarp::dev::ReturnValue setLanguage(const std::string& language) override;
43 yarp::dev::ReturnValue getLanguage(std::string& language) override;
44 yarp::dev::ReturnValue getStatus(std::string& status) override;
46};
47
48#endif // YARP_DEV_CHATBOT_NWC_YARP_H
This class is the parameters parser for class ChatBot_nwc_yarp.
chatBot_nwc_yarp: The client side of any IChatBot capable device.
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
Interface implemented by all device drivers.
IChatBot interface.
Definition IChatBot.h:26
A mini-server for network communication.
Definition Port.h:46
A base class for nested structures that can be searched.
Definition Searchable.h:31