git-svn-id: svn://db.shs.com.ru/libs@387 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -181,8 +181,13 @@ void CDCore::init(const PIString & configuration, bool pult) {
|
||||
}
|
||||
|
||||
|
||||
void CDCore::stop() {
|
||||
connection.stop();
|
||||
}
|
||||
|
||||
|
||||
void CDCore::startX(double freq) {
|
||||
piCout << "start x" << x_timer.isRunning() << freq;
|
||||
//piCout << "start x" << x_timer.isRunning() << freq;
|
||||
if (!x_timer.isRunning())
|
||||
x_timer.start(1000. / piMaxd(freq, 0.01));
|
||||
}
|
||||
@@ -194,7 +199,7 @@ void CDCore::stopX() {
|
||||
|
||||
|
||||
void CDCore::sendCommand(const CDType & c) {
|
||||
piCoutObj << "C_sendCommand" << c;
|
||||
//piCoutObj << "C_sendCommand" << c;
|
||||
PIByteArray sba = makeHeader(CD_Command, 0);
|
||||
sba << c.path();
|
||||
sendDirect(sba);
|
||||
@@ -204,7 +209,7 @@ void CDCore::sendCommand(const CDType & c) {
|
||||
void CDCore::registerCHandler(const CDType & c, PIObject * o, Handler h) {
|
||||
PIString sp = pathToString(c.path());
|
||||
if (sp.isEmpty() || !h) return;
|
||||
piCout << "register" << sp;
|
||||
//piCout << "register" << sp;
|
||||
c_handlers[sp] = OHPair(o, h);
|
||||
}
|
||||
|
||||
@@ -432,14 +437,14 @@ void CDCore::procReceivedPacket(PIByteArray & ba) {
|
||||
} break;
|
||||
case CD_XValues: {
|
||||
if (!x_pult_side) break;
|
||||
x_mutex.lock();
|
||||
PIVector<PIDeque<int> > x_vals;
|
||||
ba >> x_vals;
|
||||
x_mutex.lock();
|
||||
piForeachC (PIDeque<int> & p, x_vals) {
|
||||
x_[p].readX(ba);
|
||||
}
|
||||
X_ReceivedX(x_vals); /// WARNING! under mutex
|
||||
x_mutex.unlock();
|
||||
X_ReceivedX(x_vals);
|
||||
} break;
|
||||
case CD_CQuery:
|
||||
C_Send();
|
||||
|
||||
Reference in New Issue
Block a user