Urbi SDK Remote for C++  2.7.5
urbi::UMessage Class Reference

Class containing all informations related to an URBI message. More...

#include <umessage.hh>

Collaboration diagram for urbi::UMessage:

List of all members.

Public Member Functions

 UMessage (UAbstractClient &client)
 UMessage (UAbstractClient &client, int timestamp, const char *tag, const char *message, const binaries_type &bins=binaries_type())
 Parser constructor.
 UMessage (UAbstractClient &client, int timestamp, const std::string &tag, const std::string &message, const binaries_type &bins=binaries_type())
 Likewise.
 UMessage (const UMessage &source)
 ~UMessage ()
 Free everything if data was copied, doesn't free anything otherwise.
 operator urbi::UValue & ()
 Return the message.
std::ostream & print (std::ostream &o) const
 Format as "[TIMESTAMP:TAG] (!!!|***)? CONTENTS".

Public Attributes

UAbstractClientclient
 Connection from which originated the message.
int timestamp
 Server-side timestamp.
std::string tag
 Associated tag.
UMessageType type
 The type of this message.
urbi::UValuevalue
 Set only if the message type is MESSAGE_DATA.
std::string message
 Set only if the message type is MESSAGE_SYSTEM or MESSAGE_ERROR.
std::string rawMessage
 Raw message without the binary data.

Private Member Functions

void init_ (const binaries_type &bins)
 Factor common code between ctors.

Detailed Description

Class containing all informations related to an URBI message.

Definition at line 35 of file umessage.hh.


Constructor & Destructor Documentation

urbi::UMessage::UMessage ( UAbstractClient client)

Definition at line 28 of file umessage.cc.

urbi::UMessage::UMessage ( UAbstractClient client,
int  timestamp,
const char *  tag,
const char *  message,
const binaries_type bins = binaries_type() 
)

Parser constructor.

Keeps a copy of tag and message.

Definition at line 66 of file umessage.cc.

References init_().

urbi::UMessage::UMessage ( UAbstractClient client,
int  timestamp,
const std::string &  tag,
const std::string &  message,
const binaries_type bins = binaries_type() 
)

Likewise.

Definition at line 78 of file umessage.cc.

References init_().

urbi::UMessage::UMessage ( const UMessage source)

Definition at line 90 of file umessage.cc.

References message, urbi::MESSAGE_ERROR, urbi::MESSAGE_SYSTEM, type, and value.

urbi::UMessage::~UMessage ( )

Free everything if data was copied, doesn't free anything otherwise.

Definition at line 111 of file umessage.cc.

References urbi::MESSAGE_ERROR, urbi::MESSAGE_SYSTEM, type, and value.


Member Function Documentation

void urbi::UMessage::init_ ( const binaries_type bins) [private]

Factor common code between ctors.

Works on rawMessage.

Definition at line 35 of file umessage.cc.

References client, message, urbi::MESSAGE_DATA, urbi::MESSAGE_ERROR, urbi::MESSAGE_SYSTEM, urbi::UValue::parse(), rawMessage, type, and value.

Referenced by UMessage().

urbi::UMessage::operator urbi::UValue & ( ) [inline]

Return the message.

Definition at line 55 of file umessage.hxx.

std::ostream & urbi::UMessage::print ( std::ostream &  o) const

Format as "[TIMESTAMP:TAG] (!!!|***)? CONTENTS".

Definition at line 118 of file umessage.cc.

References message, urbi::MESSAGE_DATA, urbi::MESSAGE_ERROR, urbi::MESSAGE_SYSTEM, tag, timestamp, type, and value.

Referenced by urbi::operator<<().


Member Data Documentation

Connection from which originated the message.

Definition at line 62 of file umessage.hh.

Referenced by init_().

Set only if the message type is MESSAGE_SYSTEM or MESSAGE_ERROR.

Definition at line 74 of file umessage.hh.

Referenced by urbi::UAbstractClient::clientError(), init_(), onError(), print(), and UMessage().

Raw message without the binary data.

Definition at line 76 of file umessage.hh.

Referenced by urbi::UAbstractClient::clientError(), and init_().

Server-side timestamp.

Definition at line 64 of file umessage.hh.

Referenced by urbi::UAbstractClient::clientError(), and print().


The documentation for this class was generated from the following files: