Sirikata
Namespaces | Defines | Typedefs | Functions
libcore/include/sirikata/core/network/Message.hpp File Reference
#include <sirikata/core/util/Platform.hpp>
Include dependency graph for Message.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Sirikata
 

Note: All the classes provided in this file are thin wrappers around the corresponding classes in ASIO.


Defines

#define MESSAGE_ID_SERVER_SHIFT   52
#define MESSAGE_ID_SERVER_BITS   0xFFF0000000000000LL
#define LOG_INVALID_MESSAGE(module, lvl, msg)
#define LOG_INVALID_MESSAGE_BUFFER(module, lvl, msg_begin, msg_size)

Typedefs

typedef uint64 Sirikata::UniqueMessageID

Functions

template<typename PBJMessageType >
std::string Sirikata::serializePBJMessage (const PBJMessageType &contents)
template<typename PBJMessageType >
bool Sirikata::serializePBJMessage (std::string *payload, const PBJMessageType &contents)
template<typename PBJMessageType , typename WireType >
bool Sirikata::parsePBJMessage (PBJMessageType *contents, const WireType &wire, uint32 offset=0, int32 length=-1)
 Parse a PBJ message from the wire, starting at the given offset from the .

Define Documentation

#define LOG_INVALID_MESSAGE (   module,
  lvl,
  msg 
)
#define LOG_INVALID_MESSAGE_BUFFER (   module,
  lvl,
  msg_begin,
  msg_size 
)
Value:
SILOG(module, lvl, "Error parsing message at " << __FILE__ << ":" << __LINE__ << " Contents: (" << msg_size << " bytes)"); \
    for(int _i__ = 0; _i__ < (int)msg_size; _i__++)                     \
        SILOG(module, lvl, "  " << (int)msg_begin[_i__] )

Referenced by Sirikata::TimeSyncServer::handleMessage(), Sirikata::LibproxProximity::handleObjectProximityMessage(), Sirikata::TimeSyncClient::handleSyncMessage(), Sirikata::StandardLocationService::locationUpdate(), and Sirikata::BulletPhysicsService::locationUpdate().

#define MESSAGE_ID_SERVER_BITS   0xFFF0000000000000LL
#define MESSAGE_ID_SERVER_SHIFT   52