PIIODevice registration dramatically optimization
This commit is contained in:
@@ -225,7 +225,7 @@ PIDiagnostics::Entry PIDiagnostics::calcHistory(PIQueue<Entry> & hist, int & cnt
|
||||
}
|
||||
|
||||
|
||||
void PIDiagnostics::propertyChanged(const PIString &) {
|
||||
void PIDiagnostics::propertyChanged(const char *) {
|
||||
float disct = property("disconnectTimeout").toFloat();
|
||||
changeDisconnectTimeout(disct);
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ private:
|
||||
|
||||
void tick(void *, int);
|
||||
Entry calcHistory(PIQueue<Entry> & hist, int & cnt);
|
||||
void propertyChanged(const PIString &);
|
||||
void propertyChanged(const char *);
|
||||
void changeDisconnectTimeout(float disct);
|
||||
|
||||
PIQueue<Entry> history_rec, history_send;
|
||||
|
||||
@@ -107,7 +107,7 @@ void PIPacketExtractor::construct() {
|
||||
}
|
||||
|
||||
|
||||
void PIPacketExtractor::propertyChanged(const PIString &) {
|
||||
void PIPacketExtractor::propertyChanged(const char *) {
|
||||
packetSize_ = property("packetSize").toInt();
|
||||
mode_ = (SplitMode)(property("splitMode").toInt());
|
||||
dataSize = property("payloadSize").toInt();
|
||||
|
||||
@@ -33,7 +33,7 @@ typedef bool (*PacketExtractorCheckFunc)(void * , uchar * , uchar * , int );
|
||||
|
||||
class PIP_EXPORT PIPacketExtractor: public PIIODevice
|
||||
{
|
||||
PIIODEVICE(PIPacketExtractor)
|
||||
PIIODEVICE(PIPacketExtractor, "pckext")
|
||||
friend class PIConnection;
|
||||
public:
|
||||
|
||||
@@ -161,11 +161,10 @@ protected:
|
||||
|
||||
private:
|
||||
void construct();
|
||||
void propertyChanged(const PIString & );
|
||||
void propertyChanged(const char *);
|
||||
int readDevice(void * read_to, int max_size) {if (dev == 0) return -1; return dev->read(read_to, max_size);}
|
||||
int writeDevice(const void * data, int max_size) {if (dev == 0) return -1; return dev->write(data, max_size);}
|
||||
bool threadedRead(uchar * readed, int size);
|
||||
PIString fullPathPrefix() const {return PIStringAscii("pckext");}
|
||||
PIString constructFullPathDevice() const;
|
||||
bool openDevice() {if (dev == 0) return false; return dev->open();}
|
||||
bool closeDevice() {if (dev == 0) return false; return dev->close();}
|
||||
|
||||
Reference in New Issue
Block a user