aboutsummaryrefslogtreecommitdiff
path: root/src/modules/mavlink/mavlink_orb_subscription.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/mavlink/mavlink_orb_subscription.h')
-rw-r--r--src/modules/mavlink/mavlink_orb_subscription.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/modules/mavlink/mavlink_orb_subscription.h b/src/modules/mavlink/mavlink_orb_subscription.h
new file mode 100644
index 000000000..c38a9cc43
--- /dev/null
+++ b/src/modules/mavlink/mavlink_orb_subscription.h
@@ -0,0 +1,34 @@
+/*
+ * mavlink_orb_subscription.h
+ *
+ * Created on: 23.02.2014
+ * Author: ton
+ */
+
+#ifndef MAVLINK_ORB_SUBSCRIPTION_H_
+#define MAVLINK_ORB_SUBSCRIPTION_H_
+
+#include <systemlib/uthash/utlist.h>
+#include <drivers/drv_hrt.h>
+
+
+class MavlinkOrbSubscription {
+public:
+ MavlinkOrbSubscription *next;
+
+ MavlinkOrbSubscription(const struct orb_metadata *topic, size_t size);
+ ~MavlinkOrbSubscription();
+
+ bool update(const hrt_abstime t);
+ void *get_data();
+ const struct orb_metadata *get_topic();
+
+private:
+ const struct orb_metadata *_topic;
+ int _fd;
+ void *_data;
+ hrt_abstime _last_check;
+};
+
+
+#endif /* MAVLINK_ORB_SUBSCRIPTION_H_ */