Added subscribe method
This commit is contained in:
parent
83b02b0ec0
commit
9f09528910
2 changed files with 8 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue