#include "Input.h" #include "Driver.h" #include #include #ifndef _MRPDI_CORE_ #define _MRPDI_CORE_ using namespace std; namespace net { namespace lliurex { namespace mrpdi { struct connected_device_info { unsigned int id; unsigned int address; unsigned char type; unsigned int status; string name; }; struct parameter_conf_entry { string driver_name; string parameter_name; unsigned int value; }; class Core { private: vector drivers; input::BaseInputHandler * inputhandler; void load_drivers(); public: static Core * instance; static Core * getCore(); Core(); ~Core(); void init(); void shutdown(); void set_input_handler(input::BaseInputHandler * handler); input::BaseInputHandler * get_input_handler(); void load_setup(vector*out_list); void update_devices(vector * out_list); void get_parameter_list(unsigned int id,vector * out_list); void start(unsigned int id,unsigned int address); void stop(unsigned int id,unsigned int address); void set_parameter(unsigned int id,const char * key,unsigned int value); int get_parameter(unsigned int id,const char * key,unsigned int * value); }; } } } #endif