VieSched++
VieVS VLBI Scheduling Software
VieVS::Mode Class Reference

MODE block. More...

#include <Mode.h>

Inheritance diagram for VieVS::Mode:
Collaboration diagram for VieVS::Mode:

Public Member Functions

 Mode (std::string name, unsigned long nsta)
 constructor More...
 
boost::property_tree::ptree toPropertytree (const std::vector< std::string > &stations) const
 converts object to property tree More...
 
void addBlock (const std::shared_ptr< const If > &newIf, const std::vector< unsigned long > &staids)
 add new ID block More...
 
void addBlock (const std::shared_ptr< const Bbc > &newBbc, const std::vector< unsigned long > &staids)
 add new BBC block More...
 
void addBlock (const std::shared_ptr< const Freq > &newFreq, const std::vector< unsigned long > &staids)
 add new FREQ block More...
 
void addBlock (const std::shared_ptr< const Track > &newTrack, const std::vector< unsigned long > &staids)
 add new Tracks block More...
 
void addBlock (const std::shared_ptr< const std::string > &newTrackFrameFormat, const std::vector< unsigned long > &staids)
 add new track frame format block More...
 
void calcRecordingRates ()
 calculate recording rates More...
 
void setRecordingRates (const std::string &band, double recRate)
 set recording rates for simple manual model More...
 
void setEfficiencyFactor (double eff)
 set efficiency factor for simple manual model More...
 
void setBands (const std::set< std::string > &bands)
 set band names for simple manual model More...
 
double recordingRate (unsigned long staid1, unsigned long staid2, const std::string &band) const
 recording rate for observation More...
 
double efficiency (unsigned long staid1, unsigned long staid2) const
 efficiency factor between stations More...
 
boost::optional< const std::shared_ptr< const If > & > getIf (unsigned long staid) const
 get IF block per station More...
 
boost::optional< const std::shared_ptr< const Bbc > & > getBbc (unsigned long staid) const
 get BBC block per station More...
 
boost::optional< const std::shared_ptr< const Freq > & > getFreq (unsigned long staid) const
 get FREQ block per station More...
 
boost::optional< const std::shared_ptr< const Track > & > getTracks (unsigned long staid) const
 get TRACKS block per station More...
 
boost::optional< const std::shared_ptr< const std::string > & > getTrackFrameFormat (unsigned long staid) const
 get track frame format block per station More...
 
boost::optional< const std::vector< unsigned long > & > getAllStationsWithBlock (const std::shared_ptr< const If > &this_if) const
 get list of all station per IF block More...
 
boost::optional< const std::vector< unsigned long > & > getAllStationsWithBlock (const std::shared_ptr< const Bbc > &bbc) const
 get list of all station per BBC block More...
 
boost::optional< const std::vector< unsigned long > & > getAllStationsWithBlock (const std::shared_ptr< const Freq > &freq) const
 get list of all station per FREQ block More...
 
boost::optional< const std::vector< unsigned long > & > getAllStationsWithBlock (const std::shared_ptr< const Track > &track) const
 get list of all station per TRACKS block More...
 
boost::optional< const std::vector< unsigned long > & > getAllStationsWithBlock (const std::shared_ptr< const std::string > &trackFrameFormat) const
 get list of all station per track frame format More...
 
void summary (std::ofstream &of, const std::vector< std::string > &stations) const
 create summary More...
 
void operationNotesSummary (std::ofstream &of, const std::vector< std::string > &stations) const
 create summary for operation notes More...
 
double recordingRate (unsigned long staid) const
 get recording rate per station More...
 
void toVexModeDefiniton (std::ofstream &of, const std::vector< std::string > &stations) const
 writes MODE block in vex format More...
 
const std::set< std::string > & getAllBands () const
 get list of all bands More...
 
unsigned long getNSta () const
 getter for number of stations More...
 
void changeIf (int idx, unsigned long staid)
 change IF for station More...
 
void changeBbc (int idx, unsigned long staid)
 change BBC for station More...
 
void changeTracks (int idx, unsigned long staid)
 change TRACK for station More...
 
void changeTrackFrameFormat (int idx, unsigned long staid)
 change track frame format for station More...
 
void changeFreq (int idx, unsigned long staid)
 change FREQ for station More...
 
void removeFreq (int idx)
 remove FREQ block More...
 
void removeBbc (int idx)
 remove BBC block More...
 
void removeIf (int idx)
 remove IF block More...
 
void removeTracks (int idx)
 remove TRACKS block More...
 
void removeTrackFrameFormats (int idx)
 remove track frame format More...
 
- Public Member Functions inherited from VieVS::VieVS_NamedObject
 VieVS_NamedObject (std::string name, unsigned long id)
 constructor More...
 
 VieVS_NamedObject (std::string name, std::string alternativeName, unsigned long id)
 constructor More...
 
const std::string & getName () const
 get object name More...
 
const std::string & getAlternativeName () const
 get object alternative name More...
 
bool hasAlternativeName () const
 check if object has alternative name More...
 
bool hasName (const std::string &name) const
 check if object has name More...
 
void changeName (const std::string &newName)
 change name of object More...
 
- Public Member Functions inherited from VieVS::VieVS_Object
 VieVS_Object (unsigned long id)
 constructor More...
 
const unsigned long getId () const
 get object id More...
 
bool hasValidId () const
 check if id is valid More...
 
bool hasId (unsigned long id) const
 check if object has specific id More...
 
void setId (unsigned long id)
 set object id More...
 
std::string printId () const
 object id string More...
 

Private Member Functions

boost::property_tree::ptree staids2propertyTree (const std::string &name, const std::vector< unsigned long > &ids, const std::vector< std::string > &staNames) const
 station ids to property tree More...
 

Private Attributes

unsigned long nsta_
 number of stations More...
 
std::vector< std::pair< std::shared_ptr< const If >, std::vector< unsigned long > > > ifs_
 all IF blocks with corresponding station ids More...
 
std::vector< std::pair< std::shared_ptr< const Bbc >, std::vector< unsigned long > > > bbcs_
 all BBC blocks with corresponding station ids More...
 
std::vector< std::pair< std::shared_ptr< const Freq >, std::vector< unsigned long > > > freqs_
 all FREQ blocks with corresponding station ids More...
 
std::vector< std::pair< std::shared_ptr< const Track >, std::vector< unsigned long > > > tracks_
 all TRACKS blocks with corresponding station ids More...
 
std::vector< std::pair< std::shared_ptr< const std::string >, std::vector< unsigned long > > > track_frame_formats_
 all track frame format blocks with corresponding station ids More...
 
std::unordered_map< std::pair< unsigned long, unsigned long >, std::unordered_map< std::string, double >, boost::hash< std::pair< unsigned long, unsigned long > > > staids2recordingRate_
 recording rate per station ids and band More...
 
std::unordered_map< std::pair< unsigned long, unsigned long >, double, boost::hash< std::pair< unsigned long, unsigned long > > > staids2efficiency_
 efficiency per station ids More...
 
std::unordered_map< unsigned long, double > staid2totalRecordingRate_
 total recording rate per station id More...
 
std::set< std::string > bands_
 list of all bands More...
 

Static Private Attributes

static unsigned long nextId = 0
 next id for this object type More...
 

Detailed Description

MODE block.

following vex standard

Author
Matthias Schartner
Date
17.09.2018

Constructor & Destructor Documentation

Mode::Mode ( std::string  name,
unsigned long  nsta 
)

constructor

Author
Matthias Schartner
Parameters
nameobserving mode name
nstanumber of stations

Member Function Documentation

void VieVS::Mode::addBlock ( const std::shared_ptr< const If > &  newIf,
const std::vector< unsigned long > &  staids 
)
inline

add new ID block

Author
Matthias Schartner
Parameters
newIfnew IF block
staidscorresponding station Ids
void VieVS::Mode::addBlock ( const std::shared_ptr< const Bbc > &  newBbc,
const std::vector< unsigned long > &  staids 
)
inline

add new BBC block

Author
Matthias Schartner
Parameters
newBbcnew BBC block
staidscorresponding station Ids
void VieVS::Mode::addBlock ( const std::shared_ptr< const Freq > &  newFreq,
const std::vector< unsigned long > &  staids 
)
inline

add new FREQ block

Author
Matthias Schartner
Parameters
newFreqnew FREQ block
staidscorresponding station Ids
void VieVS::Mode::addBlock ( const std::shared_ptr< const Track > &  newTrack,
const std::vector< unsigned long > &  staids 
)
inline

add new Tracks block

Author
Matthias Schartner
Parameters
newTracknew Tracks block
staidscorresponding station Ids
void VieVS::Mode::addBlock ( const std::shared_ptr< const std::string > &  newTrackFrameFormat,
const std::vector< unsigned long > &  staids 
)
inline

add new track frame format block

Author
Matthias Schartner
Parameters
newTrackFrameFormatnew track frame format block
staidscorresponding station Ids

Here is the call graph for this function:

void Mode::calcRecordingRates ( )

calculate recording rates

Author
Matthias Schartner

Here is the call graph for this function:

Here is the caller graph for this function:

void Mode::changeBbc ( int  idx,
unsigned long  staid 
)

change BBC for station

Author
Matthias Schartner

This function is used for setting up manual observing mode in the GUI It changes the BBC for station staid

Parameters
idxindex of new BBC
staidtarget station

Here is the caller graph for this function:

void Mode::changeFreq ( int  idx,
unsigned long  staid 
)

change FREQ for station

Author
Matthias Schartner

This function is used for setting up manual observing mode in the GUI It changes the FREQ for station staid

Parameters
idxindex of new FREQ
staidtarget station

Here is the caller graph for this function:

void Mode::changeIf ( int  idx,
unsigned long  staid 
)

change IF for station

Author
Matthias Schartner

This function is used for setting up manual observing mode in the GUI It changes the IF for station staid

Parameters
idxindex of new IF
staidtarget station

Here is the caller graph for this function:

void Mode::changeTrackFrameFormat ( int  idx,
unsigned long  staid 
)

change track frame format for station

Author
Matthias Schartner

This function is used for setting up manual observing mode in the GUI It changes the track frame format for station staid

Parameters
idxindex of new track frame format
staidtarget station

Here is the caller graph for this function:

void Mode::changeTracks ( int  idx,
unsigned long  staid 
)

change TRACK for station

Author
Matthias Schartner

This function is used for setting up manual observing mode in the GUI It changes the TRACK for station staid

Parameters
idxindex of new TRACK
staidtarget station

Here is the caller graph for this function:

double Mode::efficiency ( unsigned long  staid1,
unsigned long  staid2 
) const

efficiency factor between stations

Author
Matthias Schartner

efficiency is based on bit efficiency and correlator efficiency Bit efficiency: 1-bit: 0.5715 2-bit: 0.6366 Correlator efficiency: DiFX: 0.97

Parameters
staid1station 1
staid2station 2
Returns
efficiency factor

Here is the caller graph for this function:

const std::set<std::string>& VieVS::Mode::getAllBands ( ) const
inline

get list of all bands

Author
Matthias Schartner
Returns
list of all bands
boost::optional< const std::vector< unsigned long > & > Mode::getAllStationsWithBlock ( const std::shared_ptr< const If > &  this_if) const

get list of all station per IF block

Author
Matthias Schartner
Parameters
this_iftarget IF block
Returns
list of stations

Here is the caller graph for this function:

boost::optional< const std::vector< unsigned long > & > Mode::getAllStationsWithBlock ( const std::shared_ptr< const Bbc > &  bbc) const

get list of all station per BBC block

Author
Matthias Schartner
Parameters
bbctarget BBC block
Returns
list of stations
boost::optional< const std::vector< unsigned long > & > Mode::getAllStationsWithBlock ( const std::shared_ptr< const Freq > &  freq) const

get list of all station per FREQ block

Author
Matthias Schartner
Parameters
freqtarget FREQ block
Returns
list of stations
boost::optional< const std::vector< unsigned long > & > Mode::getAllStationsWithBlock ( const std::shared_ptr< const Track > &  track) const

get list of all station per TRACKS block

Author
Matthias Schartner
Parameters
tracktarget TRACKS block
Returns
list of stations
boost::optional< const std::vector< unsigned long > & > Mode::getAllStationsWithBlock ( const std::shared_ptr< const std::string > &  trackFrameFormat) const

get list of all station per track frame format

Author
Matthias Schartner
Parameters
trackFrameFormattarget track frame format
Returns
list of stations
boost::optional< const std::shared_ptr< const Bbc > & > Mode::getBbc ( unsigned long  staid) const

get BBC block per station

Author
Matthias Schartner
Parameters
staidstation id
Returns
BBC block

Here is the caller graph for this function:

boost::optional< const std::shared_ptr< const Freq > & > Mode::getFreq ( unsigned long  staid) const

get FREQ block per station

Author
Matthias Schartner
Parameters
staidstation id
Returns
FREQ block

Here is the caller graph for this function:

boost::optional< const std::shared_ptr< const If > & > Mode::getIf ( unsigned long  staid) const

get IF block per station

Author
Matthias Schartner
Parameters
staidstation id
Returns
IF block

Here is the caller graph for this function:

unsigned long VieVS::Mode::getNSta ( ) const
inline

getter for number of stations

Author
Matthias Schartner
Returns
number of stations

Here is the call graph for this function:

boost::optional< const std::shared_ptr< const std::string > & > Mode::getTrackFrameFormat ( unsigned long  staid) const

get track frame format block per station

Author
Matthias Schartner
Parameters
staidstation id
Returns
track frame format

Here is the caller graph for this function:

boost::optional< const std::shared_ptr< const Track > & > Mode::getTracks ( unsigned long  staid) const

get TRACKS block per station

Author
Matthias Schartner
Parameters
staidstation id
Returns
TRACKS block

Here is the caller graph for this function:

void Mode::operationNotesSummary ( std::ofstream &  of,
const std::vector< std::string > &  stations 
) const

create summary for operation notes

Author
Matthias Schartner
Parameters
ofoutstream
stationsstation names

Here is the call graph for this function:

Here is the caller graph for this function:

double Mode::recordingRate ( unsigned long  staid1,
unsigned long  staid2,
const std::string &  band 
) const

recording rate for observation

Author
Matthias Schartner
Parameters
staid1station 1
staid2station 2
bandobserved band
Returns
recording rate

Here is the caller graph for this function:

double Mode::recordingRate ( unsigned long  staid) const

get recording rate per station

Author
Matthias Schartner
Parameters
staidstation id
Returns
recording rate
void VieVS::Mode::removeBbc ( int  idx)
inline

remove BBC block

Author
Matthias Schartner

This function is used for setting up manual observing mode in the GUI

Parameters
idxindex of block which whould be removed
void VieVS::Mode::removeFreq ( int  idx)
inline

remove FREQ block

Author
Matthias Schartner

This function is used for setting up manual observing mode in the GUI

Parameters
idxindex of block which whould be removed
void VieVS::Mode::removeIf ( int  idx)
inline

remove IF block

Author
Matthias Schartner

This function is used for setting up manual observing mode in the GUI

Parameters
idxindex of block which whould be removed
void VieVS::Mode::removeTrackFrameFormats ( int  idx)
inline

remove track frame format

Author
Matthias Schartner

This function is used for setting up manual observing mode in the GUI

Parameters
idxindex of block which whould be removed
void VieVS::Mode::removeTracks ( int  idx)
inline

remove TRACKS block

Author
Matthias Schartner

This function is used for setting up manual observing mode in the GUI

Parameters
idxindex of block which whould be removed
void VieVS::Mode::setBands ( const std::set< std::string > &  bands)
inline

set band names for simple manual model

Author
Matthias Schartner
Parameters
bandslist of all bands

Here is the call graph for this function:

void Mode::setEfficiencyFactor ( double  eff)

set efficiency factor for simple manual model

Author
Matthias Schartner
Parameters
effefficiency factor

Here is the caller graph for this function:

void Mode::setRecordingRates ( const std::string &  band,
double  recRate 
)

set recording rates for simple manual model

Author
Matthias Schartner
Parameters
bandband name
recRaterecording rate

Here is the caller graph for this function:

boost::property_tree::ptree Mode::staids2propertyTree ( const std::string &  name,
const std::vector< unsigned long > &  ids,
const std::vector< std::string > &  staNames 
) const
private

station ids to property tree

Author
Matthias Schartner
Parameters
nameblock name
idsstation ids
staNamesstation names
Returns
property tree

Here is the caller graph for this function:

void Mode::summary ( std::ofstream &  of,
const std::vector< std::string > &  stations 
) const

create summary

Author
Matthias Schartner
Parameters
ofoutstream
stationsstation names

Here is the call graph for this function:

Here is the caller graph for this function:

boost::property_tree::ptree Mode::toPropertytree ( const std::vector< std::string > &  stations) const

converts object to property tree

Author
Matthias Schartner
Parameters
stationsstation names
Returns
property tree

Here is the call graph for this function:

void Mode::toVexModeDefiniton ( std::ofstream &  of,
const std::vector< std::string > &  stations 
) const

writes MODE block in vex format

Author
Matthias Schartner
Parameters
ofvex file stream
stationsstation names

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

std::set<std::string> VieVS::Mode::bands_
private

list of all bands

std::vector<std::pair<std::shared_ptr<const Bbc>, std::vector<unsigned long> > > VieVS::Mode::bbcs_
private

all BBC blocks with corresponding station ids

std::vector<std::pair<std::shared_ptr<const Freq>, std::vector<unsigned long> > > VieVS::Mode::freqs_
private

all FREQ blocks with corresponding station ids

std::vector<std::pair<std::shared_ptr<const If>, std::vector<unsigned long> > > VieVS::Mode::ifs_
private

all IF blocks with corresponding station ids

unsigned long VieVS::Mode::nextId = 0
staticprivate

next id for this object type

unsigned long VieVS::Mode::nsta_
private

number of stations

std::unordered_map<unsigned long, double> VieVS::Mode::staid2totalRecordingRate_
private

total recording rate per station id

std::unordered_map<std::pair<unsigned long, unsigned long>, double, boost::hash<std::pair<unsigned long, unsigned long> > > VieVS::Mode::staids2efficiency_
private

efficiency per station ids

std::unordered_map<std::pair<unsigned long, unsigned long>, std::unordered_map<std::string, double>, boost::hash<std::pair<unsigned long, unsigned long> > > VieVS::Mode::staids2recordingRate_
private

recording rate per station ids and band

std::vector<std::pair<std::shared_ptr<const std::string>, std::vector<unsigned long> > > VieVS::Mode::track_frame_formats_
private

all track frame format blocks with corresponding station ids

std::vector<std::pair<std::shared_ptr<const Track>, std::vector<unsigned long> > > VieVS::Mode::tracks_
private

all TRACKS blocks with corresponding station ids


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