Commit 9f095289 authored by BERTHAUT Florent's avatar BERTHAUT Florent
Browse files

Added subscribe method

parent 83b02b0e
......@@ -6,6 +6,7 @@ void Gdpd::_register_methods() {
register_method("init", &Gdpd::init);
register_method("openfile", &Gdpd::openfile);
register_method("closefile", &Gdpd::closefile);
register_method("subscribe", &Gdpd::subscribe);
register_method("has_message", &Gdpd::has_message);
register_method("get_next", &Gdpd::get_next);
register_method("start_message", &Gdpd::start_message);
......@@ -124,6 +125,12 @@ void Gdpd::closefile() {
m_pd.closePatch(m_patch);
}
void Gdpd::subscribe(String symbStr) {
std::wstring symbWs = symbStr.unicode_str();
std::string symbS(symbWs.begin(), symbWs.end());
m_pd.subscribe(symbS.c_str());
}
bool Gdpd::has_message() {
//receive new messages
m_pd.receiveMessages();
......
......@@ -44,6 +44,7 @@ public:
bool has_message();
Array get_next();
int blocksize();
void subscribe(String symbStr);
int start_message(int nbValues);
void add_symbol(String symbStr);
void add_float(float val);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment