Rev 674 | Rev 715 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 674 | Rev 711 | ||
---|---|---|---|
Line 79... | Line 79... | ||
79 | 79 | ||
80 | QByteArray Temp; |
80 | QByteArray Temp; |
Line 81... | Line 81... | ||
81 | Temp = QByteArray(t_Data.toAscii()); |
81 | Temp = QByteArray(t_Data.toAscii()); |
- | 82 | ||
Line 82... | Line 83... | ||
82 | 83 | TCP_Socket->write(Temp); |
|
83 | TCP_Socket->write(Temp); |
84 | TCP_Socket->flush(); |
84 | 85 | ||
Line 136... | Line 137... | ||
136 | // emit sig_Disconnected(1); |
137 | // emit sig_Disconnected(1); |
137 | } |
138 | } |
Line 138... | Line 139... | ||
138 | 139 | ||
139 | void Input_TCP::slot_TCP_ReadLine() |
140 | void Input_TCP::slot_TCP_ReadLine() |
140 | { |
- | |
141 | // if (TCP_Socket->canReadLine()) |
- | |
142 | { |
141 | { |
143 | QString t_Data = QString(TCP_Socket->readLine(TCP_Socket->bytesAvailable())).remove(QChar('\n')); |
- | |
144 | - | ||
145 | if ((t_Data.length() > 3) && (t_Data[t_Data.length() - 1] == '\r')) |
- | |
146 | { |
142 | // QString t_Data = QString(TCP_Socket->readLine(TCP_Socket->bytesAvailable())).remove(QChar('\n')); |
147 | emit(sig_NewData(t_Data)); |
- | |
148 | } |
- | |
Line -... | Line 143... | ||
- | 143 | QString t_Data = QString(TCP_Socket->readAll()); |
|
- | 144 | ||
Line 149... | Line -... | ||
149 | } |
- | |
150 | - | ||
151 | 145 | QStringList l_Data; |
|
152 | /* int Len = Input.length(); |
146 | l_Data = t_Data.split('\n'); |
153 | - | ||
154 | for (int z = 0; z < Len; z++) |
147 | |
155 | { |
- | |
156 | if (Input[z] == '\r') |
148 | for (int z = 0; z < l_Data.count(); z++) |
157 | { |
- | |
158 | new_Data(QString("")); |
- | |
159 | RxData.String = QString(""); |
149 | { |
160 | } |
150 | |
- | 151 | if ((l_Data[z].length() > 3) && (t_Data[l_Data[z].length() - 1] == '\r')) |
|
161 | else |
152 | { |
162 | { |
153 | emit(sig_NewData(l_Data[z])); |
163 | RxData.String = RxData.String + Input[z]; |
- | |
164 | } |
154 | // qDebug(QString("DATA: _" + l_Data[z] + "_ < END").toLatin1().data()); |
Line 165... | Line 155... | ||
165 | } |
155 | } |
166 | */ |
156 | } |
167 | } |
157 | } |