protlib::message Class Reference
[Internal Messages]

internal messages More...

#include <source/ariba/utility/transport/tcpip/protlib/messages.h>

Inherited by protlib::TimerMsg, protlib::TPMsg, protlib::TPoverTCPMsg, and protlib::TPoverUDPMsg.

List of all members.

Public Types

enum  type_t {
  type_transport, type_timer, type_signaling, type_context,
  type_info, type_routing, type_API
}
 message type More...
enum  qaddr_t {
  qaddr_unknown, qaddr_transport, qaddr_timer, qaddr_coordination,
  qaddr_coordination_internal, qaddr_signaling, qaddr_policy, qaddr_resource,
  qaddr_routing, qaddr_accounting, qaddr_router_config, qaddr_tp_over_sctp,
  qaddr_tp_over_tcp, qaddr_tp_over_tls_tcp, qaddr_tp_over_udp, qaddr_tp_queryencap,
  qaddr_qos_nslp_timerprocessing, qaddr_qos_nslp_coordination, qaddr_qos_nslp_signaling, qaddr_appl_qos_signaling,
  qaddr_qos_appl_signaling, qaddr_gui, qaddr_api_0, qaddr_api_1,
  qaddr_api_2, qaddr_api_3, qaddr_api_4, qaddr_api_5,
  qaddr_api_6, qaddr_api_7, qaddr_api_wrapper_input, qaddr_tp_over_uds,
  qaddr_uds_appl_qos
}
 source ID More...
typedef gp_id_t id_t
 message ID

Public Member Functions

 message (type_t t, qaddr_t s=qaddr_unknown, id_t id=0)
 constructor
virtual ~message ()
 destructor
id_t get_id () const
 get ID
id_t set_id (id_t id)
 set ID or generate a new one
id_t new_id ()
 get new ID
type_t get_type () const
 get message type
FastQueueget_source_queue () const
 get source module queue
qaddr_t get_source () const
 get source ID
qaddr_t set_source (qaddr_t s)
 set source ID
const char * get_qaddr_name () const
 get name of message source
const char * get_type_name () const
 get name of message type
bool send (qaddr_t src, FastQueue *destqueue, bool exp=false)
 send the message to a queue
bool send (qaddr_t src, qaddr_t dest, bool exp=false)
 send the message
bool send_back (qaddr_t from, bool exp=false)
 send the message back
virtual void clear_pointers ()
 clear all pointers
bool send_to (qaddr_t dest, bool exp=false)
 send the message to dest
bool send_to (FastQueue *destqueue, bool exp=false)
void send_or_delete (qaddr_t src, qaddr_t dest, bool exp=false)
 send or delete the message
void send_to_or_delete (qaddr_t dest, bool exp=false)
void send_back_or_delete (qaddr_t src, bool exp=false)

Static Public Member Functions

static const char * get_qaddr_name (qaddr_t s)
 get source name
static const char * get_type_name (type_t t)
 get type name

Private Attributes

const type_t type
qaddr_t source
id_t msg_id

Static Private Attributes

static const char *const qaddr_string []
 printable message source names
static const char *const type_string []
 printable message typee names


Detailed Description

internal messages

Base class of all internal drm messages passed between modules.

Definition at line 58 of file messages.h.


Member Typedef Documentation

message ID

Each message has an ID. Message IDs are not unique, you can use the same ID e.g. for request and response. You cannot use an unused message ID, you can just reuse an already used ID. ID 0 sets an unused ID. Since id_t is 64-bit long, you can send 10^10 messages per seconds for over 30 years without reusing an ID.

Definition at line 120 of file messages.h.


Member Enumeration Documentation

source ID

Identifies the module which sent the message. If you add an id here, please add also the corresponding string in qaddr_string

Enumerator:
qaddr_unknown 
qaddr_transport 
qaddr_timer 
qaddr_coordination 
qaddr_coordination_internal 
qaddr_signaling 
qaddr_policy 
qaddr_resource 
qaddr_routing 
qaddr_accounting 
qaddr_router_config 
qaddr_tp_over_sctp 
qaddr_tp_over_tcp 
qaddr_tp_over_tls_tcp 
qaddr_tp_over_udp 
qaddr_tp_queryencap 
qaddr_qos_nslp_timerprocessing 
qaddr_qos_nslp_coordination 
qaddr_qos_nslp_signaling 
qaddr_appl_qos_signaling 
qaddr_qos_appl_signaling 
qaddr_gui 
qaddr_api_0 
qaddr_api_1 
qaddr_api_2 
qaddr_api_3 
qaddr_api_4 
qaddr_api_5 
qaddr_api_6 
qaddr_api_7 
qaddr_api_wrapper_input 
qaddr_tp_over_uds 
qaddr_uds_appl_qos 

Definition at line 76 of file messages.h.

message type

Each subclass of class message has its own unique type.

Enumerator:
type_transport 
type_timer 
type_signaling 
type_context 
type_info 
type_routing 
type_API 

Definition at line 62 of file messages.h.


Member Function Documentation

static const char* protlib::message::get_type_name ( type_t  t  )  [inline, static]

get type name

Definition at line 146 of file messages.h.

References type_string.

const char* protlib::message::get_type_name (  )  const [inline]

get name of message type

Definition at line 144 of file messages.h.

References type, and type_string.

Referenced by protlib::TimerModule::process_queue(), and protlib::TPoverTCP::sender_thread().

void protlib::message::send_back_or_delete ( qaddr_t  src,
bool  exp = false 
) [inline]

Definition at line 162 of file messages.h.

References send_back().

void protlib::message::send_or_delete ( qaddr_t  src,
qaddr_t  dest,
bool  exp = false 
) [inline]

send or delete the message

Definition at line 160 of file messages.h.

References send().

void protlib::message::send_to_or_delete ( qaddr_t  dest,
bool  exp = false 
) [inline]

Definition at line 161 of file messages.h.

References send_to().


Member Data Documentation

Definition at line 169 of file messages.h.

Referenced by get_id(), new_id(), and set_id().

Definition at line 168 of file messages.h.

Referenced by get_qaddr_name(), get_source(), get_source_queue(), send(), send_back(), and set_source().

const type_t protlib::message::type [private]

Reimplemented in protlib::TPoverTCPMsg, and protlib::TPoverUDPMsg.

Definition at line 167 of file messages.h.

Referenced by get_type(), and get_type_name().


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

Generated on Fri Aug 14 23:39:52 2009 for Ariba by  doxygen 1.5.8