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

JAUS::Address Class Reference

An address is a JAUS Identiifer to represent a communication endpoint. More...

#include <address.h>

List of all members.

Public Types

typedef std::set< AddressSet
 STL set of Address structures.
typedef std::vector< AddressList
 STL vector of Address structures.

Public Member Functions

 Address (const UShort subsystem=0, const Byte node=0, const Byte component=0)
 Address (const Address &id)
 Address (const UInt id)
 ~Address ()
void Clear ()
void Print () const
std::string ToString () const
 operator UInt () const
bool IsValid () const
bool IsBroadcast () const
UInt ToUInt () const
bool operator== (const Address &id) const
bool operator== (const UInt id) const
bool operator!= (const Address &id) const
bool operator< (const Address &id) const
bool operator<= (const Address &id) const
bool operator> (const Address &id) const
bool operator>= (const Address &id) const
Addressoperator() (const UShort subsystem, const Byte node, const Byte component)
Addressoperator= (const Address &id)
Addressoperator= (const UInt id)

Static Public Member Functions

static Address FromString (const std::string &str)
static bool DestinationMatch (const Address &dest, const Address id)
static bool SetCompare (const Set &prev, const Set &current, Set &newData, Set &lostData, const bool clear=true)
 Compares two sets of Addresses to see if there are differences.
static Address::List ToList (const Address::Set &s)
static Address::Set ToSet (const Address::List &list)
static bool IsReservedComponentID (const Byte value)

Public Attributes

UShort mSubsystem
 Subsystem ID.
Byte mNode
 Node ID.
Byte mComponent
 Component ID.

Static Public Attributes

static const UShort GlobalBroadcast = 0xFFFF
 Global Broadcast ID.
static const Byte LocalBroadcast = 0xFF
 Local Broadcast ID.

Detailed Description

An address is a JAUS Identiifer to represent a communication endpoint.

The Address class (typedef ID) is used as an Identifier for a component so that it can receive and send messages.

Definition at line 64 of file address.h.


Member Typedef Documentation

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

STL vector of Address structures.

Definition at line 68 of file address.h.

typedef std::set<Address> JAUS::Address::Set

STL set of Address structures.

Definition at line 67 of file address.h.


Constructor & Destructor Documentation

JAUS::Address::Address ( const UShort  subsystem = 0,
const Byte  node = 0,
const Byte  component = 0 
) [inline]

Definition at line 71 of file address.h.

JAUS::Address::Address ( const Address id ) [inline]

Definition at line 78 of file address.h.

JAUS::Address::Address ( const UInt  id ) [inline]

Definition at line 84 of file address.h.

JAUS::Address::~Address (  ) [inline]

Definition at line 88 of file address.h.


Member Function Documentation

void JAUS::Address::Clear (  ) [inline]

Definition at line 89 of file address.h.

static bool JAUS::Address::DestinationMatch ( const Address dest,
const Address  id 
) [inline, static]

Definition at line 144 of file address.h.

static Address JAUS::Address::FromString ( const std::string &  str ) [inline, static]

Definition at line 103 of file address.h.

bool JAUS::Address::IsBroadcast (  ) const [inline]

Definition at line 127 of file address.h.

static bool JAUS::Address::IsReservedComponentID ( const Byte  value ) [inline, static]

Definition at line 297 of file address.h.

bool JAUS::Address::IsValid (  ) const [inline]

Definition at line 116 of file address.h.

JAUS::Address::operator UInt (  ) const [inline]

Definition at line 110 of file address.h.

bool JAUS::Address::operator!= ( const Address id ) const [inline]

Definition at line 250 of file address.h.

Address& JAUS::Address::operator() ( const UShort  subsystem,
const Byte  node,
const Byte  component 
) [inline]

Definition at line 276 of file address.h.

bool JAUS::Address::operator< ( const Address id ) const [inline]

Definition at line 260 of file address.h.

bool JAUS::Address::operator<= ( const Address id ) const [inline]

Definition at line 264 of file address.h.

Address& JAUS::Address::operator= ( const UInt  id ) [inline]

Definition at line 290 of file address.h.

Address& JAUS::Address::operator= ( const Address id ) [inline]

Definition at line 283 of file address.h.

bool JAUS::Address::operator== ( const UInt  id ) const [inline]

Definition at line 246 of file address.h.

bool JAUS::Address::operator== ( const Address id ) const [inline]

Definition at line 236 of file address.h.

bool JAUS::Address::operator> ( const Address id ) const [inline]

Definition at line 268 of file address.h.

bool JAUS::Address::operator>= ( const Address id ) const [inline]

Definition at line 272 of file address.h.

void JAUS::Address::Print (  ) const [inline]

Definition at line 93 of file address.h.

static bool JAUS::Address::SetCompare ( const Set prev,
const Set current,
Set newData,
Set lostData,
const bool  clear = true 
) [inline, static]

Compares two sets of Addresses to see if there are differences.

This method is used to compare a previous list of Address with a new one to find lost or new values in the current set versus the previous.

Parameters:
prevPrevious set of addresses.
currentThe latest set of addresses.
newDataData that is in the current set that was not in the previous.
lostDataData that was in the previous set, but is not in the current.
clearIf true, newData and lostData are cleared before a comparison is made (default).
Returns:
True if there is a diffance, otherwise false.

Definition at line 173 of file address.h.

static Address::List JAUS::Address::ToList ( const Address::Set s ) [inline, static]

Definition at line 212 of file address.h.

static Address::Set JAUS::Address::ToSet ( const Address::List list ) [inline, static]

Definition at line 224 of file address.h.

std::string JAUS::Address::ToString (  ) const [inline]

Definition at line 97 of file address.h.

UInt JAUS::Address::ToUInt (  ) const [inline]

Definition at line 137 of file address.h.


Member Data Documentation

const UShort JAUS::Address::GlobalBroadcast = 0xFFFF [static]

Global Broadcast ID.

Definition at line 69 of file address.h.

const Byte JAUS::Address::LocalBroadcast = 0xFF [static]

Local Broadcast ID.

Definition at line 70 of file address.h.

Component ID.

Definition at line 311 of file address.h.

Node ID.

Definition at line 310 of file address.h.

Subsystem ID.

Definition at line 309 of file address.h.


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