git-svn-id: svn://db.shs.com.ru/libs@383 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -11,6 +11,7 @@ XInterface::XInterface(): Interface(CDType::cdX) {
|
||||
CONNECTU(core, X_SendFail, this, sendFailed);
|
||||
CONNECTU(core, X_Received, this, received);
|
||||
CONNECTU(core, X_ReceiveFail, this, receiveFailed);
|
||||
CONNECTU(core, X_ReceivedX, this, receivedX);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,15 +26,39 @@ void XInterface::request() {
|
||||
|
||||
|
||||
void XInterface::setEnabled(const CDType & x, bool en) {
|
||||
CDType & t((*s)[x.path()]);
|
||||
if (t.cd_type() != CDType::cdX) return;
|
||||
core->x_mutex.lock();
|
||||
CDType & t((*s)[x.path()]);
|
||||
if (t.cd_type() != CDType::cdX) {
|
||||
core->x_mutex.unlock();
|
||||
return;
|
||||
}
|
||||
t.x_enabled = en;
|
||||
//piCout << t << "x_enabled" << en;
|
||||
core->need_rebuild_x = true;
|
||||
core->x_mutex.unlock();
|
||||
}
|
||||
|
||||
|
||||
PIVector<PIDeque<int> > XInterface::enabledList() const {
|
||||
return CDCore::instance()->x_selected;
|
||||
}
|
||||
|
||||
|
||||
void XInterface::lock() {
|
||||
CDCore::instance()->x_mutex.lock();
|
||||
}
|
||||
|
||||
|
||||
void XInterface::unlock() {
|
||||
CDCore::instance()->x_mutex.unlock();
|
||||
}
|
||||
|
||||
|
||||
void XInterface::start(double freq) {
|
||||
core->startX(freq);
|
||||
}
|
||||
|
||||
|
||||
void XInterface::stop() {
|
||||
core->stopX();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user