git-svn-id: svn://db.shs.com.ru/libs@243 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -62,8 +62,7 @@ CDCore::CDCore() {
|
||||
/*PIString s(app_config);
|
||||
connection.configureFromString(&s);
|
||||
connection.start();*/
|
||||
k_.name = "__root__";
|
||||
k_.alias = "root";
|
||||
initRoot(k_);
|
||||
|
||||
CONNECTU(&datatr, sendRequest, this, dtSendRequest)
|
||||
CONNECTU(&datatr, receiveFinished, this, dtReceiveFinished)
|
||||
@@ -99,22 +98,20 @@ void CDCore::k_write(PIIODevice * d) {
|
||||
void CDCore::k_read(PIIODevice * d) {
|
||||
PIConfig conf(d, PIIODevice::ReadOnly);
|
||||
k_.read(&(conf.rootEntry()));
|
||||
k_.makePath();
|
||||
initRoot(k_);
|
||||
K_ChangedGlobal();
|
||||
PIVector<PIIODevice * > ds = connection.allDevices();
|
||||
// piForeach(PIIODevice * d, ds) {
|
||||
// if (d)
|
||||
// piCoutObj << d->constructFullPath() << d->isOpened();
|
||||
// }
|
||||
/*PIVector<PIIODevice * > ds = connection.allDevices();
|
||||
piForeach(PIIODevice * d, ds) {
|
||||
if (d)
|
||||
piCoutObj << d->constructFullPath() << d->isOpened();
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
void CDCore::k_parse(PIIODevice * d) {
|
||||
k_ = CDParser::parse(d, CDType::cdK);
|
||||
k_.makePath();
|
||||
initRoot(k_);
|
||||
K_ChangedGlobal();
|
||||
k_.name = "__root__";
|
||||
k_.alias = "root";
|
||||
}
|
||||
|
||||
|
||||
@@ -130,8 +127,7 @@ void CDCore::k_update(PIIODevice * d, UpdateModeFlags mode) {
|
||||
uk.update(k_, mode);
|
||||
//piCout << k_.count() << uk.count();
|
||||
k_ = uk;
|
||||
k_.makePath();
|
||||
k_.calculate();
|
||||
initRoot(k_);
|
||||
K_ChangedGlobal();
|
||||
}
|
||||
|
||||
@@ -261,6 +257,14 @@ void CDCore::xTimerTick() {
|
||||
}
|
||||
|
||||
|
||||
void CDCore::initRoot(CDSection & r) {
|
||||
r.name = "__root__";
|
||||
r.alias = "root";
|
||||
r.makePath();
|
||||
r.calculate();
|
||||
}
|
||||
|
||||
|
||||
void CDCore::dtSendRequest(PIByteArray &data) {
|
||||
connection.writeByName("cd", data);
|
||||
// piCoutObj << "send" << data.size() << ret;
|
||||
|
||||
Reference in New Issue
Block a user