YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
FakeChatBotDevice.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 FAKE_CHATBOTDEVICE_H
7#define FAKE_CHATBOTDEVICE_H
8
9#include <yarp/dev/IChatBot.h>
10#include <vector>
12#include <map>
14
26{
27
28public:
30 yarp::dev::ReturnValue interact(const std::string& messageIn, std::string& messageOut) override;
31 yarp::dev::ReturnValue setLanguage(const std::string& language) override;
32 yarp::dev::ReturnValue getLanguage(std::string& language) override;
33 yarp::dev::ReturnValue getStatus(std::string& status) override;
35
36 bool open(yarp::os::Searchable& config) override;
37 bool close() override;
38
39private:
40 std::string m_currBot;
41 std::string m_fallback;
42 std::string m_noInput;
43 std::string m_status;
44 std::map<std::string, std::map<std::string,std::string>> m_qAndA;
45};
46
47#endif // FAKE_CHATBOTDEVICE_H
This class is the parameters parser for class FakeChatBotDevice.
fakeChatBotDevice : a fake device which implements the IChatBot interface for testing purposes.
yarp::dev::ReturnValue getStatus(std::string &status) override
Gets the current status of the bot.
bool close() override
Close the DeviceDriver.
yarp::dev::ReturnValue getLanguage(std::string &language) override
Gets the current chatbot language.
yarp::dev::ReturnValue interact(const std::string &messageIn, std::string &messageOut) override
Sends a message to the chatbot.
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
yarp::dev::ReturnValue setLanguage(const std::string &language) override
Sets the chat bot language.
yarp::dev::ReturnValue resetBot() override
Resets the chatbot.
Interface implemented by all device drivers.
IChatBot interface.
Definition IChatBot.h:26
A base class for nested structures that can be searched.
Definition Searchable.h:31