My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
gcp::util::AntNum Class Reference

#include <AntNum.h>

Public Types

enum  Id {
  ANTNONE = 0, ANT0 = 1, ANT1 = 2, ANT2 = 4,
  ANT3 = 8, ANT4 = 16, ANT5 = 32, ANT6 = 64,
  ANT7 = 128, ANTMAX = ANT0, ANTALL = ANT0
}
 

Public Member Functions

 AntNum (Id id)
 
 AntNum (unsigned int)
 
 AntNum ()
 
 AntNum (const AntNum &antNum)
 
 AntNum (AntNum *antNum)
 
bool isValidSingleAnt ()
 
std::string getObjectName ()
 
std::string getEventChannelName ()
 
std::string getAntennaName ()
 
std::string getString ()
 
std::string getLoggerPrefix ()
 
unsigned int getDelayEngineIntId ()
 
unsigned int getIntId ()
 
Id getId ()
 
unsigned short getDcAntennaIndex ()
 
unsigned short getDcNodeIndex ()
 
unsigned int getAntMax ()
 
void set (AntNum::Id id)
 
bool isSet (unsigned id)
 
bool isSet (AntNum::Id id)
 
bool isSet (AntNum &antNum)
 
bool isSet (AntNum *antNum)
 
void setId (AntNum::Id)
 
void setId (unsigned int id)
 
void setId (const AntNum &antNum)
 
void setIdFromHost ()
 
std::string printAntennaSet ()
 
std::string printAntennaSet (AntNum::Id id)
 
const AntNum operator+ (const AntNum &rx)
 
bool operator< (const AntNum rx)
 
bool operator<= (const AntNum rx)
 
bool operator> (const AntNum rx)
 
bool operator>= (const AntNum rx)
 
bool operator== (const AntNum rx)
 
const AntNumoperator++ ()
 
const AntNum operator++ (int)
 

Static Public Member Functions

static bool isValidSingleAnt (Id antId)
 
static AntNum::Id intToId (unsigned int iant)
 
static unsigned idToInt (AntNum::Id id)
 

Public Attributes

enum gcp::util::AntNum::Id id_
 

Static Public Attributes

static const unsigned int NANT = 1
 
static const unsigned int NBASE = (NANT*(NANT-1))/2
 

Friends

std::ostream & operator<< (std::ostream &os, const AntNum &rx)
 
AntNum::Id operator+ (const AntNum::Id id1, const AntNum::Id id2)
 
AntNum::Id operator- (const AntNum::Id id1, const AntNum::Id id2)
 
bool isValidAnt (unsigned int ant)
 
bool isValidAntennaSet (AntNum::Id antennas)
 
std::string printAntennaSet (AntNum::Id antennas)
 
AntNum::Id intToId (unsigned int iant)
 
unsigned idToInt (AntNum::Id id)
 

Detailed Description

A class to enumerate a single Antenna, or a set of Antennas.

Member Enumeration Documentation

Enumerate known receivers

Constructor & Destructor Documentation

AntNum::AntNum ( Id  id)

Constructor with Antenna enumerator

....................................................................... Constructor with enumerator

AntNum::AntNum ( unsigned int  iant)

Constructor with Antenna number as int

Exceptions
Exception....................................................................... Constructor with integer ant
AntNum::AntNum ( )

Constructor with uninitialized antenna

....................................................................... Constructor with no arguments

AntNum::AntNum ( const AntNum antNum)

Copy constructor

Exceptions
Exception....................................................................... Copy constructor.
AntNum::AntNum ( AntNum antNum)

Copy constructor

Exceptions
Exception....................................................................... Copy constructor.

Member Function Documentation

string AntNum::getAntennaName ( )

Return a board name in the register database constructed from this Antenna enumerator

....................................................................... Construct a register map name out of this Antenna enumerator.

unsigned int AntNum::getAntMax ( )

Return the maximum number of antennas we know about

....................................................................... Return the maximum number of antennas

unsigned short AntNum::getDcAntennaIndex ( )

Return an integer antenna index suitable for passing to downconverter API methods.

Exceptions
Exceptionif this enumerator does not represent a single valid antenna.

....................................................................... Return the integer Antenna index suitable for passing to the downconverter API.

Exceptions
Exceptionif this enumerator does not represent a single valid antenna.
unsigned short AntNum::getDcNodeIndex ( )

....................................................................... Return the integer Antenna index suitable for passing to the downconverter API.

Exceptions
Exceptionif this enumerator does not represent a single valid antenna.
unsigned int AntNum::getDelayEngineIntId ( )

Return an integer antenna index associated with this enumerator, as expected by the delay engine.

Exceptions
Exceptionif this enumerator does not represent a single valid antenna.

....................................................................... Return the integer Antenna Id associated with this enumerator expected by the delay engine.

Exceptions
Exceptionif this enumerator does not represent a single valid antenna.
string AntNum::getEventChannelName ( )

Return a CORBA object name constructed from this Antenna enumerator

....................................................................... Construct a CORBA object name associated with this antenna enumerator.

AntNum::Id AntNum::getId ( )

Return the antenna id associated with this enumerator.

....................................................................... Return the antenna id associated with this enumerator.

unsigned int AntNum::getIntId ( )

Return an integer antenna index associated with this enumerator.

Exceptions
Exceptionif this enumerator does not represent a single valid antenna.

....................................................................... Return the integer Antenna Id associated with this enumerator.

Exceptions
Exceptionif this enumerator does not represent a single valid antenna.
string AntNum::getLoggerPrefix ( )

Return a prefix suitable for use in logging

....................................................................... Construct a logger prefix

string AntNum::getObjectName ( )

Return a CORBA object name constructed from this Antenna enumerator

....................................................................... Construct a CORBA object name associated with this antenna enumerator.

std::string AntNum::getString ( )

Return a string representation of this antenna set

....................................................................... Generate a string representation of this antenna set

unsigned AntNum::idToInt ( AntNum::Id  id)
static

Convert from integer index to enumerator

....................................................................... Convert from receiver index to enumerator

AntNum::Id AntNum::intToId ( unsigned int  iant)
static

Convert from integer index to enumerator

....................................................................... Convert from receiver index to enumerator

bool AntNum::isSet ( unsigned  id)

Return true if the passed id is part of this object's antenna set.

....................................................................... Return true if the passed Id is part of this object's antenna set.

bool AntNum::isSet ( AntNum::Id  id)

Return true if the passed id is part of this object's antenna set.

....................................................................... Return true if the passed Id is part of this object's antenna set.

bool AntNum::isSet ( AntNum antNum)

Return true if the passed AntNum's id is part of this object's antenna set.

....................................................................... Return true if the passed antenna is part of this object's antenna set.

bool AntNum::isSet ( AntNum antNum)

Return true if the passed AntNum's id is part of this object's antenna set.

....................................................................... Return true if the passed antenna is part of this object's antenna set.

bool AntNum::isValidSingleAnt ( )

Check if this object specifies a valid single receiver

....................................................................... Return true if this is a valid single ant

bool AntNum::isValidSingleAnt ( Id  antId)
static

....................................................................... Return true if this is a valid single ant

const AntNum AntNum::operator+ ( const AntNum ant)

Add two antenna enumerators

....................................................................... Addition operator for AntNum. Allows expressions like ant1 + ant2

const AntNum & AntNum::operator++ ( )

Prefix increment

....................................................................... Prefix increment operator

const AntNum AntNum::operator++ ( int  )

Postfix increment

....................................................................... Post-fix increment operator

bool AntNum::operator< ( const AntNum  ant)

Define < for two antenna enumerators

....................................................................... Less than operator for AntNum. Allows expressions like ant0 < ant1

bool AntNum::operator<= ( const AntNum  ant)

Define <= for two antenna enumerators

....................................................................... Less than equals operator for AntNum. Allows expressions like ant0 <= ant1

bool AntNum::operator== ( const AntNum  ant)

Define equality for two antenna enumerators

....................................................................... Equals operator for AntNum. Allows expressions like ANT0 == ANT1

bool AntNum::operator> ( const AntNum  ant)

Define > for two antenna enumerators

....................................................................... Greater than operator for AntNum. Allows expressions like ant0 > ant1

bool AntNum::operator>= ( const AntNum  ant)

Define >= for two antenna enumerators

....................................................................... Greater than equals operator for AntNum. Allows expressions like ant0 >= ant1

std::string AntNum::printAntennaSet ( )

Return a string representing an antenna set.

....................................................................... Return a string representing our antenna set.

std::string AntNum::printAntennaSet ( AntNum::Id  id)

....................................................................... Return a string representing an antenna set.

void AntNum::set ( AntNum::Id  id)

Set the antennas represented by this object

....................................................................... Set the antennas represented by this object

void AntNum::setId ( AntNum::Id  id)

Set the id of this antenna enumerator.

....................................................................... Set the id of this antenna enumerator.

void AntNum::setId ( unsigned int  id)

Set the id of this antenna enumerator.

....................................................................... Set the id of this antenna enumerator.

void AntNum::setId ( const AntNum antNum)

Set the id of this antenna enumerator.

....................................................................... Set the id of this antenna enumerator.

void AntNum::setIdFromHost ( )

Set the id of this antenna enumerator from the name of the host machine

....................................................................... Initialize this antenna enumerator from the host name.

Friends And Related Function Documentation

unsigned idToInt ( AntNum::Id  id)
friend

Convert from integer index to enumerator

AntNum::Id intToId ( unsigned int  iant)
friend

Convert from integer index to enumerator

bool isValidAnt ( unsigned int  ant)
friend

Return true if the passed index specifies a valid receiver

bool isValidAntennaSet ( AntNum::Id  antennas)
friend

Return true if the passed index specifies a valid antenna set.

AntNum::Id operator+ ( const AntNum::Id  id1,
const AntNum::Id  id2 
)
friend

Allows expressions like ANT0+ANT1

AntNum::Id operator- ( const AntNum::Id  id1,
const AntNum::Id  id2 
)
friend

Allows expressions like ANTALL-ANT1

std::ostream& operator<< ( std::ostream &  os,
const AntNum rx 
)
friend

Allows cout << ant

std::string printAntennaSet ( AntNum::Id  antennas)
friend

Return a string representing an antenna set.


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