1 #ifndef SZA_UTIL_ANTNUM_H
2 #define SZA_UTIL_ANTNUM_H
29 static const unsigned int NANT = 8;
30 static const unsigned int NBASE = (NANT*(NANT-1))/2;
48 ANTALL = ANT0 | ANT1 | ANT2 | ANT3 | ANT4 | ANT5 | ANT6 | ANT7
149 unsigned short getDcNodeIndex();
150 unsigned short getCarmaAntennaIndex();
166 bool isSet(
unsigned id);
194 void setId(
unsigned int id);
326 bool isValidAnt(
unsigned int ant);
331 std::ostream& operator<<(std::ostream& os,
const AntNum& rx);
348 bool isValidAnt(
unsigned int ant);
358 std::string printAntennaSet(
AntNum::Id antennas);
bool operator>(const AntNum rx)
Define > for two antenna enumerators.
A class to enumerate a single Antenna, or a set of Antennas.
std::string getLoggerPrefix()
Return a prefix suitable for use in logging.
std::string getAntennaName()
Return a board name in the register database constructed from this Antenna enumerator.
bool operator<=(const AntNum rx)
Define <= for two antenna enumerators.
const AntNum operator+(const AntNum &rx)
Add two antenna enumerators.
static AntNum::Id intToId(unsigned int iant)
Convert from integer index to enumerator.
std::string getObjectName()
Return a CORBA object name constructed from this Antenna enumerator.
bool operator>=(const AntNum rx)
Define >= for two antenna enumerators.
friend bool isValidAntennaSet(AntNum::Id antennas)
Return true if the passed index specifies a valid antenna set.
bool isValidSingleAnt()
Check if this object specifies a valid single receiver.
void set(AntNum::Id id)
Set the antennas represented by this object.
friend AntNum::Id operator-(const AntNum::Id id1, const AntNum::Id id2)
Allows expressions like ANTALL-ANT1.
Id getId()
Return the antenna id associated with this enumerator.
bool operator==(const AntNum rx)
Define equality for two antenna enumerators.
void setId(AntNum::Id)
Set the id of this antenna enumerator.
unsigned int getDelayEngineIntId()
Return an integer antenna index associated with this enumerator, as expected by the delay engine...
std::string getEventChannelName()
Return a CORBA object name constructed from this Antenna enumerator.
static unsigned idToInt(AntNum::Id id)
Convert from integer index to enumerator.
void setIdFromHost()
Set the id of this antenna enumerator from the name of the host machine.
bool isSet(unsigned id)
Return true if the passed id is part of this object's antenna set.
AntNum()
Constructor with uninitialized antenna.
std::string getString()
Return a string representation of this antenna set.
friend bool isValidAnt(unsigned int ant)
Return true if the passed index specifies a valid receiver.
bool operator<(const AntNum rx)
Define < for two antenna enumerators.
unsigned short getDcAntennaIndex()
Return an integer antenna index suitable for passing to downconverter API methods.
Id
Enumerate known receivers.
unsigned int getAntMax()
Return the maximum number of antennas we know about.
friend std::ostream & operator<<(std::ostream &os, const AntNum &rx)
Allows cout << ant.
unsigned int getIntId()
Return an integer antenna index associated with this enumerator.
std::string printAntennaSet()
Return a string representing an antenna set.
const AntNum & operator++()
Prefix increment.