git-svn-id: svn://db.shs.com.ru/libs@159 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -57,11 +57,11 @@ __Core_Initializer__::~__Core_Initializer__() {
|
||||
|
||||
CDCore::CDCore() {
|
||||
setName("CDCore");
|
||||
CONNECTU(&connection, dataReceivedEvent, this, dataReceived);
|
||||
PIString s(app_config);
|
||||
connection.configureFromString(&s);
|
||||
datatr.setPacketSize(960);
|
||||
connection.start();
|
||||
CONNECTU(&connection, dataReceivedEvent, this, dataReceived);
|
||||
/*PIString s(app_config);
|
||||
connection.configureFromString(&s);
|
||||
connection.start();*/
|
||||
k_.name = "__root__";
|
||||
k_.alias = "root";
|
||||
|
||||
@@ -78,7 +78,7 @@ CDCore::CDCore() {
|
||||
k_.section(11)[3] = KType(3, "1", "1", "88");
|
||||
k_.section(11)[4] = KType(4, "0", "0", "88");
|
||||
k_.section(11)[6] = KType(6, "0", "0", "88");*/
|
||||
//piCout << s;
|
||||
//piCout << s;
|
||||
}
|
||||
|
||||
|
||||
@@ -99,6 +99,8 @@ void CDCore::k_write(PIIODevice * d) {
|
||||
void CDCore::k_read(PIIODevice * d) {
|
||||
PIConfig conf(d, PIIODevice::ReadOnly);
|
||||
k_.read(&(conf.rootEntry()));
|
||||
k_.makePath();
|
||||
K_ChangedGlobal();
|
||||
PIVector<PIIODevice * > ds = connection.allDevices();
|
||||
// piForeach(PIIODevice * d, ds) {
|
||||
// if (d)
|
||||
@@ -109,6 +111,8 @@ void CDCore::k_read(PIIODevice * d) {
|
||||
|
||||
void CDCore::k_parse(PIIODevice * d) {
|
||||
k_ = CDParser::parse(d, CDType::cdK);
|
||||
k_.makePath();
|
||||
K_ChangedGlobal();
|
||||
k_.name = "__root__";
|
||||
k_.alias = "root";
|
||||
}
|
||||
@@ -126,15 +130,28 @@ void CDCore::k_update(PIIODevice * d) {
|
||||
uk.update(k_, kn);
|
||||
//piCout << k_.count() << uk.count();
|
||||
k_ = uk;
|
||||
k_.makePath();
|
||||
K_ChangedGlobal();
|
||||
}
|
||||
|
||||
|
||||
void CDCore::k_calculate() {
|
||||
k_.calculate();
|
||||
K_ChangedGlobal();
|
||||
}
|
||||
|
||||
|
||||
void CDCore::reinitConnection(const PIString & configuration) {
|
||||
void CDCore::initApp() {
|
||||
init(appConfig());
|
||||
}
|
||||
|
||||
|
||||
void CDCore::initPult() {
|
||||
init(pultConfig());
|
||||
}
|
||||
|
||||
|
||||
void CDCore::init(const PIString & configuration) {
|
||||
PIString c = configuration;
|
||||
connection.stop();
|
||||
connection.removeAllDevices();
|
||||
|
||||
Reference in New Issue
Block a user