Compare commits
1 Commits
b6898b96f7
...
0c36565aec
| Author | SHA1 | Date | |
|---|---|---|---|
| 0c36565aec |
@@ -58,6 +58,7 @@ CDCore::CDCore() {
|
||||
setName("CDCore");
|
||||
x_timer.setName("_S.CDCore.x_timer");
|
||||
datatr.setPacketSize(960);
|
||||
cout_buffer_id = PICout::registerExternalBufferID();
|
||||
CONNECTU(&connection, dataReceivedEvent, this, dataReceived);
|
||||
CONNECTU(PICout::Notifier::object(), finished, this, piCoutFinished);
|
||||
/*PIString s(app_config);
|
||||
@@ -387,7 +388,7 @@ void CDCore::xTimerTick() {
|
||||
|
||||
|
||||
void CDCore::piCoutFinished(int id, PIString * buffer) {
|
||||
if (!buffer || !(id == 1)) return;
|
||||
if ((id != cout_buffer_id) || !buffer) return;
|
||||
PIString sp = buffer->takeRange('[', ']');
|
||||
PIDeque<int> p = CDCore::stringToPath(sp);
|
||||
sendMessage(m_[p], Log, *buffer);
|
||||
|
||||
@@ -48,6 +48,7 @@ class CD_CORE_EXPORT CDCore: public PIObject {
|
||||
friend class CDSection;
|
||||
friend class Interface;
|
||||
friend class XInterface;
|
||||
friend class MInterface;
|
||||
|
||||
public:
|
||||
static CDCore * instance();
|
||||
@@ -111,6 +112,7 @@ public:
|
||||
private:
|
||||
CDCore();
|
||||
~CDCore();
|
||||
|
||||
EVENT_HANDLER2(void, dataReceived, const PIString &, from, const PIByteArray &, data);
|
||||
EVENT_HANDLER1(void, dtSendRequest, PIByteArray &, data);
|
||||
EVENT_HANDLER1(void, dtReceiveFinished, bool, ok);
|
||||
@@ -136,6 +138,7 @@ private:
|
||||
PIMutex x_mutex;
|
||||
PIVector<PIDeque<int>> x_selected;
|
||||
PIMap<PIString, OHPair> c_handlers;
|
||||
int cout_buffer_id = 0;
|
||||
bool need_rebuild_x, x_pult_side;
|
||||
};
|
||||
|
||||
|
||||
@@ -19,5 +19,5 @@ void MInterface::messageBox(const CDType & m, const PIString & msg) {
|
||||
|
||||
PICout MInterface::createPICout(const CDType & m) const {
|
||||
PIString * buff = new PIString("[" + CDCore::pathToString(m.path()) + "]");
|
||||
return PICout::withExternalBuffer(buff, 1);
|
||||
return PICout::withExternalBuffer(buff, core->cout_buffer_id);
|
||||
}
|
||||
|
||||
@@ -34,6 +34,12 @@ class CDItemModel;
|
||||
namespace CDUtils {
|
||||
|
||||
class CDSection;
|
||||
class CDCore;
|
||||
class Interface;
|
||||
class KInterface;
|
||||
class XInterface;
|
||||
class CInterface;
|
||||
class MInterface;
|
||||
|
||||
enum UpdateMode {
|
||||
SaveByIndex = 0x01,
|
||||
|
||||
Reference in New Issue
Block a user