Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+8
-8
@@ -45,10 +45,10 @@ bool Socket::sendData(const QByteArray &data)
|
||||
{
|
||||
if (!isConnected())
|
||||
{
|
||||
WARNING_LOG() << "BSM " << m_config.id << ": Trying to send data but not connected!";
|
||||
WARNING_LOG(m_logger) << "BSM " << m_config.id << ": Trying to send data but not connected!";
|
||||
return false;
|
||||
}
|
||||
DEBUG_LOG() << "BSM " << m_config.id << ": sending data: 0x" << data.toHex();
|
||||
DEBUG_LOG(m_logger) << "BSM " << m_config.id << ": sending data: 0x" << data.toHex();
|
||||
m_tcpSocket->write(data);
|
||||
m_tcpSocket->flush();
|
||||
return true;
|
||||
@@ -57,7 +57,7 @@ bool Socket::sendData(const QByteArray &data)
|
||||
void Socket::setVersionInformation(int verMajor, int verMinor, int verRev, const QString &manufacturer)
|
||||
{
|
||||
m_versionInfo = QStringLiteral("%1.%2-%3 (%4)").arg(verMajor).arg(verMinor).arg(verRev).arg(manufacturer);
|
||||
INFO_LOG() << "BSM " << m_config.id
|
||||
INFO_LOG(m_logger) << "BSM " << m_config.id
|
||||
<< ": version = " << m_versionInfo;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ void Socket::gotAlive()
|
||||
|
||||
void Socket::onConnected()
|
||||
{
|
||||
INFO_LOG() << "BSM " << m_config.id << " is connected to "
|
||||
INFO_LOG(m_logger) << "BSM " << m_config.id << " is connected to "
|
||||
<< m_tcpSocket->peerAddress().toString() << ":" << m_tcpSocket->peerPort();
|
||||
Telegrams::PanConfigurationSetup tele;
|
||||
tele.m_aliveMessage = s_aliveTimeout;
|
||||
@@ -83,7 +83,7 @@ void Socket::onConnected()
|
||||
|
||||
void Socket::onDisconnected()
|
||||
{
|
||||
INFO_LOG() << "BSM " << m_config.id << " is disconnected";
|
||||
INFO_LOG(m_logger) << "BSM " << m_config.id << " is disconnected";
|
||||
m_versionInfo.clear();
|
||||
startReconnectTimer();
|
||||
emit disconnected(m_config.id);
|
||||
@@ -91,7 +91,7 @@ void Socket::onDisconnected()
|
||||
|
||||
void Socket::onError(QAbstractSocket::SocketError error)
|
||||
{
|
||||
DEBUG_LOG() << "BSM " << m_config.id
|
||||
DEBUG_LOG(m_logger) << "BSM " << m_config.id
|
||||
<< " can not connect to " << m_config.hostname << ":" << m_config.port
|
||||
<< ": " << m_tcpSocket->errorString()
|
||||
<< " (" << error << ");";
|
||||
@@ -100,7 +100,7 @@ void Socket::onError(QAbstractSocket::SocketError error)
|
||||
|
||||
void Socket::onConnect()
|
||||
{
|
||||
DEBUG_LOG() << "BSM " << m_config.id
|
||||
DEBUG_LOG(m_logger) << "BSM " << m_config.id
|
||||
<< " trying to connect to " << m_config.hostname << ":" << m_config.port;
|
||||
m_tcpSocket->connectToHost(m_config.hostname, m_config.port);
|
||||
}
|
||||
@@ -112,7 +112,7 @@ void Socket::onReadyRead()
|
||||
|
||||
void Socket::onAliveTimeout()
|
||||
{
|
||||
WARNING_LOG() << "BSM " << m_config.id
|
||||
WARNING_LOG(m_logger) << "BSM " << m_config.id
|
||||
<< " alive timeout! Reconnecting";
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user