TwiceAsNice  2019-02-18
Public Member Functions | Public Attributes | List of all members
Ltcs::IifSide Class Reference

This class represents the SX or DX or both sides of the LBT. More...

#include <IifSide.h>

Collaboration diagram for Ltcs::IifSide:
Collaboration graph

Public Member Functions

 IifSide (const enum IifSid anysdx=SIDE_NONE)
 
 IifSide (const std::string &fstation)
 construct from astring like "blabla right" or "bla both" or "sx" or "dx". More...
 
 IifSide (const IifSide &oth)
 copy constructor More...
 
IifSideoperator= (const IifSide &oth)
 Assignment operator. Deep copy of this state. More...
 
std::string toString () const
 Generate a string as used in the ICS initializations. More...
 
std::string toStringCfg () const
 Generate a string as used in the file names of LN configurations. More...
 
int toIntIdx () const
 Generate a index 0 or 1 suitable for the two indices of two proxies. More...
 
IifSide intersect (const IifSide &oth) const
 Mutually compatible minimum set of sides. The function takes a set-intersection of this side and the other side. This is similarly to a bit-wise-and if the two sides were represented as two bits, one for the left and one for the right side. The main application of this operation is when the TO has authorized the telescope for a subset of the sides configured for the instrument. The policy is that the instrument then reduces its requests to the commonly agreed subset of sides. More...
 
IifSide merge (const IifSide &oth) const
 Maximum union set of left, right or both. The function takes a set-union of this side and the other side. This is similarly to a bit-wise-or if the two sides were represented as two bits, one for the left and one for the right side. More...
 
 IifSide (const enum IifSid anysdx=SIDE_NONE)
 
 IifSide (const std::string &fstation)
 
 IifSide (const IifSide &oth)
 
IifSideoperator= (const IifSide &oth)
 
std::string toString () const
 
std::string toStringCfg () const
 
int toIntIdx () const
 
IifSide intersect (const IifSide &oth) const
 
IifSide merge (const IifSide &oth) const
 

Public Attributes

enum IifSid s
 

Detailed Description

This class represents the SX or DX or both sides of the LBT.

Constructor & Destructor Documentation

◆ IifSide() [1/6]

Ltcs::IifSide::IifSide ( const enum IifSid  anysdx = SIDE_NONE)

Default ctor. Initialize the state as "no side" (of both)

Parameters
anysdxAn enumerated constant indicating left, right, none or both.
Since
2017-01-17

◆ IifSide() [2/6]

Ltcs::IifSide::IifSide ( const std::string &  fstation)

construct from astring like "blabla right" or "bla both" or "sx" or "dx".


Parameters
fstationA string of the format found in the FOCAL_STATION property in lbcs.iif-dev.cfg
Since
2017-01-17
2017-05-27 Interpret a "LIRCS" in the name as "both". Used for some drotator names.

◆ IifSide() [3/6]

Ltcs::IifSide::IifSide ( const IifSide oth)

copy constructor


Parameters
othThe side to be duplicated
Since
2017-01-17

◆ IifSide() [4/6]

Ltcs::IifSide::IifSide ( const enum IifSid  anysdx = SIDE_NONE)

◆ IifSide() [5/6]

Ltcs::IifSide::IifSide ( const std::string &  fstation)

◆ IifSide() [6/6]

Ltcs::IifSide::IifSide ( const IifSide oth)

Member Function Documentation

◆ intersect() [1/2]

Ltcs::IifSide Ltcs::IifSide::intersect ( const IifSide oth) const

Mutually compatible minimum set of sides. The function takes a set-intersection of this side and the other side. This is similarly to a bit-wise-and if the two sides were represented as two bits, one for the left and one for the right side. The main application of this operation is when the TO has authorized the telescope for a subset of the sides configured for the instrument. The policy is that the instrument then reduces its requests to the commonly agreed subset of sides.


Returns
If one of the sides is "both", the other side. If one of the sides is "none", returns none. If one of the sides is "left" and the other "right", returns none. If both sides are the same, returns that side.
Since
2018-01-12

◆ intersect() [2/2]

IifSide Ltcs::IifSide::intersect ( const IifSide oth) const

◆ merge() [1/2]

Ltcs::IifSide Ltcs::IifSide::merge ( const IifSide oth) const

Maximum union set of left, right or both. The function takes a set-union of this side and the other side. This is similarly to a bit-wise-or if the two sides were represented as two bits, one for the left and one for the right side.


Returns
"both" if at least one of the sides is "both", or one "right" and one "left". If one side is "none" the value of the other side. "left" if both sides are "left". "right" if both sides are "right".
Since
2018-06-29

◆ merge() [2/2]

IifSide Ltcs::IifSide::merge ( const IifSide oth) const

◆ operator=() [1/2]

Ltcs::IifSide & Ltcs::IifSide::operator= ( const IifSide oth)

Assignment operator. Deep copy of this state.


Since
2017-01-17

◆ operator=() [2/2]

IifSide& Ltcs::IifSide::operator= ( const IifSide oth)

◆ toIntIdx() [1/2]

int Ltcs::IifSide::toIntIdx ( ) const

◆ toIntIdx() [2/2]

int Ltcs::IifSide::toIntIdx ( ) const

Generate a index 0 or 1 suitable for the two indices of two proxies.


Returns
0 if SX or BOTH, 1 if DX, -1 otherwise.
Since
2017-01-17

◆ toString() [1/2]

std::string Ltcs::IifSide::toString ( ) const

Generate a string as used in the ICS initializations.


Returns
the standard string representation "left", "right" or "both" or "none".
Since
2017-01-17

◆ toString() [2/2]

std::string Ltcs::IifSide::toString ( ) const

◆ toStringCfg() [1/2]

std::string Ltcs::IifSide::toStringCfg ( ) const

Generate a string as used in the file names of LN configurations.


Returns
the standard string representation "sx" or "dx". If this is not uniquely either SX or DX, an empty string is returned.
Since
2017-01-17

◆ toStringCfg() [2/2]

std::string Ltcs::IifSide::toStringCfg ( ) const

Member Data Documentation

◆ s

enum IifSid Ltcs::IifSide::s

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