XPMP2
X-Plane multiplayer library 2 - using instancing
|
Master/Client communication for aircraft synchronization on remote networked instances. More...
Go to the source code of this file.
Classes | |
struct | XPMP2::RmtAcCacheTy |
Holds a copy of some aircraft data as was sent out last. More... | |
class | XPMP2::RmtDataBaseTy |
Base structure for passing information from XP's main thread to the multicast thread. More... | |
class | XPMP2::RmtDataEnqeueTy< ElemTy, MsgTy > |
Passing information about any data type (like a/c full detail message); the data is contained as copy. More... | |
class | XPMP2::RmtDataAcAnimTy |
Animation dataRef requires a special queue data type as each msg element is already of variable length. More... | |
class | XPMP2::RmtMsgBufTy< ElemTy, MsgTy, msgVer > |
Helper class to manage the temporary buffers in which the network message are put together. More... | |
union | XPMP2::RmtDataAcAnimTy.__unnamed8__ |
Namespaces | |
XPMP2 | |
Typedefs | |
typedef std::map< XPMPPlaneID, RmtAcCacheTy > | XPMP2::mapRmtAcCacheTy |
Defines a map with the plane id as key and the aboce cache structure as payload. More... | |
typedef std::unique_ptr< RmtDataBaseTy > | XPMP2::ptrRmtDataBaseTy |
Smart pointer to XPMP2::RmtDataBaseTy by which we manage objects of this and derived types. More... | |
typedef std::queue< ptrRmtDataBaseTy, std::list< ptrRmtDataBaseTy > > | XPMP2::queueRmtDataTy |
A queue managing the information objects, used to transfer data between main thread and network thread. More... | |
typedef RmtDataEnqeueTy< RemoteAcDetailTy, RMT_MSG_AC_DETAILED > | XPMP2::RmtDataAcDetailTy |
A/C Detail queue type. More... | |
typedef RmtDataEnqeueTy< RemoteAcPosUpdateTy, RMT_MSG_AC_POS_UPDATE > | XPMP2::RmtDataAcPosUpdateTy |
A/C Position Update queue type. More... | |
typedef RmtDataEnqeueTy< RemoteAcRemoveTy, RMT_MSG_AC_REMOVE > | XPMP2::RmtDataAcRemoveTy |
A/C Removal queue type. More... | |
typedef std::unique_ptr< RmtDataAcAnimTy > | XPMP2::ptrRmtDataAcAnimTy |
Smart pointer to XPMP2::RmtDataAcAnimTy. More... | |
Functions | |
void | XPMP2::RemoteInit () |
Initialize the module. More... | |
void | XPMP2::RemoteCleanup () |
Grace cleanup, stops all threads. More... | |
void | XPMP2::RemoteSenderUpdateStatus () |
Compares current vs. expected status and takes appropriate action. More... | |
void | XPMP2::RemoteAcEnqueueStarts (float now) |
void | XPMP2::RemoteAcEnqueue (const Aircraft &ac) |
Regularly called from the flight loop callback to send a/c date onto the network. More... | |
void | XPMP2::RemoteAcEnqueueDone () |
Informs us that all a/c have been processed: All pending messages to be sent now. More... | |
void | XPMP2::RemoteAcRemove (const Aircraft &ac) |
Informs us about an aircraft deletion. More... | |
void | XPMP2::RemoteAcClearAll () |
Informs us that there are no more aircraft, clear our caches! More... | |
Master/Client communication for aircraft synchronization on remote networked instances.
The network thread tries not to fiddle with main thread's data to reduce the need for synchronization through locks to the bare minimum. Instead the main thread passes a limited information set to the network thread by way of a deque.
union XPMP2::RmtDataAcAnimTy.__unnamed8__ |
Class Members | ||
---|---|---|
char | bufSize[RemoteAcAnimTy::msgSize(V_COUNT)] | a declaration that only makes sure that enough memory is reserved so that XPMP2::RmtDataAcAnimTy::data::v can fill up to max |
RemoteAcAnimTy | data | The animation dataRef values element. |