memory.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2016 SoftBank Robotics Europe
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 
18 #ifndef MEMORY_HPP
19 #define MEMORY_HPP
20 
21 // NAOqi Headers
22 #include <qi/session.hpp>
23 
27 class Memory
28 {
29 public:
30  Memory(const qi::SessionPtr& session);
31 
33  void init(const std::vector <std::string> &joints_names);
34 
36  std::vector <std::string> initMemoryKeys(const std::vector <std::string> &joints);
37 
39  std::vector<float> getListData();
40 
42  std::vector<float> getListData(const std::vector <std::string> &keys);
43 
45  std::string getData(const std::string &str);
46 
48  void subscribeToMicroEvent(const std::string &name,
49  const std::string &callback_module,
50  const std::string &callback_method,
51  const std::string &callback_message);
52 
54  void unsubscribeFromMicroEvent(const std::string &name,
55  const std::string &callback_module);
56 
57 private:
59  qi::AnyObject memory_proxy_;
60 
62  std::vector <std::string> keys_positions_;
63 };
64 
65 #endif // MEMORY_HPP
qi::AnyObject memory_proxy_
Definition: memory.hpp:59
void unsubscribeFromMicroEvent(const std::string &name, const std::string &callback_module)
unsubscribe from a micro-event
Definition: memory.cpp:102
std::vector< float > getListData()
Get values of keys.
Definition: memory.cpp:51
std::string getData(const std::string &str)
get a key-value pair stored in memory
Definition: memory.cpp:73
void subscribeToMicroEvent(const std::string &name, const std::string &callback_module, const std::string &callback_method, const std::string &callback_message)
subscribe to a micro-event
Definition: memory.cpp:87
This class is a wapper for Naoqi Memory Class.
Definition: memory.hpp:27
std::vector< std::string > initMemoryKeys(const std::vector< std::string > &joints)
initialize memory keys to read
Definition: memory.cpp:41
void init(const std::vector< std::string > &joints_names)
initialize with joints names to control
Definition: memory.cpp:36
std::vector< std::string > keys_positions_
Definition: memory.hpp:62
Memory(const qi::SessionPtr &session)
Definition: memory.cpp:24


naoqi_dcm_driver
Author(s): Konstantinos Chatzilygeroudis , Mikael Arguedas , Karsten Knese , Natalia Lyubova
autogenerated on Thu Jul 25 2019 03:49:27