git-svn-id: svn://db.shs.com.ru/libs@383 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2018-05-23 12:18:47 +00:00
parent 1f81d2dadd
commit e76a5fde23
16 changed files with 276 additions and 89 deletions

View File

@@ -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();
}