ContextClient Class Reference

Interacts with Context service.

#include <contextClient.h>

Inheritance diagram for ContextClient:

Public Member Functions

 ContextClient (std::string &ip, int dport, int sport)
 Constructor of the class. More...
 
 ~ContextClient ()
 Destructor of the class.
 
void getDevices (dpyContext::devices_list_handler_function handler)
 Get all context memory devices Ids. More...
 
void getMemoryValues (dpyContext::get_context_handler_function handler, std::string deviceid, unsigned int position, unsigned int length)
 Get context memory values. More...
 
void setMemoryValues (dpyContext::result_handler_function handler, std::string deviceid, unsigned int position, std::string data)
 Set context memory values. More...
 
void getMemoryType (dpyContext::memory_type_handler_function handler, std::string deviceid)
 Get context memory type. More...
 
void getContextSize (dpyContext::context_size_handler_function handler, std::string deviceid)
 Get context size. More...
 
void dumpContext (dpyContext::get_context_handler_function handler, std::string deviceid)
 Get all context memory data. More...
 
- Public Member Functions inherited from DpyMwClient
 DpyMwClient (std::string &ip, int dport, int sport)
 
void start ()
 
void stop ()
 
void subscribe (int messageType, boost::any handler)
 
void unsubscribe (int messageType)
 
bool isAlive ()
 
void monitorServiceAvailability_S (const f_hearbeat_handler &handler)
 
void monitorServiceAvailability_U ()
 

Additional Inherited Members

- Protected Member Functions inherited from DpyMwClient
void sendRequest (int requestType, int responseType, std::string content, boost::any handler, int ms_timeout=2000)
 
- Protected Attributes inherited from DpyMwClient
map_proto_register_client m_register_map
 
std::mutex m_map_mutex
 

Constructor & Destructor Documentation

ContextClient ( std::string &  ip,
int  dport,
int  sport 
)
Parameters
ipip of the service
dportdealer port
sportsubscriber port

Member Function Documentation

void dumpContext ( dpyContext::get_context_handler_function  handler,
std::string  deviceid 
)
Parameters
handlerHandler to be called when a response comes from the service
deviceidContext memory device Id
void getContextSize ( dpyContext::context_size_handler_function  handler,
std::string  deviceid 
)
Parameters
handlerHandler to be called when a response comes from the service
deviceidContext memory device Id
void getDevices ( dpyContext::devices_list_handler_function  handler)
Parameters
handlerHandler to be called when a response comes from the service
void getMemoryType ( dpyContext::memory_type_handler_function  handler,
std::string  deviceid 
)
Parameters
handlerHandler to be called when a response comes from the service
deviceidContext memory device Id
void getMemoryValues ( dpyContext::get_context_handler_function  handler,
std::string  deviceid,
unsigned int  position,
unsigned int  length 
)
Parameters
handlerHandler to be called when a response comes from the service
deviceidContext memory device Id
positionPosition inside context memory of the first value to get
lengthLength to read from context memory
void setMemoryValues ( dpyContext::result_handler_function  handler,
std::string  deviceid,
unsigned int  position,
std::string  data 
)
Parameters
handlerHandler to be called when a response comes from the service
deviceidContext memory device Id
positionPosition inside context memory of the first value to write
dataData to be written