GComm  0.2.3
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
gcomm::evs::Message Class Reference

#include <evs_message2.hpp>

Inheritance diagram for gcomm::evs::Message:
gcomm::evs::DelegateMessage gcomm::evs::GapMessage gcomm::evs::InstallMessage gcomm::evs::JoinMessage gcomm::evs::LeaveMessage gcomm::evs::UserMessage

Public Types

enum  Type {
  T_NONE = 0, T_USER = 1, T_DELEGATE = 2, T_GAP = 3,
  T_JOIN = 4, T_INSTALL = 5, T_LEAVE = 6
}
 

Public Member Functions

uint8_t version () const
 
Type type () const
 
bool is_membership () const
 
uint8_t user_type () const
 
Order order () const
 
seqno_t seq () const
 
seqno_t seq_range () const
 
seqno_t aru_seq () const
 
uint8_t flags () const
 
void set_source (const UUID &uuid)
 
const UUIDsource () const
 
const gcomm::ViewIdsource_view_id () const
 
const gcomm::ViewIdinstall_view_id () const
 
const UUIDrange_uuid () const
 
Range range () const
 
int64_t fifo_seq () const
 
const MessageNodeListnode_list () const
 
gu::datetime::Date tstamp () const
 
size_t unserialize (const gu::byte_t *buf, size_t buflen, size_t offset)
 
bool operator== (const Message &cmp) const
 
 Message (const Message &msg)
 
Messageoperator= (const Message &msg)
 
 Message (const uint8_t version=0, const Type type=T_NONE, const UUID &source=UUID::nil(), const ViewId &source_view_id=ViewId(), const ViewId &install_view_id=ViewId(), const uint8_t user_type=0xff, const Order order=O_DROP, const int64_t fifo_seq=-1, const seqno_t seq=-1, const seqno_t seq_range=-1, const seqno_t aru_seq=-1, const uint8_t flags=0, const UUID &range_uuid=UUID(), const Range range=Range(), const MessageNodeList &node_list=MessageNodeList())
 

Static Public Attributes

static const uint8_t F_MSG_MORE = 0x1
 
static const uint8_t F_RETRANS = 0x2
 
static const uint8_t F_SOURCE = 0x4
 Message source has been set explicitly via set_source()
 
static const uint8_t F_AGGREGATE = 0x8
 
static const uint8_t F_COMMIT = 0x10
 
static const uint8_t F_BC = 0x20
 

Protected Member Functions

size_t serialize (gu::byte_t *buf, size_t buflen, size_t offset) const
 
size_t serial_size () const
 

Protected Attributes

uint8_t version_
 
Type type_
 
uint8_t user_type_
 
Order order_
 
seqno_t seq_
 
seqno_t seq_range_
 
seqno_t aru_seq_
 
int64_t fifo_seq_
 
uint8_t flags_
 
UUID source_
 
ViewId source_view_id_
 
ViewId install_view_id_
 
UUID range_uuid_
 
Range range_
 
gu::datetime::Date tstamp_
 
MessageNodeList node_list_
 

Detailed Description

EVS message class

Member Enumeration Documentation

Enumerator
T_USER 

User generated message

T_DELEGATE 

Delegate message

T_GAP 

Gap message

T_JOIN 

Join message

T_INSTALL 

Install message

T_LEAVE 

Leave message

Constructor & Destructor Documentation

gcomm::evs::Message::Message ( const Message msg)
inline

Copy constructor.

gcomm::evs::Message::Message ( const uint8_t  version = 0,
const Type  type = T_NONE,
const UUID source = UUID::nil(),
const ViewId source_view_id = ViewId(),
const ViewId install_view_id = ViewId(),
const uint8_t  user_type = 0xff,
const Order  order = O_DROP,
const int64_t  fifo_seq = -1,
const seqno_t  seq = -1,
const seqno_t  seq_range = -1,
const seqno_t  aru_seq = -1,
const uint8_t  flags = 0,
const UUID range_uuid = UUID(),
const Range  range = Range(),
const MessageNodeList node_list = MessageNodeList() 
)
inline

Default constructor

Member Function Documentation

seqno_t gcomm::evs::Message::aru_seq ( ) const
inline

Get all-received-upto sequence number associated the the message.

Returns
All-received-upto sequence number associated to the message.
int64_t gcomm::evs::Message::fifo_seq ( ) const
inline

Get fifo sequence number associated to the message. This is applicable only for messages of membership type.

Returns
Fifo sequence number associated to the message.
uint8_t gcomm::evs::Message::flags ( ) const
inline

Get message flags.

Returns
Message flags.
bool gcomm::evs::Message::is_membership ( ) const
inline

Check wheter message is of membership type

Returns
True if message is of membership type, otherwise false

References T_INSTALL, T_JOIN, and T_LEAVE.

const MessageNodeList& gcomm::evs::Message::node_list ( ) const
inline

Get message node list.

Returns
Const reference to message node list.
Order gcomm::evs::Message::order ( ) const
inline

Get message order type.

Returns
Order type of the message.
Range gcomm::evs::Message::range ( ) const
inline

Get range associated to the message.

Returns
Range associated to the message.
const UUID& gcomm::evs::Message::range_uuid ( ) const
inline

Get range UUID associated to the message.

Returns
Range UUID associated to the message.
seqno_t gcomm::evs::Message::seq ( ) const
inline

Get sequence number associated to the message.

Returns
Const reference to sequence number associated to the message.
seqno_t gcomm::evs::Message::seq_range ( ) const
inline

Get sequence numer range associated to the message.

Returns
Sequence number range associated to the message.
void gcomm::evs::Message::set_source ( const UUID uuid)
inline

Set message source

Parameters
uuidSource node uuid

References F_SOURCE.

const UUID& gcomm::evs::Message::source ( ) const
inline

Get message source UUID.

Returns
Message source UUID.
const gcomm::ViewId& gcomm::evs::Message::source_view_id ( ) const
inline

Get message source view id, view where the message was originated from.

Returns
Message source view id.
gu::datetime::Date gcomm::evs::Message::tstamp ( ) const
inline

Get timestamp associated to the message.

Type gcomm::evs::Message::type ( ) const
inline

Get type of the message

Returns
Message type
uint8_t gcomm::evs::Message::user_type ( ) const
inline

Get user type of the message. This is applicable only for messages of type T_USER.

Returns
User type of the message.
uint8_t gcomm::evs::Message::version ( ) const
inline

Get version of the message

Returns
Version number

Member Data Documentation

const uint8_t gcomm::evs::Message::F_AGGREGATE = 0x8
static

Message contains aggregated payload

const uint8_t gcomm::evs::Message::F_BC = 0x20
static

Message was sent in backward compatibility mode

const uint8_t gcomm::evs::Message::F_MSG_MORE = 0x1
static

Sender has more messages to send

const uint8_t gcomm::evs::Message::F_RETRANS = 0x2
static

Message is resent upon request


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