XPMP2
X-Plane multiplayer library 2 - using instancing
XPMPMultiplayer.h
Go to the documentation of this file.
1 
55 #ifndef _XPLMMultiplayer_h_
56 #define _XPLMMultiplayer_h_
57 
58 #include <string>
59 #include "XPLMDefs.h"
60 
61 #ifdef __cplusplus
62 extern "C" {
63 #endif
64 
65 // defined in XPMPAircraft
66 namespace XPMP2 { class Aircraft; }
67 
68 /************************************************************************************
69  * MARK: PLANE DATA TYPES
70  ************************************************************************************/
71 
80  long size = sizeof(XPMPPlanePosition_t);
81  double lat = 0.0;
82  double lon = 0.0;
83  double elevation = 0.0;
84  float pitch = 0.0f;
85  float roll = 0.0f;
86  float heading = 0.0f;
87  char label[32] = "";
88  float offsetScale = 1.0f;
89  bool clampToGround = false;
90  int aiPrio = 1;
91  float label_color[4] = {1.0f,1.0f,0.0f,1.0f};
92  int multiIdx = 0;
93 };
94 
95 
101 enum {
105 };
106 typedef unsigned int XPMPLightsPattern;
107 
108 
109 #if __GNUC__
110 #pragma GCC diagnostic push
111 #pragma GCC diagnostic ignored "-Wpedantic" // because we don't want to change the anonymous structure following here as that would require code change in legacy plugins
112 #elif _MSC_VER
113 #pragma warning(push)
114 #pragma warning(disable: 4202 4201)
115 #endif
120  unsigned int lightFlags = 0x150000;
121  struct {
122  unsigned int timeOffset : 16;
123 
124  unsigned int taxiLights : 1;
125  unsigned int landLights : 1;
126  unsigned int bcnLights : 1;
127  unsigned int strbLights : 1;
128  unsigned int navLights : 1;
129 
131  XPMPLightsPattern flashPattern : 4;
132  };
133 };
134 #if __GNUC__
135 #pragma GCC diagnostic pop
136 #elif _MSC_VER
137 #pragma warning(pop)
138 #endif
139 
140 
148  long size = sizeof(XPMPPlaneSurfaces_t);
149  float gearPosition = 0.0f;
150  float flapRatio = 0.0f;
151  float spoilerRatio = 0.0f;
152  float speedBrakeRatio = 0.0f;
153  float slatRatio = 0.0f;
154  float wingSweep = 0.0f;
155  float thrust = 0.0f;
156  float yokePitch = 0.0f;
157  float yokeHeading = 0.0f;
158  float yokeRoll = 0.0f;
159 
161 
162  float tireDeflect = 0.0f;
163  float tireRotDegree = 0.0f;
164  float tireRotRpm = 0.0f;
165 
166  float engRotDegree = 0.0f;
167  float engRotRpm = 0.0f;
168  float propRotDegree = 0.0f;
169  float propRotRpm = 0.0f;
170  float reversRatio = 0.0f;
171 
172  bool touchDown = false;
173 };
174 
175 
185 };
186 
187 
190  long size = sizeof(XPMPPlaneRadar_t);
191  long code = 0;
193 };
194 
195 
200  long size = sizeof(XPMPInfoTexts_t);
201  char tailNum[10] = {0};
202  char icaoAcType[5] = {0};
203  char manufacturer[40] = {0};
204  char model[40] = {0};
205  char icaoAirline[4] = {0};
206  char airline[40] = {0};
207  char flightNum [10] = {0};
208  char aptFrom [5] = {0};
209  char aptTo [5] = {0};
210 };
211 
212 
223  xpmpDataType_Radar = 1L << 3,
225 };
226 
227 
232  xpmpData_Unavailable = 0, /* The information has never been specified. */
233  xpmpData_Unchanged = 1, /* The information from the last time the plug-in was asked. */
234  xpmpData_NewData = 2 /* The information has changed this sim cycle. */
235 };
236 
237 
243 typedef unsigned XPMPPlaneID;
244 
246 constexpr XPMPPlaneID MIN_MODE_S_ID = 0x00000001;
248 constexpr XPMPPlaneID MAX_MODE_S_ID = 0x00FFFFFF;
249 
250 
251 /************************************************************************************
252 * MARK: INITIALIZATION
253 ************************************************************************************/
254 
255 // Config section is defined for legacy reasons only
256 #define XPMP_CFG_SEC_MODELS "models"
257 #define XPMP_CFG_SEC_PLANES "planes"
258 #define XPMP_CFG_SEC_DEBUG "debug"
259 
260 // Config key definitions
261 #define XPMP_CFG_ITM_REPLDATAREFS "replace_datarefs"
262 #define XPMP_CFG_ITM_REPLTEXTURE "replace_texture"
263 #define XPMP_CFG_ITM_CLAMPALL "clamp_all_to_ground"
264 #define XPMP_CFG_ITM_HANDLE_DUP_ID "handle_dup_id"
265 #define XPMP_CFG_ITM_SUPPORT_REMOTE "support_remote"
266 #define XPMP_CFG_ITM_LOGLEVEL "log_level"
267 #define XPMP_CFG_ITM_MODELMATCHING "model_matching"
268 
288 typedef int (*XPMPIntPrefsFuncTy)(const char* _section, const char* _key, int _default);
289 
295 [[deprecated("Use XPMPMultiplayerInit and XPMPLoadCSLPackages")]]
296 const char * XPMPMultiplayerInitLegacyData(const char* inCSLFolder,
297  const char* inPluginName,
298  const char* resourceDir,
299  XPMPIntPrefsFuncTy inIntPrefsFunc = nullptr,
300  const char* inDefaultICAO = nullptr,
301  const char* inPluginLogAcronym = nullptr);
302 
311 const char * XPMPMultiplayerInit(const char* inPluginName,
312  const char* resourceDir,
313  XPMPIntPrefsFuncTy inIntPrefsFunc = nullptr,
314  const char* inDefaultICAO = nullptr,
315  const char* inPluginLogAcronym = nullptr);
316 
323 void XPMPSetPluginName (const char* inPluginName,
324  const char* inPluginLogAcronym = nullptr);
325 
326 
332 
333 
336 [[deprecated("Unsupported feature, will alsways return 'OBJ7 format is no longer supported'")]]
337 const char * XPMPMultiplayerOBJ7SupportEnable(const char * inTexturePath);
338 
339 
340 /************************************************************************************
341 * MARK: AI / Multiplayer plane control
342 ************************************************************************************/
343 
344 
365 const char * XPMPMultiplayerEnable(void (*_callback)(void*) = nullptr,
366  void* _refCon = nullptr);
367 
368 
374 
375 
379 
380 /************************************************************************************
381 * MARK: CSL Package Handling
382 ************************************************************************************/
383 
402 const char * XPMPLoadCSLPackage(const char * inCSLFolder);
403 
404 
406 [[deprecated("No longer needed, does not do anything.")]]
408 
409 
412 
413 
427 [[deprecated("Unsafe, use XPMPGetModelInfo2() instead.")]]
428 void XPMPGetModelInfo(int inIndex, const char **outModelName, const char **outIcao, const char **outAirline, const char **outLivery);
429 
438 void XPMPGetModelInfo2(int inIndex, std::string& outModelName, std::string& outIcao, std::string& outAirline, std::string& outLivery);
439 
440 
446 int XPMPModelMatchQuality(const char * inICAO,
447  const char * inAirline,
448  const char * inLivery);
449 
450 
452 bool XPMPIsICAOValid(const char * inICAO);
453 
471 size_t XPMPAddModelDataRef (const std::string& dataRef);
472 
473 /************************************************************************************
474  * MARK: PLANE CREATION API
475  ************************************************************************************/
476 
477 
490  XPMPPlaneDataType inDataType,
491  void * ioData,
492  void * inRefcon);
493 
494 
505 [[deprecated("Subclass XPMP2::Aircraft instead")]]
506 XPMPPlaneID XPMPCreatePlane(const char * inICAOCode,
507  const char * inAirline,
508  const char * inLivery,
509  XPMPPlaneData_f inDataFunc,
510  void * inRefcon,
511  XPMPPlaneID inModeS_id = 0);
512 
522 [[deprecated("Subclass XPMP2::Aircraft instead")]]
523 XPMPPlaneID XPMPCreatePlaneWithModelName(const char * inModelName,
524  const char * inICAOCode,
525  const char * inAirline,
526  const char * inLivery,
527  XPMPPlaneData_f inDataFunc,
528  void * inRefcon,
529  XPMPPlaneID inModeS_id = 0);
530 
533 [[deprecated("Delete subclassed XPMP2::Aircraft object instead")]]
534 void XPMPDestroyPlane(XPMPPlaneID _id);
535 
536 
538 void XPMPSetPlaneVisibility(XPMPPlaneID _id, bool _bVisible);
539 
540 
549 int XPMPChangePlaneModel(XPMPPlaneID inPlaneID,
550  const char * inICAOCode,
551  const char * inAirline,
552  const char * inLivery);
553 
554 
566 int XPMPGetPlaneModelName(XPMPPlaneID inPlaneID,
567  char * outTxtBuf,
568  int outTxtBufSize);
569 
570 
576 [[deprecated("Unsafe pointer operations")]]
578  char * outICAOCode, // Can be NULL
579  char * outLivery); // Can be NULL
580 
581 
589 [[deprecated("Unsupported")]]
591  XPMPPlaneDataType inDataType,
592  void * outData);
593 
594 
597 
598 
600 long XPMPCountPlanes(void);
601 
602 
604 XPMPPlaneID XPMPGetNthPlane(long index);
605 
606 
609 
610 
614 void XPMPSetDefaultPlaneICAO(const char* _acIcaoType,
615  const char* _carIcaoType = nullptr);
616 
617 /************************************************************************************
618  * MARK: PLANE OBSERVATION API
619  ************************************************************************************/
620 
621 
627 };
628 
629 
635 typedef void (*XPMPPlaneNotifier_f)(XPMPPlaneID inPlaneID,
636  XPMPPlaneNotification inNotification,
637  void * inRefcon);
638 
639 
645  void * inRefcon);
646 
647 
653  void * inRefcon);
654 
655 /************************************************************************************
656  * MARK: PLANE RENDERING API (unsued in XPMP2)
657  ************************************************************************************/
658 
662 [[deprecated("Unsupported, will not be called")]]
663 typedef void (* XPMPRenderPlanes_f)(
664  int inIsBlend,
665  void * inRef);
666 
667 
671 [[deprecated("Unsupported, doesn't do anything")]]
673  void * inRef);
674 
675 
678 [[deprecated("Unsupported, doesn't do anything")]]
679 void XPMPDumpOneCycle(void);
680 
681 
683 void XPMPEnableAircraftLabels (bool _enable = true);
684 
685 
689 
690 
693 
694 
698 void XPMPSetAircraftLabelDist (float _dist_nm, bool _bCutOffAtVisibility = true);
699 
700 //
701 // MARK: MAP
702 // Enable or disable the drawing of icons on maps
703 //
704 
710 void XPMPEnableMap (bool _bEnable, bool _bLabels = true);
711 
712 #ifdef __cplusplus
713 }
714 #endif
715 
716 
717 #endif
int(* XPMPIntPrefsFuncTy)(const char *_section, const char *_key, int _default)
Definition for the type of configuration callback function.
Definition: XPMPMultiplayer.h:288
void XPMPSetAircraftLabelDist(float _dist_nm, bool _bCutOffAtVisibility=true)
Definition: 2D.cpp:287
bool clampToGround
enables ground-clamping for this aircraft (can be expensive, see XPMP2::Aircraft::bClampToGround)
Definition: XPMPMultiplayer.h:89
@ xpmp_Lights_Pattern_GA
GA: one strobe flash, long beacon (-*-----—*—)
Definition: XPMPMultiplayer.h:104
@ xpmp_Lights_Pattern_EADS
Airbus+EADS: strobe flashes twice (-*-*--—*-*–), short beacon.
Definition: XPMPMultiplayer.h:103
@ xpmp_Lights_Pattern_Default
Jets: one strobe flash, short beacon (-*—*—*—)
Definition: XPMPMultiplayer.h:102
double elevation
current altitude of aircraft [ft above MSL]
Definition: XPMPMultiplayer.h:83
const char * XPMPMultiplayerEnable(void(*_callback)(void *)=nullptr, void *_refCon=nullptr)
Tries to grab control of TCAS targets (formerly known as AI/multiplayer) from X-Plane.
Definition: AIMultiplayer.cpp:997
XPMPTransponderMode mode
current radar mode, if not xpmpTransponderMode_Standby then is plane considered for TCAS display
Definition: XPMPMultiplayer.h:192
long XPMPCountPlanes(void)
Returns the number of planes in existence.
Definition: XPMPMultiplayer.cpp:475
double lat
current position of aircraft (latitude)
Definition: XPMPMultiplayer.h:81
float pitch
pitch [degrees, psitive up]
Definition: XPMPMultiplayer.h:84
int XPMPGetPlaneModelName(XPMPPlaneID inPlaneID, char *outTxtBuf, int outTxtBufSize)
Return the name of the model, with which the given plane is rendered.
Definition: XPMPMultiplayer.cpp:425
float engRotRpm
engine rotation speed (rpm)
Definition: XPMPMultiplayer.h:167
XPMPPlaneCallbackResult XPMPGetPlaneData(XPMPPlaneID inPlane, XPMPPlaneDataType inDataType, void *outData)
Unsupported, don't use.
Definition: XPMPMultiplayer.cpp:456
char tailNum[10]
registration, tail number
Definition: XPMPMultiplayer.h:201
float yokePitch
yoke pitch ratio [0..1]
Definition: XPMPMultiplayer.h:156
XPMPPlaneDataType
This enum defines the different categories of aircraft information we can query about.
Definition: XPMPMultiplayer.h:220
@ xpmpDataType_Surfaces
physical appearance in XPMPPlaneSurfaces_t
Definition: XPMPMultiplayer.h:222
@ xpmpDataType_Radar
radar information in XPMPPlaneRadar_t
Definition: XPMPMultiplayer.h:223
@ xpmpDataType_InfoTexts
informational texts in XPMPInfoTexts_t
Definition: XPMPMultiplayer.h:224
@ xpmpDataType_Position
position data in XPMPPlanePosition_t
Definition: XPMPMultiplayer.h:221
float gearPosition
gear position [0..1]
Definition: XPMPMultiplayer.h:149
bool XPMPIsICAOValid(const char *inICAO)
Is inICAO a valid ICAO aircraft type designator?
Definition: XPMPMultiplayer.cpp:330
void XPMPRegisterPlaneNotifierFunc(XPMPPlaneNotifier_f inFunc, void *inRefcon)
Registers a callback, which is called when one of the events defined in XPMPPlaneNotification happens...
Definition: XPMPMultiplayer.cpp:525
const char * XPMPMultiplayerInit(const char *inPluginName, const char *resourceDir, XPMPIntPrefsFuncTy inIntPrefsFunc=nullptr, const char *inDefaultICAO=nullptr, const char *inPluginLogAcronym=nullptr)
Initializes the XPMP2 library. This shall be your first call to the library.
Definition: XPMPMultiplayer.cpp:126
char label[32]
label to show with the aircraft
Definition: XPMPMultiplayer.h:87
constexpr XPMPPlaneID MIN_MODE_S_ID
Minimum allowed XPMPPlaneID / mode S id.
Definition: XPMPMultiplayer.h:246
bool touchDown
just now is moment of touch down?
Definition: XPMPMultiplayer.h:172
void(* XPMPRenderPlanes_f)(int inIsBlend, void *inRef)
The original libxplanemp allowed to override rendering; no longer supported.
Definition: XPMPMultiplayer.h:663
int XPMPModelMatchQuality(const char *inICAO, const char *inAirline, const char *inLivery)
Tests model match quality based on the given parameters.
Definition: XPMPMultiplayer.cpp:318
void XPMPGetPlaneICAOAndLivery(XPMPPlaneID inPlane, char *outICAOCode, char *outLivery)
Returns ICAO aircraft type designator and livery of the given plane.
Definition: XPMPMultiplayer.cpp:443
char aptFrom[5]
Origin airport (ICAO)
Definition: XPMPMultiplayer.h:208
long code
current radar code, published via dataRef sim/cockpit2/tcas/targets/modeC_code
Definition: XPMPMultiplayer.h:191
float tireRotRpm
tire rotation speed (rpm)
Definition: XPMPMultiplayer.h:164
float heading
heading [degrees]
Definition: XPMPMultiplayer.h:86
float yokeRoll
yoke roll ratio [0..1]
Definition: XPMPMultiplayer.h:158
char airline[40]
airline, human readable
Definition: XPMPMultiplayer.h:206
long size
structure size
Definition: XPMPMultiplayer.h:190
float flapRatio
flap extension ratio [0..1]
Definition: XPMPMultiplayer.h:150
constexpr XPMPPlaneID MAX_MODE_S_ID
Maximum allowed XPMPPlaneID / mode S id.
Definition: XPMPMultiplayer.h:248
XPMPPlaneID XPMPGetNthPlane(long index)
Returns the plane ID of the Nth plane.
Definition: XPMPMultiplayer.cpp:481
char flightNum[10]
flight number
Definition: XPMPMultiplayer.h:207
char manufacturer[40]
a/c manufacturer, human readable
Definition: XPMPMultiplayer.h:203
float label_color[4]
label base color (RGB), defaults to yellow
Definition: XPMPMultiplayer.h:91
int aiPrio
Priority for AI/TCAS consideration, the lower the earlier.
Definition: XPMPMultiplayer.h:90
void XPMPUnregisterPlaneNotifierFunc(XPMPPlaneNotifier_f inFunc, void *inRefcon)
Unregisters a notification callback. Both function pointer and refcon must match what was registered.
Definition: XPMPMultiplayer.cpp:545
char model[40]
a/c model, human readable
Definition: XPMPMultiplayer.h:204
xpmp_LightStatus lights
status of lights
Definition: XPMPMultiplayer.h:160
float engRotDegree
engine rotation angle (degrees 0..360)
Definition: XPMPMultiplayer.h:166
float reversRatio
thrust reversers ratio
Definition: XPMPMultiplayer.h:170
XPMPPlaneCallbackResult(* XPMPPlaneData_f)(XPMPPlaneID inPlane, XPMPPlaneDataType inDataType, void *ioData, void *inRefcon)
Callback function your plugin provides to return updated plane data.
Definition: XPMPMultiplayer.h:489
void XPMPDisableAircraftLabels()
Disable drawing of labels with the aircraft.
Definition: 2D.cpp:276
void XPMPEnableMap(bool _bEnable, bool _bLabels=true)
Enable or disable the drawing of aircraft icons on X-Plane's map.
Definition: Map.cpp:397
float offsetScale
how much of the surface contact correction offset should be applied [0..1]
Definition: XPMPMultiplayer.h:88
bool XPMPHasControlOfAIAircraft()
Has XPMP2 control of TCAS targets?
Definition: AIMultiplayer.cpp:1108
int XPMPChangePlaneModel(XPMPPlaneID inPlaneID, const char *inICAOCode, const char *inAirline, const char *inLivery)
Perform model matching again and change the CSL model to the resulting match.
Definition: XPMPMultiplayer.cpp:410
XPMPPlaneCallbackResult
Definfes the different responses to asking for information.
Definition: XPMPMultiplayer.h:231
@ xpmpData_Unchanged
Definition: XPMPMultiplayer.h:233
@ xpmpData_Unavailable
Definition: XPMPMultiplayer.h:232
@ xpmpData_NewData
Definition: XPMPMultiplayer.h:234
XPMPPlaneID XPMPCreatePlane(const char *inICAOCode, const char *inAirline, const char *inLivery, XPMPPlaneData_f inDataFunc, void *inRefcon, XPMPPlaneID inModeS_id=0)
Creates a new plane.
Definition: XPMPMultiplayer.cpp:341
char icaoAcType[5]
ICAO aircraft type designator, 3-4 chars.
Definition: XPMPMultiplayer.h:202
XPMPPlaneNotification
Events that trigger a notification callback.
Definition: XPMPMultiplayer.h:623
@ xpmp_PlaneNotification_Destroyed
a plane is about to be destroyed
Definition: XPMPMultiplayer.h:626
@ xpmp_PlaneNotification_ModelChanged
a plane's model changed
Definition: XPMPMultiplayer.h:625
@ xpmp_PlaneNotification_Created
a plane was just created
Definition: XPMPMultiplayer.h:624
unsigned int XPMPLightsPattern
Light flash pattern (unused in XPMP2)
Definition: XPMPMultiplayer.h:106
unsigned XPMPPlaneID
Unique ID for an aircraft created by a plugin.
Definition: XPMPMultiplayer.h:243
const char * XPMPMultiplayerInitLegacyData(const char *inCSLFolder, const char *inPluginName, const char *resourceDir, XPMPIntPrefsFuncTy inIntPrefsFunc=nullptr, const char *inDefaultICAO=nullptr, const char *inPluginLogAcronym=nullptr)
Deprecated legacy initialization of XPMP2.
Definition: XPMPMultiplayer.cpp:102
long size
structure size
Definition: XPMPMultiplayer.h:200
long size
size of structure
Definition: XPMPMultiplayer.h:80
const char * XPMPMultiplayerOBJ7SupportEnable(const char *inTexturePath)
Used to set the light textures for old OBJ7 models.
Definition: XPMPMultiplayer.cpp:222
const char * XPMPLoadCSLPackage(const char *inCSLFolder)
Loads CSL packages from the given folder, searching up to 5 folder levels deep.
Definition: XPMPMultiplayer.cpp:232
float spoilerRatio
spoiler extension ratio [0..1]
Definition: XPMPMultiplayer.h:151
float yokeHeading
yoke heading ratio [0..1]
Definition: XPMPMultiplayer.h:157
void XPMPDestroyPlane(XPMPPlaneID _id)
[Deprecated] Removes a plane previously created with XPMPCreatePlane()
Definition: XPMPMultiplayer.cpp:394
void XPMPSetPlaneVisibility(XPMPPlaneID _id, bool _bVisible)
Show/Hide the aircraft temporarily without destroying the object.
Definition: XPMPMultiplayer.cpp:402
void XPMPSetDefaultPlaneICAO(const char *_acIcaoType, const char *_carIcaoType=nullptr)
Define default aircraft and ground vehicle ICAO types.
Definition: XPMPMultiplayer.cpp:499
unsigned int lightFlags
this defaults to taxi | beacon | nav lights on
Definition: XPMPMultiplayer.h:120
float wingSweep
wing sweep ratio [0..1]
Definition: XPMPMultiplayer.h:154
float propRotDegree
prop rotation angle (degrees 0..360)
Definition: XPMPMultiplayer.h:168
XPMP2::Aircraft * XPMPGetAircraft(XPMPPlaneID _id)
Returns the underlying aircraft object, or nullptr if _id is invalid.
Definition: XPMPMultiplayer.cpp:492
float propRotRpm
prop rotation speed (rpm)
Definition: XPMPMultiplayer.h:169
char icaoAirline[4]
ICAO airline code.
Definition: XPMPMultiplayer.h:205
XPMPPlaneID XPMPCreatePlaneWithModelName(const char *inModelName, const char *inICAOCode, const char *inAirline, const char *inLivery, XPMPPlaneData_f inDataFunc, void *inRefcon, XPMPPlaneID inModeS_id=0)
Creates a new plane, providing a specific CSL model name.
Definition: XPMPMultiplayer.cpp:359
void XPMPGetModelInfo2(int inIndex, std::string &outModelName, std::string &outIcao, std::string &outAirline, std::string &outLivery)
Fetch information about a CSL model identified by an index.
Definition: XPMPMultiplayer.cpp:286
double lon
current position of aircraft (longitude)
Definition: XPMPMultiplayer.h:82
float tireDeflect
tire deflection (meters)
Definition: XPMPMultiplayer.h:162
float thrust
thrust ratio [0..1]
Definition: XPMPMultiplayer.h:155
void XPMPSetPluginName(const char *inPluginName, const char *inPluginLogAcronym=nullptr)
Overrides the plugin's name to be used in Log output.
Definition: XPMPMultiplayer.cpp:196
XPMPTransponderMode
These enumerations define the way the transponder of a given plane is operating.
Definition: XPMPMultiplayer.h:179
@ xpmpTransponderMode_ModeC
transponder is on
Definition: XPMPMultiplayer.h:182
@ xpmpTransponderMode_Mode3A
transponder is on
Definition: XPMPMultiplayer.h:181
@ xpmpTransponderMode_ModeC_Ident
transponder is on
Definition: XPMPMultiplayer.h:184
@ xpmpTransponderMode_ModeC_Low
transponder is on
Definition: XPMPMultiplayer.h:183
@ xpmpTransponderMode_Standby
transponder is in standby, not currently sending -> aircraft not visible on TCAS
Definition: XPMPMultiplayer.h:180
float speedBrakeRatio
speed brake extension ratio [0..1]
Definition: XPMPMultiplayer.h:152
void XPMPMultiplayerCleanup()
Clean up the multiplayer library.
Definition: XPMPMultiplayer.cpp:205
int multiIdx
OUT: set by XPMP2 to inform application about TCAS target index in use [1..63], with [1....
Definition: XPMPMultiplayer.h:92
void(* XPMPPlaneNotifier_f)(XPMPPlaneID inPlaneID, XPMPPlaneNotification inNotification, void *inRefcon)
Type of the callback function you provide, called when one of the events defined in XPMPPlaneNotifica...
Definition: XPMPMultiplayer.h:635
void XPMPDumpOneCycle(void)
Legacy debug-support function, no longer supported.
Definition: XPMPMultiplayer.cpp:581
float roll
roll [degrees, positive right]
Definition: XPMPMultiplayer.h:85
float tireRotDegree
tire rotation angle (degrees 0..360)
Definition: XPMPMultiplayer.h:163
int XPMPGetNumberOfInstalledModels()
Returns the number of loaded CSL models.
Definition: XPMPMultiplayer.cpp:248
void XPMPMultiplayerDisable()
Release TCAS targets control.
Definition: AIMultiplayer.cpp:1079
void XPMPGetModelInfo(int inIndex, const char **outModelName, const char **outIcao, const char **outAirline, const char **outLivery)
Fetch information about a CSL model identified by an index.
Definition: XPMPMultiplayer.cpp:254
bool XPMPDrawingAircraftLabels()
Returns if labels are currently configured to be drawn.
Definition: 2D.cpp:281
size_t XPMPAddModelDataRef(const std::string &dataRef)
Add a user-defined dataRef to the list of dataRefs supported by every plane.
Definition: Aircraft.cpp:978
float slatRatio
slats extension ratio [0..1]
Definition: XPMPMultiplayer.h:153
int XPMPGetPlaneModelQuality(XPMPPlaneID inPlane)
Returns the match quality of the currently used model, or -1 if inPlane is invalid.
Definition: XPMPMultiplayer.cpp:465
void XPMPSetPlaneRenderer(XPMPRenderPlanes_f inRenderer, void *inRef)
The original libxplanemp allowed to override rendering; no longer supported.
Definition: XPMPMultiplayer.cpp:576
long size
structure size
Definition: XPMPMultiplayer.h:148
void XPMPLoadPlanesIfNecessary()
Legacy function only provided for backwards compatibility. Does not actually do anything.
Definition: XPMPMultiplayer.cpp:244
char aptTo[5]
Destination airport (ICAO)
Definition: XPMPMultiplayer.h:209
void XPMPEnableAircraftLabels(bool _enable=true)
Enable or disable drawing of labels with the aircraft.
Definition: 2D.cpp:261
Textual information of planes to be passed on via shared dataRefs to other plugins.
Definition: XPMPMultiplayer.h:199
This data structure contains the basic position info for an aircraft.
Definition: XPMPMultiplayer.h:79
defines information about an aircraft visible to radar.
Definition: XPMPMultiplayer.h:189
External physical configuration of the plane.
Definition: XPMPMultiplayer.h:147
Defines, which lights of the aircraft are on.
Definition: XPMPMultiplayer.h:119
Actual representation of all aircraft in XPMP2.
Definition: XPMPAircraft.h:143
Definition: XPMPAircraft.h:40