XPPlanes
X-Plane plugin to display additional planes based on network data
Macros | Functions | Variables
Listener.cpp File Reference

UDP receiver thread. More...

#include "XPPlanes.h"

Macros

#define BCST_LOCALHOST   "0.0.0.0"
 
#define INFO_LISTEN_BEGIN   "Receiver started listening to %s:%d"
 
#define INFO_LISTEN_RCVD   "Receiver received data from %.*s on %s, will start message processing"
 
#define ERR_LISTEN_THREAD   "Exception in listener: %s"
 

Functions

bool ListenContinue ()
 Conditions for continued receive operation. More...
 
void ListenMain ()
 Thread main function for the receiver. More...
 
bool ListenStartup ()
 Initialize the module and start the network listener thread, returns success. More...
 
void ListenShutdown ()
 Stop the network thread, wait for its shutdown, and cleanup the module. More...
 

Variables

constexpr int LISTEN_INTVL = 15
 listen for this many seconds before thread wakes up again More...
 

Detailed Description

UDP receiver thread.

Receives flight data from UDP messages and stores the data in a map of lists of flight data objects

Author
Birger Hoppe

Macro Definition Documentation

◆ BCST_LOCALHOST

#define BCST_LOCALHOST   "0.0.0.0"

◆ ERR_LISTEN_THREAD

#define ERR_LISTEN_THREAD   "Exception in listener: %s"

◆ INFO_LISTEN_BEGIN

#define INFO_LISTEN_BEGIN   "Receiver started listening to %s:%d"

◆ INFO_LISTEN_RCVD

#define INFO_LISTEN_RCVD   "Receiver received data from %.*s on %s, will start message processing"

Function Documentation

◆ ListenContinue()

bool ListenContinue ( )

Conditions for continued receive operation.

◆ ListenMain()

void ListenMain ( )

Thread main function for the receiver.

◆ ListenShutdown()

void ListenShutdown ( )

Stop the network thread, wait for its shutdown, and cleanup the module.

◆ ListenStartup()

bool ListenStartup ( )

Initialize the module and start the network listener thread, returns success.

Variable Documentation

◆ LISTEN_INTVL

constexpr int LISTEN_INTVL = 15
constexpr

listen for this many seconds before thread wakes up again