| XPPlanes
    X-Plane plugin to display additional planes based on network data | 
All global config settings and variables are kept in one structure for convenient access and central definition. More...
#include <Global.h>
| Public Types | |
| enum | StatusTy { STATUS_INACTIVE = 0 , STATUS_WAITING , STATUS_ACTIVE } | 
| Plugin status (type definition)  More... | |
| Public Member Functions | |
| GlobVars (logLevelTy _logLvl=logINFO, bool _logMdlMatch=false) | |
| Constructor.  More... | |
| bool | ShallHideOsById () const | 
| Hide ownship data based on id?  More... | |
| bool | ShallHideOsByReg () const | 
| Hide ownship data based on registration?  More... | |
| bool | ConfigFileLoad () | 
| Read from a config file.  More... | |
| bool | ConfigFileSave () | 
| Write to a config file.  More... | |
| void | ThisThreadIsXP () | 
| Set current thread as main xp Thread.  More... | |
| bool | IsXPThread () const | 
| Is this thread XP's main thread?  More... | |
| Public Attributes | |
| logLevelTy | logLvl | 
| Logging level.  More... | |
| bool | bLogMdlMatch = false | 
| Debug model matching?  More... | |
| bool | bClampAll = false | 
| Clamp all planes to the ground? Default is falseas clamping is kinda expensive due to Y-Testing; then clamping is only activated when plane is thought to be on the ground.  More... | |
| bool | bObjReplDataRefs = true | 
| Replace dataRefs in .objfiles on load?  More... | |
| bool | bObjReplTextures = true | 
| Replace textures in .objfiles on load if needed?  More... | |
| int | bufferPeriod = 5 | 
| Buffering period in seconds.  More... | |
| int | gracePeriod = 30 | 
| Remove a plane after how many seconds without fresh data?  More... | |
| int | iHideOwnship = HIDEOS_BY_ID | HIDEOS_BY_REG | 
| Hide ownship data? (bitfield, see HIDEOS_BY_ID and HIDEOS_BY_REG)  More... | |
| bool | bDrawLabels = true | 
| Shall we draw aircraft labels?  More... | |
| int | maxLabelDist = 5556 | 
| Maximum distance for drawing labels? [m], defaults to 3nm.  More... | |
| bool | bLabelCutOffAtVisibility = true | 
| Cut off labels at XP's reported visibility mit?  More... | |
| bool | bAITcasControl = true | 
| Do we want to control X-Plane's AI/Multiplayer planes for TCAS?  More... | |
| bool | bMapEnabled = true | 
| Do we feed X-Plane's maps with our aircraft positions?  More... | |
| bool | bMapLabels = true | 
| Do we show labels with the aircraft icons?  More... | |
| std::string | listenMCGroup = "239.255.1.1" | 
| The multicast group that we use, which is the same X-Plane is using itself for its BEACON.  More... | |
| int | listenMCPort = 49900 | 
| The port we use is different from the port the X-Plane BEACON uses, so we don't get into conflict.  More... | |
| int | listenBcstPort = 49800 | 
| The port for receiving UDP broadcast messages.  More... | |
| int | remoteTTL = 8 | 
| Time-to-live, or mumber of hops for a multicast message.  More... | |
| int | remoteBufSize = 8192 | 
| Buffer size, ie. max message length we send over multicast.  More... | |
| mapPlanesTy | mapPlanes | 
| Global map of all created planes.  More... | |
| mapListFlightDataTy | mapListFD | 
| Global map of available (potentially future) flight data.  More... | |
| std::mutex | mtxListFD | 
| Mutex protecting access to the above mapListFD.  More... | |
| XPLMPluginID | pluginId = 0 | 
| This plugin's id.  More... | |
| std::thread::id | xpThread | 
| id of X-Plane's thread (when it is OK to use XP API calls)  More... | |
| float | now = NAN | 
| Current X-Xplane's time.  More... | |
| XPLMMenuID | hMenu = NULL | 
| plugin's menu handle  More... | |
| volatile StatusTy | eStatus = STATUS_INACTIVE | 
| Plugin status.  More... | |
All global config settings and variables are kept in one structure for convenient access and central definition.
| enum GlobVars::StatusTy | 
| 
 | inline | 
Constructor.
| bool GlobVars::ConfigFileLoad | ( | ) | 
Read from a config file.
| bool GlobVars::ConfigFileSave | ( | ) | 
Write to a config file.
| 
 | inline | 
Is this thread XP's main thread?
| 
 | inline | 
Hide ownship data based on id?
| 
 | inline | 
Hide ownship data based on registration?
| 
 | inline | 
Set current thread as main xp Thread.
| bool GlobVars::bAITcasControl = true | 
Do we want to control X-Plane's AI/Multiplayer planes for TCAS?
| bool GlobVars::bClampAll = false | 
Clamp all planes to the ground? Default is false as clamping is kinda expensive due to Y-Testing; then clamping is only activated when plane is thought to be on the ground. 
| bool GlobVars::bDrawLabels = true | 
Shall we draw aircraft labels?
| bool GlobVars::bLabelCutOffAtVisibility = true | 
Cut off labels at XP's reported visibility mit?
| bool GlobVars::bLogMdlMatch = false | 
Debug model matching?
| bool GlobVars::bMapEnabled = true | 
Do we feed X-Plane's maps with our aircraft positions?
| bool GlobVars::bMapLabels = true | 
Do we show labels with the aircraft icons?
| bool GlobVars::bObjReplDataRefs = true | 
Replace dataRefs in .obj files on load? 
| bool GlobVars::bObjReplTextures = true | 
Replace textures in .obj files on load if needed? 
| int GlobVars::bufferPeriod = 5 | 
Buffering period in seconds.
| volatile StatusTy GlobVars::eStatus = STATUS_INACTIVE | 
Plugin status.
| int GlobVars::gracePeriod = 30 | 
Remove a plane after how many seconds without fresh data?
| XPLMMenuID GlobVars::hMenu = NULL | 
plugin's menu handle
| int GlobVars::iHideOwnship = HIDEOS_BY_ID | HIDEOS_BY_REG | 
Hide ownship data? (bitfield, see HIDEOS_BY_ID and HIDEOS_BY_REG)
| int GlobVars::listenBcstPort = 49800 | 
The port for receiving UDP broadcast messages.
| std::string GlobVars::listenMCGroup = "239.255.1.1" | 
The multicast group that we use, which is the same X-Plane is using itself for its BEACON.
| int GlobVars::listenMCPort = 49900 | 
The port we use is different from the port the X-Plane BEACON uses, so we don't get into conflict.
| logLevelTy GlobVars::logLvl | 
| mapListFlightDataTy GlobVars::mapListFD | 
Global map of available (potentially future) flight data.
| mapPlanesTy GlobVars::mapPlanes | 
Global map of all created planes.
| int GlobVars::maxLabelDist = 5556 | 
Maximum distance for drawing labels? [m], defaults to 3nm.
| std::mutex GlobVars::mtxListFD | 
Mutex protecting access to the above mapListFD.
| float GlobVars::now = NAN | 
Current X-Xplane's time.
| XPLMPluginID GlobVars::pluginId = 0 | 
This plugin's id.
| int GlobVars::remoteBufSize = 8192 | 
Buffer size, ie. max message length we send over multicast.
| int GlobVars::remoteTTL = 8 | 
Time-to-live, or mumber of hops for a multicast message.
| std::thread::id GlobVars::xpThread | 
id of X-Plane's thread (when it is OK to use XP API calls)