PX4 Firmware
PX4 Autopilot Software http://px4.io
listener_main.cpp File Reference

Tool for listening to topics. More...

#include <px4_platform_common/module.h>
#include <px4_platform_common/getopt.h>
#include <poll.h>
#include "topic_listener.hpp"
#include "topic_listener_generated.hpp"
Include dependency graph for listener_main.cpp:

Go to the source code of this file.

Functions

__EXPORT int listener_main (int argc, char *argv[])
 
static void usage ()
 
void listener (listener_print_topic_cb cb, const orb_id_t &id, unsigned num_msgs, int topic_instance, unsigned topic_interval)
 

Variables

static constexpr float MESSAGE_TIMEOUT_S = 2.0f
 

Detailed Description

Tool for listening to topics.

Definition in file listener_main.cpp.

Function Documentation

◆ listener()

void listener ( listener_print_topic_cb  cb,
const orb_id_t id,
unsigned  num_msgs,
int  topic_instance,
unsigned  topic_interval 
)

Definition at line 55 of file listener_main.cpp.

References MESSAGE_TIMEOUT_S, orb_metadata::o_name, orb_exists(), ORB_MULTI_MAX_INSTANCES, orb_set_interval(), orb_subscribe(), orb_subscribe_multi(), orb_unsubscribe(), and read().

Referenced by listener_print_topic().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ listener_main()

int listener_main ( int  argc,
char *  argv[] 
)

Definition at line 163 of file listener_main.cpp.

References listener_generated(), and usage().

Here is the call graph for this function:

◆ usage()

static void usage ( void  )
static

Definition at line 218 of file listener_main.cpp.

References ORB_MULTI_MAX_INSTANCES.

Referenced by listener_main().

Here is the caller graph for this function:

Variable Documentation

◆ MESSAGE_TIMEOUT_S

constexpr float MESSAGE_TIMEOUT_S = 2.0f
static

Definition at line 49 of file listener_main.cpp.

Referenced by listener().