Program Listing for File RatatoskLogInfo.hpp¶
↰ Return to documentation for file (sinspekto/ratatosk/RatatoskLogInfo.hpp
)
#pragma once
#include "sinspekto/QtToDds.hpp"
#include "QDateTime"
class RatatoskLogInfoSubscriber : public QObject
{
Q_OBJECT
Q_PROPERTY(double speed READ speed NOTIFY speedChanged)
Q_PROPERTY(QDateTime timestamp READ timestamp NOTIFY timestampChanged)
public:
explicit RatatoskLogInfoSubscriber(QObject *parent = nullptr);
virtual ~RatatoskLogInfoSubscriber();
double speed() const;
QDateTime timestamp() const;
Q_INVOKABLE void init(
QtToDds* dds,
const QString& topic,
bool with_listener=true);
signals:
void speedChanged(double speed);
void timestampChanged(QDateTime timestamp);
void eventHeard();
public slots:
void updateValue();
private:
std::unique_ptr<sinspekto::Reader<ratatosk::types::LogInfo>> m_reader;
};