ContextManager Class Reference

Public Member Functions

 ContextManager (std::string ip="127.0.0.1")
 
bool isAlive ()
 Method to check if Context Service is alive. More...
 
void asyncGetDevices (dpyContext::devices_list_handler_function handler)
 Get all context memory devices Ids. More...
 
void asyncGetMemoryValues (dpyContext::get_context_handler_function handler, std::string deviceid, unsigned int position, unsigned int length)
 Get context memory values. More...
 
void asyncSetMemoryValues (dpyContext::result_handler_function handler, std::string deviceid, unsigned int position, const std::string &data)
 Set context memory values. More...
 
void asyncGetMemoryType (dpyContext::memory_type_handler_function handler, std::string deviceid)
 Get context memory type. More...
 
void asyncGetContextSize (dpyContext::context_size_handler_function handler, std::string deviceid)
 Get context size. More...
 
void asyncDumpContext (dpyContext::get_context_handler_function handler, std::string deviceid)
 Get all context memory data. More...
 

Member Function Documentation

void asyncDumpContext ( 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 asyncGetContextSize ( 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 asyncGetDevices ( dpyContext::devices_list_handler_function  handler)
Parameters
handlerHandler to be called when a response comes from the service
void asyncGetMemoryType ( 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 asyncGetMemoryValues ( 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 asyncSetMemoryValues ( dpyContext::result_handler_function  handler,
std::string  deviceid,
unsigned int  position,
const 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
bool isAlive ( )
Returns
Boolean indicating if Context is alive