Browse Source

Merge pull request #3464 from NaterGator/linkfix

Obligate LinkInterfaces to implement getLinkConfiguration. …
QGC4.4
Don Gagne 9 years ago
parent
commit
2a00db6b89
  1. 6
      src/comm/LinkInterface.h
  2. 2
      src/comm/LogReplayLink.h
  3. 1
      src/comm/TCPLink.h

6
src/comm/LinkInterface.h

@ -51,10 +51,10 @@ public:
void setActive(bool active) { _active = active; emit activeChanged(active); } void setActive(bool active) { _active = active; emit activeChanged(active); }
/** /**
* @brief Get link configuration (if used) * @brief Get link configuration
* @return A pointer to the instance of LinkConfiguration if supported. NULL otherwise. * @return A pointer to the instance of LinkConfiguration
**/ **/
virtual LinkConfiguration* getLinkConfiguration() { return NULL; } virtual LinkConfiguration* getLinkConfiguration() = 0;
/* Connection management */ /* Connection management */

2
src/comm/LogReplayLink.h

@ -57,6 +57,8 @@ class LogReplayLink : public LinkInterface
friend class LinkManager; friend class LinkManager;
public: public:
virtual LinkConfiguration* getLinkConfiguration() { return _config; }
/// @return true: log is currently playing, false: log playback is paused /// @return true: log is currently playing, false: log playback is paused
bool isPlaying(void) { return _readTickTimer.isActive(); } bool isPlaying(void) { return _readTickTimer.isActive(); }

1
src/comm/TCPLink.h

@ -121,6 +121,7 @@ class TCPLink : public LinkInterface
public: public:
QTcpSocket* getSocket(void) { return _socket; } QTcpSocket* getSocket(void) { return _socket; }
virtual LinkConfiguration* getLinkConfiguration() { return _config; }
void signalBytesWritten(void); void signalBytesWritten(void);

Loading…
Cancel
Save