SMACC
Loading...
Searching...
No Matches
smacc_client_library
keyboard_client
src
keyboard_client
cl_keyboard.cpp
Go to the documentation of this file.
1
#include <
keyboard_client/cl_keyboard.h
>
2
3
namespace
cl_keyboard
{
4
ClKeyboard::ClKeyboard
() {
5
initialized_
=
false
;
6
topicName
=
"/keyboard_unicode"
;
7
}
8
9
ClKeyboard::~ClKeyboard
()
10
{
11
12
}
13
14
void
ClKeyboard::initialize
() {
15
16
SmaccSubscriberClient<std_msgs::UInt16>::initialize();
17
18
if
(!this->
initialized_
) {
19
this->
onMessageReceived
(&
ClKeyboard::onKeyboardMessage
,
this
);
20
this->
initialized_
=
true
;
21
}
22
}
23
24
void
ClKeyboard::onKeyboardMessage
(
const
std_msgs::UInt16 &unicode_keychar) {
25
26
postEventKeyPress
(unicode_keychar);
27
}
28
}
// namespace cl_keyboard
cl_keyboard.h
cl_keyboard::ClKeyboard::initialized_
bool initialized_
Definition:
cl_keyboard.h:244
cl_keyboard::ClKeyboard::ClKeyboard
ClKeyboard()
Definition:
cl_keyboard.cpp:4
cl_keyboard::ClKeyboard::postEventKeyPress
std::function< void(std_msgs::UInt16)> postEventKeyPress
Definition:
cl_keyboard.h:166
cl_keyboard::ClKeyboard::~ClKeyboard
virtual ~ClKeyboard()
Definition:
cl_keyboard.cpp:9
cl_keyboard::ClKeyboard::initialize
virtual void initialize() override
Definition:
cl_keyboard.cpp:14
cl_keyboard::ClKeyboard::onKeyboardMessage
void onKeyboardMessage(const std_msgs::UInt16 &unicode_keychar)
Definition:
cl_keyboard.cpp:24
smacc::client_bases::SmaccSubscriberClient< std_msgs::UInt16 >::onMessageReceived
boost::signals2::connection onMessageReceived(void(T::*callback)(const std_msgs::UInt16 &), T *object)
Definition:
smacc_subscriber_client.h:52
smacc::client_bases::SmaccSubscriberClient< std_msgs::UInt16 >::topicName
boost::optional< std::string > topicName
Definition:
smacc_subscriber_client.h:25
cl_keyboard
Definition:
cl_keyboard.h:14
Generated by
1.9.5