diff --git a/src/comm/LinkInterface.h b/src/comm/LinkInterface.h index 3335677522895aa2cf1a03972cf8903a09738531..8f691ccec73889054630523f72d9a64b3d4f6d3b 100644 --- a/src/comm/LinkInterface.h +++ b/src/comm/LinkInterface.h @@ -147,13 +147,6 @@ public: **/ virtual bool disconnect() = 0; - /** - * @brief Get the current number of bytes in buffer. - * - * @return The number of bytes ready to read - **/ - virtual qint64 bytesAvailable() = 0; - public slots: /** diff --git a/src/comm/MAVLinkSimulationLink.cc b/src/comm/MAVLinkSimulationLink.cc index de09f956f4177850a817e2df1e5fc9dd70eb58fb..ce9eb79b07a95a5ec4c6a3676d6345a64c8e4b18 100644 --- a/src/comm/MAVLinkSimulationLink.cc +++ b/src/comm/MAVLinkSimulationLink.cc @@ -632,14 +632,6 @@ void MAVLinkSimulationLink::mainloop() } -qint64 MAVLinkSimulationLink::bytesAvailable() -{ - readyBufferMutex.lock(); - qint64 size = readyBuffer.size(); - readyBufferMutex.unlock(); - return size; -} - void MAVLinkSimulationLink::writeBytes(const char* data, qint64 size) { // Parse bytes diff --git a/src/comm/MAVLinkSimulationLink.h b/src/comm/MAVLinkSimulationLink.h index 912c5201d4551c679c1dbf6d195b5c3c54cc3426..b360d37df8a40c4dba262c6a9e72ddc77a3fbc1e 100644 --- a/src/comm/MAVLinkSimulationLink.h +++ b/src/comm/MAVLinkSimulationLink.h @@ -51,7 +51,6 @@ public: MAVLinkSimulationLink(QString readFile="", QString writeFile="", int rate=5); ~MAVLinkSimulationLink(); bool isConnected() const; - qint64 bytesAvailable(); void run(); void requestReset() { } diff --git a/src/comm/OpalLink.cc b/src/comm/OpalLink.cc index 9850feefe44d08dd678b83adafab41d0a3167cae..7a1d5ed7ea0538fe6fddbeb9c361a657c6d75895 100644 --- a/src/comm/OpalLink.cc +++ b/src/comm/OpalLink.cc @@ -58,18 +58,6 @@ OpalLink::OpalLink() : QObject::connect(getSignalsTimer, SIGNAL(timeout()), this, SLOT(getSignals())); } - -/* - * - Communication - * - */ - -qint64 OpalLink::bytesAvailable() -{ - return 0; -} - void OpalLink::writeBytes(const char *bytes, qint64 length) { /* decode the message */ diff --git a/src/comm/OpalLink.h b/src/comm/OpalLink.h index e9edbdb2a1c93eeb121ad9fe1e43792acce82221..f658c8f0e080c885c02073bfe041915ff3958b4b 100644 --- a/src/comm/OpalLink.h +++ b/src/comm/OpalLink.h @@ -83,8 +83,6 @@ public: bool disconnect(); - qint64 bytesAvailable(); - void run(); int getOpalInstID() { diff --git a/src/comm/SerialLink.cc b/src/comm/SerialLink.cc index 96f70c4c9024e0863e126f8a73213df590623727..957079eeacc7a9ac9ba50b07dc4f99796829f21a 100644 --- a/src/comm/SerialLink.cc +++ b/src/comm/SerialLink.cc @@ -390,21 +390,6 @@ void SerialLink::readBytes() } } - -/** - * @brief Get the number of bytes to read. - * - * @return The number of bytes to read - **/ -qint64 SerialLink::bytesAvailable() -{ - if (m_port) { - return m_port->bytesAvailable(); - } else { - return 0; - } -} - /** * @brief Disconnect the connection. * diff --git a/src/comm/SerialLink.h b/src/comm/SerialLink.h index 75632632a57a002eee92a2e26920b4322e9fc47d..84adde2fafe271a5f56203cb55753e2f65a74d9a 100644 --- a/src/comm/SerialLink.h +++ b/src/comm/SerialLink.h @@ -78,7 +78,6 @@ public: void requestReset(); bool isConnected() const; - qint64 bytesAvailable(); /** * @brief The port handle diff --git a/src/comm/TCPLink.cc b/src/comm/TCPLink.cc index 51c222348af279a6c08be4f32b86a1f50bf59d9e..a09a90d73f1d15a10d56c60b1b60e00afea96aa3 100644 --- a/src/comm/TCPLink.cc +++ b/src/comm/TCPLink.cc @@ -176,16 +176,6 @@ void TCPLink::readBytes() } } -/** - * @brief Get the number of bytes to read. - * - * @return The number of bytes to read - **/ -qint64 TCPLink::bytesAvailable() -{ - return _socket->bytesAvailable(); -} - /** * @brief Disconnect the connection. * diff --git a/src/comm/TCPLink.h b/src/comm/TCPLink.h index f97db7fbe977ad8ed81befd1ddb06d1a482355e1..c78922f749ed001c4e9c3360c3160fafaaab6169 100644 --- a/src/comm/TCPLink.h +++ b/src/comm/TCPLink.h @@ -67,7 +67,6 @@ public: virtual bool isConnected(void) const; virtual bool connect(void); virtual bool disconnect(void); - virtual qint64 bytesAvailable(void); virtual void requestReset(void) {}; // Extensive statistics for scientific purposes diff --git a/src/comm/UDPLink.cc b/src/comm/UDPLink.cc index ecf6fb90c536eb4c15527b8f67e50dd8caccaa11..57f6859e58d59eaaab265f35cddd99f81a2285ae 100644 --- a/src/comm/UDPLink.cc +++ b/src/comm/UDPLink.cc @@ -267,17 +267,6 @@ void UDPLink::readBytes() } } - -/** - * @brief Get the number of bytes to read. - * - * @return The number of bytes to read - **/ -qint64 UDPLink::bytesAvailable() -{ - return socket->pendingDatagramSize(); -} - /** * @brief Disconnect the connection. * diff --git a/src/comm/UDPLink.h b/src/comm/UDPLink.h index 00cf92097d9515b5d80c638796adc2be26db9964..48a8aa54d4b0b353dd24a45c5bb4f93c99d5cb4c 100644 --- a/src/comm/UDPLink.h +++ b/src/comm/UDPLink.h @@ -52,7 +52,6 @@ public: void requestReset() { } bool isConnected() const; - qint64 bytesAvailable(); int getPort() const { return port; } diff --git a/src/comm/XbeeLink.cpp b/src/comm/XbeeLink.cpp index 337c961fcaee38ba209690bbe9a9f6853d7f31d6..31ad736c01c1ca89c87aea6bcde031ee5b672d84 100644 --- a/src/comm/XbeeLink.cpp +++ b/src/comm/XbeeLink.cpp @@ -189,11 +189,6 @@ bool XbeeLink::disconnect() return true; } -qint64 XbeeLink::bytesAvailable() -{ - return 0; -} - void XbeeLink::writeBytes(const char *bytes, qint64 length) // TO DO: delete the data array { char *data; diff --git a/src/comm/XbeeLink.h b/src/comm/XbeeLink.h index 4e9e43fcab1b31e9c05c21c6dc505498747cf787..f7dfbf00daa5ea62222ae8b9003e64b9d4ec9ae7 100644 --- a/src/comm/XbeeLink.h +++ b/src/comm/XbeeLink.h @@ -36,7 +36,6 @@ public: // virtual functions from LinkInterface bool isConnected() const; bool connect(); bool disconnect(); - qint64 bytesAvailable(); // Extensive statistics for scientific purposes qint64 getConnectionSpeed() const;