XPMP2
X-Plane multiplayer library 2 - using instancing
|
XPMP2::Aircraft represents an aircraft as managed by XPMP2. More...
#include "XPMP2.h"
Namespaces | |
XPMP2 | |
Macros | |
#define | WARN_MODEL_NOT_FOUND "Named CSL Model '%s' not found" |
#define | FATAL_MODE_S_OUT_OF_RGE "_modeS_id (0x%06X) is out of range [0x%06X..0x%06X]" |
#define | FATAL_MODE_S_EXISTS "_modeS_id (0x%06X) already exists" |
#define | FATAL_CREATE_INVALID "Called Aircraft::Create() on already defined plane with _modeS_id (0x%06X)" |
#define | DEBUG_REPL_MODE_S "Replaced duplicate _modeS_id 0x%06X with new unique value 0x%06X" |
#define | ERR_CREATE_INSTANCE "Aircraft 0x%06X: Create Instance FAILED for CSL Model %s" |
#define | DEBUG_INSTANCE_CREATED "Aircraft 0x%06X: Instance created of model %s for '%s'" |
#define | DEBUG_INSTANCE_DESTRYD "Aircraft 0x%06X: Instance destroyed" |
#define | INFO_MODEL_CHANGE "Aircraft 0x%06X: Changing model from %s to %s" |
#define | ERR_YPROBE "Aircraft 0x%06X: Could not create Y-Probe for terrain testing!" |
#define | ERR_SET_INVALID "Aircraft 0x%06X set INVALID" |
#define | WARN_PLANES_LEFT_EXIT "Still %lu aircaft defined during shutdown! Plugin should destroy them prior to shutting down." |
#define | ERR_ADD_DATAREF_INIT "Could not add dataRef %s, XPMP2 not yet initialized?" |
#define | ERR_ADD_DATAREF_PLANES "Could add dataRef %s only if no aircraft are flying, but currently there are %lu aircraft." |
#define | ERR_WORKER_THREAD "Can only be called from XP's main thread!" |
#define | DEBUG_DATAREF_ADDED "Added dataRef %s as index %lu" |
Typedefs | |
typedef std::map< std::string, Aircraft::wakeTy > | XPMP2::mapWakeTy |
Functions | |
float | XPMP2::obj_get_float (void *) |
int | XPMP2::obj_get_float_array (void *, float *, int, int inCount) |
See obj_get_float() More... | |
void | XPMP2::AcInit () |
Initialize the module. More... | |
void | XPMP2::AcCleanup () |
Grace cleanup, esp. remove all aircraft. More... | |
Aircraft * | XPMP2::AcFindByID (XPMPPlaneID _id) |
Find aircraft by its plane ID, can return nullptr. More... | |
bool | XPMP2::AcSetDefaultWakeData (const std::string &_wtc, const Aircraft::wakeTy &_wake) |
(Re)Define default wake turbulence values per WTC More... | |
size_t | XPMPAddModelDataRef (const std::string &dataRef) |
Add a user-defined dataRef to the list of dataRefs supported by every plane. More... | |
Variables | |
XPLMFlightLoopID | XPMP2::gFlightLoopID = nullptr |
The id of our flight loop callback. More... | |
std::vector< std::unique_ptr< std::string > > | XPMP2::drStrings |
std::vector< XPLMDataRef > | XPMP2::ahDataRefs |
Registered dataRefs. More... | |
XPMP2::Aircraft represents an aircraft as managed by XPMP2.
#define DEBUG_DATAREF_ADDED "Added dataRef %s as index %lu" |
#define DEBUG_INSTANCE_CREATED "Aircraft 0x%06X: Instance created of model %s for '%s'" |
#define DEBUG_INSTANCE_DESTRYD "Aircraft 0x%06X: Instance destroyed" |
#define DEBUG_REPL_MODE_S "Replaced duplicate _modeS_id 0x%06X with new unique value 0x%06X" |
#define ERR_ADD_DATAREF_INIT "Could not add dataRef %s, XPMP2 not yet initialized?" |
#define ERR_ADD_DATAREF_PLANES "Could add dataRef %s only if no aircraft are flying, but currently there are %lu aircraft." |
#define ERR_CREATE_INSTANCE "Aircraft 0x%06X: Create Instance FAILED for CSL Model %s" |
#define ERR_SET_INVALID "Aircraft 0x%06X set INVALID" |
#define ERR_WORKER_THREAD "Can only be called from XP's main thread!" |
#define ERR_YPROBE "Aircraft 0x%06X: Could not create Y-Probe for terrain testing!" |
#define FATAL_CREATE_INVALID "Called Aircraft::Create() on already defined plane with _modeS_id (0x%06X)" |
#define FATAL_MODE_S_EXISTS "_modeS_id (0x%06X) already exists" |
#define FATAL_MODE_S_OUT_OF_RGE "_modeS_id (0x%06X) is out of range [0x%06X..0x%06X]" |
#define INFO_MODEL_CHANGE "Aircraft 0x%06X: Changing model from %s to %s" |
#define WARN_MODEL_NOT_FOUND "Named CSL Model '%s' not found" |
#define WARN_PLANES_LEFT_EXIT "Still %lu aircaft defined during shutdown! Plugin should destroy them prior to shutting down." |
size_t XPMPAddModelDataRef | ( | const std::string & | dataRef | ) |
Add a user-defined dataRef to the list of dataRefs supported by every plane.
All planes created by XPMP2 define the same set of dataRefs. See XPMP2::DR_VALS for the definitions that come pre-defined with XPMP2. Here you can add more dataRefs that you want to set in your XPMP2::Aircraft::UpdatePosition() implementation.
0
when an error occured. 0
if called while planes exist. 0
if called from a worker thread.