46 throw std::runtime_error(e.what());
54 if (result_typeid != 0)
59 if (result_typeid == 0)
63 if (type != result_typeid)
97 throw std::runtime_error(
"RInsideClient cannot continue due to previous unrecoverable errors");
99 throw std::runtime_error(
"RInsideClient cannot send a command at this time");
110 throw std::runtime_error(std::string(
"Error in R Server: ") + error);
122 throw std::runtime_error(error);
RInsideClient(BinaryStream &stream)
const char RIS_CMD_GETCONSOLE
bool had_unrecoverable_error
const uint32_t RIS_MAGIC_NUMBER
void unrecoverable_error(const std::string &error)
const char RIS_CMD_INITPLOT
char readReply(bool accept_ok=true, bool accept_value=false)
const char RIS_REPLY_ERROR
const char RIS_CMD_GETPLOT
void write(const char *buffer, size_t len)
void initPlot(uint32_t width=800, uint32_t height=600)
const char RIS_REPLY_CALLBACK
const char RIS_REPLY_VALUE
std::map< uint32_t, std::function< void(void)> > callbacks
void writeCommand(char command)
std::string getConsoleOutput()
void runScript(const std::string code, int32_t result_typeid)
size_t read(char *buffer, size_t len)