21 #include <QApplication> 25 #include <variant_topic_tools/DataTypeRegistry.h> 26 #include <variant_topic_tools/Message.h> 27 #include <variant_topic_tools/MessageDefinition.h> 28 #include <variant_topic_tools/MessageType.h> 29 #include <variant_topic_tools/MessageVariant.h> 63 return QObject::event(event);
72 variant_topic_tools::DataTypeRegistry registry;
76 variant_topic_tools::MessageType messageType(instance.
getDataType(),
78 variant_topic_tools::MessageDefinition messageDefinition(
81 dataType_ = messageDefinition.getMessageDataType();
89 std::vector<uint8_t> data(instance.
size());
91 instance.
write(outputStream);
93 variant_topic_tools::MessageVariant variant =
dataType_.createVariant();
104 QApplication::postEvent(
this, messageEvent);
107 #if QT_VERSION >= QT_VERSION_CHECK(5,0,0) 109 if (!receivers(QMetaObject::normalizedSignature(
110 SIGNAL(messageReceived(
const QString&,
const Message&))))) {
118 if (!receivers(QMetaObject::normalizedSignature(
119 SIGNAL(messageReceived(
const QString&,
const Message&))))) {
void callback(const rosbag::MessageInstance &instance)
void aboutToBeDestroyed()
BagQuery(QObject *parent=0)
const QString & getTopic() const
std::string const & getMD5Sum() const
void messageRead(const QString &topic, const Message &message)
void disconnectNotify(const QMetaMethod &signal)
bool event(QEvent *event)
ros::Time const & getTime() const
static const QEvent::Type Type
void setReceiptTime(const ros::Time &receiptTime)
std::string const & getMessageDefinition() const
std::string const & getTopic() const
std::string const & getDataType() const
void setVariant(const variant_topic_tools::MessageVariant &variant)
void write(Stream &stream) const
variant_topic_tools::MessageDataType dataType_
variant_topic_tools::MessageSerializer serializer_