Classes | Public Types | Public Member Functions | Public Attributes | Static Public Attributes

JAUS::Header Class Reference

JAUS Message Header Structure used by the Transport Services. More...

#include <header.h>

List of all members.

Classes

class  AckNack
 Class containing constants for acknowledgement or negative acknowledgment of message receipt. More...
class  Broadcast
 Class containing constants for broadcast flags. More...
class  Compression
 Class containing constants for header compression flags. More...
class  DataControl
 Class containing constants for different types of data control values. More...
class  MessageType
 Class containing constants for message type flags used in the header. More...
class  Priority
 Class containing constants for different types of priority values in the JAUS transport header. More...

Public Types

typedef std::vector< HeaderList
 Vector of Header data.

Public Member Functions

 Header ()
 Constructor, initializes default values.
 Header (const Header &header)
 Copy constructor.
 ~Header ()
 Destructor.
int Write (Packet &packet) const
 Writes header data to a packet for transmission.
int Read (const Packet &packet)
 Reads header data from the current read position in the packet.
bool IsValid (std::string *errorMessage) const
 Checks for valid header data.
Headeroperator= (const Header &header)
 Sets equal to.

Public Attributes

Byte mMessageType
 Type of message being sent through transport layer (does not indicate payload type).
Address mDestinationID
 Destination ID/Address.
Address mSourceID
 Source ID/Address.
UShort mSequenceNumber
 Sequence number of packet (used for multi-packet streams).
UShort mSize
 Size of the transport packet including general header in bytes.
Byte mPriorityFlag
 Message priority flag.
Byte mBroadcastFlag
 Broadcast flag.
Byte mAckNackFlag
 ACK/NACK flag.
Byte mControlFlag
 Data control flags (single or mulit-packet streams).
Byte mCompressionFlag
 Header compression bits (header compression not supported by JAUS++).

Static Public Attributes

static const UShort MinSize = 14
 Minimum header size.
static const UShort PayloadOffset = MinSize - USHORT_SIZE
 Offset from start of general header to payload.
static const UShort MaxPacketSize = JAUS_USHORT_MAX
 Maximum packet size including header.

Detailed Description

JAUS Message Header Structure used by the Transport Services.

The JAUS Transport header is defined by the AS5669A Standard.

Definition at line 59 of file header.h.


Member Typedef Documentation

typedef std::vector<Header> JAUS::Header::List

Vector of Header data.

Definition at line 150 of file header.h.


Constructor & Destructor Documentation

Header::Header (  )

Constructor, initializes default values.

Definition at line 51 of file header.cpp.

Header::Header ( const Header header )

Copy constructor.

Definition at line 68 of file header.cpp.

Header::~Header (  )

Destructor.

Definition at line 79 of file header.cpp.


Member Function Documentation

bool Header::IsValid ( std::string *  errorMessage ) const

Checks for valid header data.

Parameters:
[out]errorMessageIf not NULL, then the reason for a header being invalid is saved to this string.
Returns:
True if a valid header, false otherwise.

Definition at line 172 of file header.cpp.

Header & Header::operator= ( const Header header )

Sets equal to.

Definition at line 230 of file header.cpp.

int Header::Read ( const Packet packet )

Reads header data from the current read position in the packet.

Parameters:
[in]packetThe packet to read from.
Returns:
Number of bytes read from packet, 0 on failure.

Definition at line 130 of file header.cpp.

int Header::Write ( Packet packet ) const

Writes header data to a packet for transmission.

Writes from the current Write Position in the packet.

Parameters:
[out]packetThe packet to write to.
Returns:
Number of bytes written to packet, 0 on failure.

Definition at line 95 of file header.cpp.


Member Data Documentation

ACK/NACK flag.

Definition at line 165 of file header.h.

Maximum packet size including header.

Definition at line 149 of file header.h.

Broadcast flag.

Definition at line 164 of file header.h.

Header compression bits (header compression not supported by JAUS++).

Definition at line 167 of file header.h.

Data control flags (single or mulit-packet streams).

Definition at line 166 of file header.h.

Destination ID/Address.

Definition at line 159 of file header.h.

const UShort JAUS::Header::MinSize = 14 [static]

Minimum header size.

Definition at line 147 of file header.h.

Type of message being sent through transport layer (does not indicate payload type).

Definition at line 158 of file header.h.

Message priority flag.

Definition at line 163 of file header.h.

Sequence number of packet (used for multi-packet streams).

Definition at line 161 of file header.h.

Size of the transport packet including general header in bytes.

Definition at line 162 of file header.h.

Source ID/Address.

Definition at line 160 of file header.h.

Offset from start of general header to payload.

Definition at line 148 of file header.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines