Master/Client communication for aircraft synchronization on remote networked instances.
More...
|
#define | memcpy_min(to, from) std::memcpy(to,from,std::min(sizeof(from),sizeof(to))) |
|
#define | INFO_MC_SEND_WAIT "Listening to %s, waiting for someone being interested in our data..." |
|
#define | INFO_MC_SEND_RCVD "Received word from %s, will start sending aircraft data" |
|
#define | ERR_MC_THREAD "Exception in multicast handling: %s" |
|
#define | ERR_MC_MAX "Too many errors, I give up on remote functionality!" |
|
#define | INFO_MC_RECV_BEGIN "Receiver started listening to %s" |
|
#define | INFO_MC_RECV_RCVD "Receiver received data from %.*s on %s, will start message processing" |
|
|
constexpr int | XPMP2::REMOTE_RECV_BEACON_INTVL = 15 |
| How often to send an Interest Beacon? [s]. More...
|
|
constexpr float | XPMP2::REMOTE_SEND_AC_DETAILS_INTVL = 10.f |
| How often to send full a/c details? [s]. More...
|
|
mapRmtAcCacheTy | XPMP2::gmapRmtAcCache |
| Cache for last data sent out to the network. More...
|
|
unsigned | XPMP2::gFullUpdDue = 0 |
| What's the full update group that has its turn now? More...
|
|
unsigned | XPMP2::gFullUpdLastDone = 0 |
| the last actually processed full update group More...
|
|
unsigned | XPMP2::gNxtFullUpdGrpToAssign = 0 |
| What's the next group number to assign to the next a/c? (Assigned will be the value incremented by 1) More...
|
|
float | XPMP2::gNow = 0.0f |
| Current network timestamp. More...
|
|
float | XPMP2::gNxtTxfTime = 0.0f |
| When to actually process position updates next? More...
|
|
queueRmtDataTy | XPMP2::gqueueRmtData |
| the queue for passing data from main to network thread More...
|
|
std::condition_variable | XPMP2::gcvRmtData |
| notifies the network thread of available data to be processed More...
|
|
std::mutex | XPMP2::gmutexRmtData |
|
constexpr int | XPMP2::MC_MAX_ERR =5 |
| after this many errors we no longer try listening More...
|
|
std::thread | XPMP2::gThrMC |
| remote listening/sending thread More...
|
|
UDPMulticast * | XPMP2::gpMc = nullptr |
| multicast socket for listening/sending (destructor uses locks, which don't work during module shutdown, so can't create a global object due to its exit-time destructor) More...
|
|
volatile bool | XPMP2::gbStopMCThread = false |
| Shall the network thread stop? More...
|
|
bool | XPMP2::gbRemoteGaveUp = false |
| No longer try remote functionality, have seen to many errors. More...
|
|
float | XPMP2::gSendSettingsLast = 0.0f |
| Timestamp when we sent our settings the last time. More...
|
|
RmtMsgBufTy< RemoteAcDetailTy, RMT_MSG_AC_DETAILED, RMT_VER_AC_DETAIL > | XPMP2::gMsgAcDetail |
| A/C Detail message. More...
|
|
RmtMsgBufTy< RemoteAcPosUpdateTy, RMT_MSG_AC_POS_UPDATE, RMT_VER_AC_POS_UPDATE > | XPMP2::gMsgAcPosUpdate |
| A/C Position Update message. More...
|
|
RmtMsgBufTy< RemoteAcAnimTy, RMT_MSG_AC_ANIM, RMT_VER_AC_ANIM > | XPMP2::gMsgAcAnim |
| A/C Animation dataRefs message. More...
|
|
RmtMsgBufTy< RemoteAcRemoveTy, RMT_MSG_AC_REMOVE, RMT_VER_AC_REMOVE > | XPMP2::gMsgAcRemove |
| A/C Removal message. More...
|
|
RemoteCBFctTy | XPMP2::gRmtCBFcts |
| The callback function pointers the remote client plugin provided. More...
|
|
Master/Client communication for aircraft synchronization on remote networked instances.
- Author
- Birger Hoppe
- Copyright
- (c) 2020 Birger Hoppe
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.