fgms 0.11.8
The
FlightGear MultiPlayer Server
project
mpmessages.hxx File Reference

Message definitions for multiplayer communications within multiplayer Flightgear. More...

#include <vector>
#include <simgear/compiler.h>
#include <simgear/math/SGMath.hxx>
#include "tiny_xdr.hxx"

Go to the source code of this file.

Classes

struct  FGExternalMotionData
 Motion Message. More...
 
struct  FGFloatPropertyData
 Property Data. More...
 
struct  T_MsgHdr
 The header sent as the first part of all mp message packets. More...
 
struct  T_PositionMsg
 A Position Message. More...
 
struct  T_PropertyMsg
 Property Message. More...
 

Macros

#define MAX_CALLSIGN_LEN   8
 Maximum length of a callsign. More...
 
#define MAX_CHAT_MSG_LEN   256
 Maximum length of a chat message. More...
 
#define MAX_MODEL_NAME_LEN   96
 Maximum length of a model name, eg /model/x17/aero-123.xml. More...
 
#define MAX_PROPERTY_LEN   52
 Maximum length of property. More...
 
#define POS_DATA_ID   7
 ID of a "position" message, and the most trafficked. More...
 

Variables

const uint32_t MSG_MAGIC = 0x46474653
 The Magic value for message (currently FGFS). The magic is at the start of every packet and is used for packet validation. More...
 
const uint32_t PROTO_VER = 0x00010001
 The MP protocol version that is send with each packet (currently 1.1). More...
 

Detailed Description

Message definitions for multiplayer communications within multiplayer Flightgear.

Author
Duncan McCreanor
  • Each message used for multiplayer communications consists of a header and optionally a block of data.
  • The combined header and data is sent as one IP packet, XDR encoded.
    Note
    XDR demands 4 byte alignment, but some compilers use 8 byte alignment, so it's safe to let the overall size of a network message be a multiple of 8!

Definition in file mpmessages.hxx.

Macro Definition Documentation

#define MAX_CALLSIGN_LEN   8

Maximum length of a callsign.

Definition at line 60 of file mpmessages.hxx.

#define MAX_CHAT_MSG_LEN   256

Maximum length of a chat message.

Definition at line 64 of file mpmessages.hxx.

#define MAX_MODEL_NAME_LEN   96

Maximum length of a model name, eg /model/x17/aero-123.xml.

Definition at line 67 of file mpmessages.hxx.

#define MAX_PROPERTY_LEN   52

Maximum length of property.

Definition at line 70 of file mpmessages.hxx.

#define POS_DATA_ID   7

ID of a "position" message, and the most trafficked.

Definition at line 57 of file mpmessages.hxx.

Referenced by FG_SERVER::HandlePacket(), and FG_SERVER::PacketIsValid().

Variable Documentation

const uint32_t MSG_MAGIC = 0x46474653

The Magic value for message (currently FGFS). The magic is at the start of every packet and is used for packet validation.

Definition at line 49 of file mpmessages.hxx.

Referenced by FG_SERVER::HandlePacket(), and FG_SERVER::PacketIsValid().

const uint32_t PROTO_VER = 0x00010001

The MP protocol version that is send with each packet (currently 1.1).

Definition at line 54 of file mpmessages.hxx.

Referenced by FG_SERVER::FG_SERVER(), and FG_SERVER::PacketIsValid().