aboutsummaryrefslogtreecommitdiff
path: root/src/modules/mavlink/mavlink_orb_subscription.h
blob: c38a9cc431f993a9e5827d308ac6d8a12781e89c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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_ */