-
Notifications
You must be signed in to change notification settings - Fork 277
Message
Represents a message received from an X-Plane Connect client.
#####Message Methods
######ReadFrom
Signature: static Message ReadFrom(const UDPSocket& sock);
Reads a datagram from the given socket and interprets it as a Message. Because message formats are relatively free-form, no validation is done by the base Message class. At some point in the future, the plugin may be refactored to expect specialized derivations of the Message class for each command type.
######GetHead
Signature: std::string GetHead() const;
Gets the 4 character header that identifies the message type.
######GetBuffer
Signature: const unsigned char* GetBuffer() const;
Gets a pointer to the buffer underlying the message.
######GetSize
Signature: std::size_t GetSize() const;
Gets the size of the buffer returned by GetBuffer
.
######PrintToLog
Signature: void PrintToLog() const;
Prints the raw message bytes to the log.
#####Message Private Methods
######Constructor
Signature: Message()
Empty constructor. Implemented to ensure all messages are initialized from
the ReadFrom
method.