namespace lmsg class MsgHeader

Message header class.

Public Methods

~MsgHeader(void)
Destructor.
MsgHeader(void)
Empty header constructor.
MsgHeader(count_t type, count_t length, const MsgAddr& dest)
Full constructor.
MsgHeader(const MsgHeader& hdr)
Copy constructor.
MsgHeader& operator=(const MsgHeader& hdr)
Assignment operator.
const MsgAddr& getDest(void) const
get the destination address.
const MsgAddr& getSource(void) const
Get the source address.
MsgAddr& getDest(void)
Get a reference to the destination address.
MsgAddr& getSource(void)
Get a reference to the source address.
MsgType getMsgType(void) const
Get the message type.
count_t getMsgLength(void) const
Get the message data length.
count_t getBlockID(void) const
Get the block ID.
count_t getTransID(void) const
Get the message transaction ID.
void Dump(std::ostream& out) const
Dump the header.
void Import(void)
Convert to internal format.
void Export(void)
Convert to external format.
void setDest(const MsgAddr& addr)
Set the destination address.
void setSource(const MsgAddr& addr)
Set the source address.
void setMsgType(MsgType type)
Set the type.
void setMsgLength(count_t length)
Set the data length.
void setBlockID(count_t id)
Set the block ID.
void setTransID(count_t id)
Set the transaction ID.

Documentation

The message header contains the message type and routing information.
~MsgHeader(void)
Message header destructor.

MsgHeader(void)
Construct an empty message header.

MsgHeader(count_t type, count_t length, const MsgAddr& dest)
Construct a message header with the specified type, length and destination.

MsgHeader(const MsgHeader& hdr)
Construct a message header identical to the argument header.
Parameters:
hdr - Meassage header to be copied.

MsgHeader& operator=(const MsgHeader& hdr)
The lhs message header is copied into this header.
Parameters:
hdr - Header to be copied.

const MsgAddr& getDest(void) const
The destination field of the message header is returned.
Returns:
The destination address.

const MsgAddr& getSource(void) const
The source field of the message header is returned.
Returns:
The source address.

MsgAddr& getDest(void)
A mutable reference to the destination address of the message header is returned.
Returns:
A mutable reference to the destination address.

MsgAddr& getSource(void)
A mutable reference to the source address of the message header is returned.
Returns:
A mutable reference to the source address.

MsgType getMsgType(void) const
The type field is returned from the message header.
Returns:
The message type.

count_t getMsgLength(void) const
The message data length field is returned from the header.
Returns:
The message data length.

count_t getBlockID(void) const
The block ID field is returned from the message header.
Returns:
The message Block ID.

count_t getTransID(void) const
The transaction identifier field is returned from the message header.
Returns:
The transaction identifier.

void Dump(std::ostream& out) const
Dump the contents of the message header to an output stream.
Parameters:
out - Stream to which the header is dumped.

void Import(void)
Translate the header contents from external (big endian) format to the local format.

void Export(void)
Translate the header contents from the local format to the external (big endian) format.

void setDest(const MsgAddr& addr)
Set the message header destination address.
Parameters:
addr - Address to which the destination field will be set.

void setSource(const MsgAddr& addr)
Set the message header source address.
Parameters:
addr - Address to which the message source field will be set.

void setMsgType(MsgType type)
Set the message type field.

void setMsgLength(count_t length)
Set the message data length field.

void setBlockID(count_t id)
Set the message block identifier field.

void setTransID(count_t id)
Set the transaction identifier field.


This class has no child classes.
Author:
J. Zweizig
Version:
1.1; Modified 2/1/2000

alphabetic index hierarchy of classes


generated by doc++