Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

DCDT_Msg Class Reference

Message object. More...

#include <DCDT_Msg.h>

List of all members.

Public Member Functions

 DCDT_Msg (int type, int priority)
 DCDT_Msg (int type)
 DCDT_Msg (DCDT_MsgHeader *h)
 ~DCDT_Msg ()
void SetType (int)
int AllocPayload (size_t size, void *buffer)
int SetPayload (void *p, int len)
int ReadType () const
int ReadAgoraID () const
void SetAgoraID (int ID)
int ReadMemberID () const
void SetMemberID (int ID)
int ReadPriority () const
int ReadPayloadLen () const
void * GetPayload () const
DCDT_MsgHeaderGetHeader () const
DCDT_TIME ReadCreationTime () const
void SetDeliveryWarranty (int new_del_warran)
int ReadDeliveryWarranty () const
void Increment_Readers_Counter ()
void Decrement_Readers_Counter ()
int Get_Readers_Counter () const

Private Attributes

DCDT_MsgHeaderheader
void * payload


Detailed Description

Message object.

The payload MUST be dynamically allocated.

Definition at line 91 of file DCDT_Msg.h.


Constructor & Destructor Documentation

DCDT_Msg::DCDT_Msg int  type,
int  priority
[inline]
 

Definition at line 95 of file DCDT_Msg.h.

References DCDT_MsgHeader, and GetTime().

DCDT_Msg::DCDT_Msg int  type  )  [inline]
 

Definition at line 110 of file DCDT_Msg.h.

References DCDT_MsgHeader, and GetTime().

DCDT_Msg::DCDT_Msg DCDT_MsgHeader h  )  [inline]
 

Definition at line 123 of file DCDT_Msg.h.

References DCDT_MsgHeader, and _DCDT_MsgHeader::Readers_Counter.

DCDT_Msg::~DCDT_Msg  )  [inline]
 

Definition at line 129 of file DCDT_Msg.h.


Member Function Documentation

int DCDT_Msg::AllocPayload size_t  size,
void *  buffer
[inline]
 

Definition at line 173 of file DCDT_Msg.h.

References header, payload, and _DCDT_MsgHeader::payload_len.

void DCDT_Msg::Decrement_Readers_Counter  )  [inline]
 

Definition at line 254 of file DCDT_Msg.h.

References header, DCDT_Mutex::lock(), _DCDT_MsgHeader::mtx, _DCDT_MsgHeader::Readers_Counter, and DCDT_Mutex::unlock().

int DCDT_Msg::Get_Readers_Counter  )  const [inline]
 

Definition at line 261 of file DCDT_Msg.h.

References header, DCDT_Mutex::lock(), _DCDT_MsgHeader::mtx, _DCDT_MsgHeader::Readers_Counter, and DCDT_Mutex::unlock().

DCDT_MsgHeader * DCDT_Msg::GetHeader  )  const [inline]
 

Definition at line 239 of file DCDT_Msg.h.

References DCDT_MsgHeader.

Referenced by DCDT_PostOffice::LogMsg(), UDPSocket::Send(), TCPSocket::Send(), InnerSocket::Send(), and DCDT_Channel_Serial::Send().

void * DCDT_Msg::GetPayload  )  const [inline]
 

Definition at line 235 of file DCDT_Msg.h.

Referenced by DCDT_LinkRx::DoYourJob(), DCDT_Member::DupMsg(), DCDT_PostOffice::LogMsg(), UDPSocket::Send(), TCPSocket::Send(), InnerSocket::Send(), DCDT_Channel_Serial::Send(), DCDT_InnerChannel::WaitConn(), and DCDT_Channel_IP::WaitConn().

void DCDT_Msg::Increment_Readers_Counter  )  [inline]
 

Definition at line 247 of file DCDT_Msg.h.

References header, DCDT_Mutex::lock(), _DCDT_MsgHeader::mtx, _DCDT_MsgHeader::Readers_Counter, and DCDT_Mutex::unlock().

Referenced by DCDT_PostOffice_SLWSM::AddMsg(), DCDT_PostOffice_SLWDC::AddMsg(), DCDT_PostOffice_SLWBU::AddMsg(), and DCDT_PostOffice_SLWDC::CleanupList().

int DCDT_Msg::ReadAgoraID  )  const [inline]
 

Definition at line 203 of file DCDT_Msg.h.

References _DCDT_MsgHeader::AgoraID, and header.

DCDT_TIME DCDT_Msg::ReadCreationTime  )  const [inline]
 

Definition at line 243 of file DCDT_Msg.h.

References _DCDT_MsgHeader::creation_time, DCDT_TIME, and header.

int DCDT_Msg::ReadDeliveryWarranty  )  const [inline]
 

Definition at line 219 of file DCDT_Msg.h.

References _DCDT_MsgHeader::delivery_warranty, and header.

Referenced by DCDT_Channel_IP::Send().

int DCDT_Msg::ReadMemberID  )  const [inline]
 

Definition at line 211 of file DCDT_Msg.h.

References header, and _DCDT_MsgHeader::MemberID.

int DCDT_Msg::ReadPayloadLen  )  const [inline]
 

Definition at line 231 of file DCDT_Msg.h.

References header, and _DCDT_MsgHeader::payload_len.

Referenced by DCDT_Member::DupMsg(), DCDT_PostOffice::LogMsg(), UDPSocket::Receive(), TCPSocket::Receive(), InnerSocket::Receive(), DCDT_Channel_Serial::Receive(), UDPSocket::Send(), TCPSocket::Send(), InnerSocket::Send(), and DCDT_Channel_Serial::Send().

int DCDT_Msg::ReadPriority  )  const [inline]
 

Definition at line 227 of file DCDT_Msg.h.

References header, and _DCDT_MsgHeader::priority.

Referenced by DCDT_Member::DupMsg().

int DCDT_Msg::ReadType  )  const [inline]
 

Definition at line 199 of file DCDT_Msg.h.

References header, and _DCDT_MsgHeader::type.

Referenced by DCDT_PostOffice_SLWSM::AddMsg(), DCDT_PostOffice_SLWDC::AddMsg(), DCDT_PostOffice_SLWBU::AddMsg(), DCDT_PostOffice_SLWDC::CleanupList(), DCDT_LinkTx::DoYourJob(), DCDT_LinkRx::DoYourJob(), DCDT_Member::DupMsg(), DCDT_PostOffice::LogMsg(), DCDT_PostOffice_SLWDC::ReadLastMsg(), DCDT_PostOffice_SLWBU::ReadLastMsg(), DCDT_PostOffice_SLWDC::ReadNextMsg(), DCDT_PostOffice_SLWBU::ReadNextMsg(), DCDT_InnerChannel::WaitConn(), and DCDT_Channel_IP::WaitConn().

void DCDT_Msg::SetAgoraID int  ID  )  [inline]
 

Definition at line 207 of file DCDT_Msg.h.

References _DCDT_MsgHeader::AgoraID, and header.

Referenced by DCDT_Member::CreateMsg().

void DCDT_Msg::SetDeliveryWarranty int  new_del_warran  )  [inline]
 

Definition at line 223 of file DCDT_Msg.h.

References _DCDT_MsgHeader::delivery_warranty, and header.

Referenced by DCDT_Member::CreateMsg(), and DCDT_LinkTx::DCDT_LinkTx().

void DCDT_Msg::SetMemberID int  ID  )  [inline]
 

Definition at line 215 of file DCDT_Msg.h.

References header, and _DCDT_MsgHeader::MemberID.

Referenced by DCDT_Member::CreateMsg().

int DCDT_Msg::SetPayload void *  p,
int  len
[inline]
 

Definition at line 190 of file DCDT_Msg.h.

References header, payload, and _DCDT_MsgHeader::payload_len.

Referenced by DCDT_LinkTx::DCDT_LinkTx(), DCDT_Member::DupMsg(), UDPSocket::Receive(), TCPSocket::Receive(), InnerSocket::Receive(), DCDT_Channel_Serial::Receive(), DCDT_InnerChannel::StartConn(), and DCDT_Channel_IP::StartConn().

void DCDT_Msg::SetType int   )  [inline]
 

Definition at line 169 of file DCDT_Msg.h.

References header, and _DCDT_MsgHeader::type.


Member Data Documentation

DCDT_MsgHeader* DCDT_Msg::header [private]
 

Definition at line 164 of file DCDT_Msg.h.

Referenced by AllocPayload(), Decrement_Readers_Counter(), Get_Readers_Counter(), Increment_Readers_Counter(), ReadAgoraID(), ReadCreationTime(), ReadDeliveryWarranty(), ReadMemberID(), ReadPayloadLen(), ReadPriority(), ReadType(), SetAgoraID(), SetDeliveryWarranty(), SetMemberID(), SetPayload(), and SetType().

void* DCDT_Msg::payload [private]
 

Definition at line 165 of file DCDT_Msg.h.

Referenced by AllocPayload(), and SetPayload().


The documentation for this class was generated from the following file:
Generated on Sun Jun 19 10:35:51 2005 for dcdt by  doxygen 1.3.9.1