/** * This file is generated by jsonrpcstub, DO NOT CHANGE IT MANUALLY! */ #ifndef JSONRPC_CPP_STUB_ABSTRACTSTUBSERVER_H_ #define JSONRPC_CPP_STUB_ABSTRACTSTUBSERVER_H_ #include class AbstractStubServer : public jsonrpc::AbstractServer { public: AbstractStubServer(jsonrpc::AbstractServerConnector &conn, jsonrpc::serverVersion_t type = jsonrpc::JSONRPC_SERVER_V2) : jsonrpc::AbstractServer(conn, type) { this->bindAndAddMethod(jsonrpc::Procedure("load", jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_OBJECT, "hexLines",jsonrpc::JSON_STRING, NULL), &AbstractStubServer::loadI); this->bindAndAddMethod(jsonrpc::Procedure("status", jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_OBJECT, NULL), &AbstractStubServer::statusI); this->bindAndAddMethod(jsonrpc::Procedure("updatePinInput", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_OBJECT, NULL), &AbstractStubServer::updatePinInputI); this->bindAndAddMethod(jsonrpc::Procedure("setBkpt", jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_BOOLEAN, "addr",jsonrpc::JSON_INTEGER, NULL), &AbstractStubServer::setBkptI); this->bindAndAddMethod(jsonrpc::Procedure("clrBkpt", jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_BOOLEAN, NULL), &AbstractStubServer::clrBkptI); this->bindAndAddMethod(jsonrpc::Procedure("readReg", jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_INTEGER, "name",jsonrpc::JSON_STRING, NULL), &AbstractStubServer::readRegI); this->bindAndAddMethod(jsonrpc::Procedure("writeReg", jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_BOOLEAN, "name",jsonrpc::JSON_STRING,"value",jsonrpc::JSON_INTEGER, NULL), &AbstractStubServer::writeRegI); this->bindAndAddMethod(jsonrpc::Procedure("dumpReg", jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_ARRAY, NULL), &AbstractStubServer::dumpRegI); this->bindAndAddMethod(jsonrpc::Procedure("readIDATA", jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_ARRAY, "base",jsonrpc::JSON_INTEGER,"size",jsonrpc::JSON_INTEGER, NULL), &AbstractStubServer::readIDATAI); this->bindAndAddMethod(jsonrpc::Procedure("writeIDATA", jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_BOOLEAN, "base",jsonrpc::JSON_INTEGER,"buff",jsonrpc::JSON_ARRAY, NULL), &AbstractStubServer::writeIDATAI); this->bindAndAddMethod(jsonrpc::Procedure("readXDATA", jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_ARRAY, "base",jsonrpc::JSON_INTEGER,"size",jsonrpc::JSON_INTEGER, NULL), &AbstractStubServer::readXDATAI); this->bindAndAddMethod(jsonrpc::Procedure("writeXDATA", jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_BOOLEAN, "base",jsonrpc::JSON_INTEGER,"buff",jsonrpc::JSON_ARRAY, NULL), &AbstractStubServer::writeXDATAI); this->bindAndAddMethod(jsonrpc::Procedure("reset", jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_BOOLEAN, NULL), &AbstractStubServer::resetI); this->bindAndAddMethod(jsonrpc::Procedure("run", jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_BOOLEAN, NULL), &AbstractStubServer::runI); this->bindAndAddMethod(jsonrpc::Procedure("step", jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_BOOLEAN, NULL), &AbstractStubServer::stepI); this->bindAndAddMethod(jsonrpc::Procedure("pause", jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_BOOLEAN, NULL), &AbstractStubServer::pauseI); } inline virtual void loadI(const Json::Value &request, Json::Value &response) { response = this->load(request["hexLines"].asString()); } inline virtual void statusI(const Json::Value &request, Json::Value &response) { (void)request; response = this->status(); } inline virtual void updatePinInputI(const Json::Value &request, Json::Value &response) { response = this->updatePinInput(request[0u]); } inline virtual void setBkptI(const Json::Value &request, Json::Value &response) { response = this->setBkpt(request["addr"].asInt()); } inline virtual void clrBkptI(const Json::Value &request, Json::Value &response) { (void)request; response = this->clrBkpt(); } inline virtual void readRegI(const Json::Value &request, Json::Value &response) { response = this->readReg(request["name"].asString()); } inline virtual void writeRegI(const Json::Value &request, Json::Value &response) { response = this->writeReg(request["name"].asString(), request["value"].asInt()); } inline virtual void dumpRegI(const Json::Value &request, Json::Value &response) { (void)request; response = this->dumpReg(); } inline virtual void readIDATAI(const Json::Value &request, Json::Value &response) { response = this->readIDATA(request["base"].asInt(), request["size"].asInt()); } inline virtual void writeIDATAI(const Json::Value &request, Json::Value &response) { response = this->writeIDATA(request["base"].asInt(), request["buff"]); } inline virtual void readXDATAI(const Json::Value &request, Json::Value &response) { response = this->readXDATA(request["base"].asInt(), request["size"].asInt()); } inline virtual void writeXDATAI(const Json::Value &request, Json::Value &response) { response = this->writeXDATA(request["base"].asInt(), request["buff"]); } inline virtual void resetI(const Json::Value &request, Json::Value &response) { (void)request; response = this->reset(); } inline virtual void runI(const Json::Value &request, Json::Value &response) { (void)request; response = this->run(); } inline virtual void stepI(const Json::Value &request, Json::Value &response) { (void)request; response = this->step(); } inline virtual void pauseI(const Json::Value &request, Json::Value &response) { (void)request; response = this->pause(); } virtual Json::Value load(const std::string& hexLines) = 0; virtual Json::Value status() = 0; virtual bool updatePinInput(const Json::Value& param1) = 0; virtual bool setBkpt(int addr) = 0; virtual bool clrBkpt() = 0; virtual int readReg(const std::string& name) = 0; virtual bool writeReg(const std::string& name, int value) = 0; virtual Json::Value dumpReg() = 0; virtual Json::Value readIDATA(int base, int size) = 0; virtual bool writeIDATA(int base, const Json::Value& buff) = 0; virtual Json::Value readXDATA(int base, int size) = 0; virtual bool writeXDATA(int base, const Json::Value& buff) = 0; virtual bool reset() = 0; virtual bool run() = 0; virtual bool step() = 0; virtual bool pause() = 0; }; #endif //JSONRPC_CPP_STUB_ABSTRACTSTUBSERVER_H_