contextClient.h
Go to the documentation of this file.
1 
5 #pragma once
6 #include "../../../../LIBRARIES/MIDDLEWARE/src/com/dpyMwClient.h"
7 #include "contextApi.h"
8 
14 {
15 private:
16  /*
17  * @brief Method to register callbacks with lambda functions
18  */
19  void RegisterCallbacks();
20 public:
27  ContextClient(std::string& ip, int dport, int sport);
28 
33 
39 
47  void getMemoryValues(dpyContext::get_context_handler_function handler, std::string deviceid, unsigned int position, unsigned int length);
48 
56  void setMemoryValues(dpyContext::result_handler_function handler, std::string deviceid, unsigned int position, std::string data);
57 
63  void getMemoryType(dpyContext::memory_type_handler_function handler, std::string deviceid);
64 
70  void getContextSize(dpyContext::context_size_handler_function handler, std::string deviceid);
71 
77  void dumpContext(dpyContext::get_context_handler_function handler, std::string deviceid);
78 };
boost::function< void(boost::system::error_code, unsigned int contextSize)> context_size_handler_function
Prototype of the handler function for getting context memory size.
Definition: contextApi.h:49
void getDevices(dpyContext::devices_list_handler_function handler)
Get all context memory devices Ids.
boost::function< void(boost::system::error_code, std::string memoryType)> memory_type_handler_function
Prototype of the handler function for getting context memory type.
Definition: contextApi.h:42
boost::function< void(boost::system::error_code, std::list< std::string > devices)> devices_list_handler_function
Prototype of the handler function for getting available context devices.
Definition: contextApi.h:35
ContextClient(std::string &ip, int dport, int sport)
Constructor of the class.
boost::function< void(boost::system::error_code, std::string data)> get_context_handler_function
Prototype of the handler function for getting context memory content.
Definition: contextApi.h:56
void dumpContext(dpyContext::get_context_handler_function handler, std::string deviceid)
Get all context memory data.
Interacts with Context service.
Definition: contextClient.h:13
void getMemoryType(dpyContext::memory_type_handler_function handler, std::string deviceid)
Get context memory type.
void getMemoryValues(dpyContext::get_context_handler_function handler, std::string deviceid, unsigned int position, unsigned int length)
Get context memory values.
Manages dealer and susbriber.
Definition: dpyMwClient.h:59
void getContextSize(dpyContext::context_size_handler_function handler, std::string deviceid)
Get context size.
void setMemoryValues(dpyContext::result_handler_function handler, std::string deviceid, unsigned int position, std::string data)
Set context memory values.
boost::function< void(boost::system::error_code error_code)> result_handler_function
Prototype of the handler function for obtaining a result.
Definition: contextApi.h:28
~ContextClient()
Destructor of the class.