HLCC Documentation 2.2.0
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Protected Member Functions | List of all members
hlcc::telif::FitsItemGeneric Class Reference

#include <dataAcquisitionFits.hpp>

Inheritance diagram for hlcc::telif::FitsItemGeneric:
hlcc::telif::FitsItemRadToDeg hlcc::telif::FitsItemTelAlt hlcc::telif::FitsItemTelAz hlcc::telif::FitsItemTelEpoch hlcc::telif::FitsItemTelEpochsystem hlcc::telif::FitsItemTelTargDec hlcc::telif::FitsItemTelTargRa

Classes

struct  FitsValues
 

Public Types

enum  AcquisitionStage { AQ_NOT_STARTED , AQ_SUCCEDDED , AQ_FAILED }
 

Public Member Functions

 FitsItemGeneric (OldbInterface &moldbif, const FitsData &mfitsdata)
 
template<typename T >
std::string StringFormat (const std::string &format, T arg)
 
bool ClearAcquisition ()
 
virtual bool DoAcquisition (FitsData::DaqStage daq_stage)
 
bool GetJsonString (std::string &str_json)
 
template<>
std::string StringFormat (const std::string &format, const char *arg)
 
template<>
std::string StringFormat (const std::string &format, double arg)
 
template<>
std::string StringFormat (const std::string &format, int arg)
 

Protected Member Functions

OldbInterfaceGetOldbInterface ()
 
const FitsData GetFitsData ()
 
FitsValues GetFitsValues ()
 
void SetFitsValues (const FitsValues &p_fits_values)
 
AcquisitionStage GetAcquisitionStage ()
 
void SetAcquisitionStage (AcquisitionStage p_acquisition_stage)
 

Detailed Description

This class is the base class for the FITs keywords parameters. It implements methods to get the data from the Oldb and to build the JSON string with all the information.

This class supports the acquisition from the Oldb if the parameter matches exctly the value retrieved from the given Oldb data point.

In the case the Oldb data point is complex and don't match the paramter a new class should be created based on this and implement the virtual method according to the especific case.

Member Enumeration Documentation

◆ AcquisitionStage

Acquisition stages for each fits parameter.

Enumerator
AQ_NOT_STARTED 
AQ_SUCCEDDED 
AQ_FAILED 

Constructor & Destructor Documentation

◆ FitsItemGeneric()

hlcc::telif::FitsItemGeneric::FitsItemGeneric ( OldbInterface & moldbif,
const FitsData & mfitsdata )

Constructor

Member Function Documentation

◆ ClearAcquisition()

bool hlcc::telif::FitsItemGeneric::ClearAcquisition ( )

Resets the acqusition state and clears all the variables.

Returns
true if successfull.

◆ DoAcquisition()

bool hlcc::telif::FitsItemGeneric::DoAcquisition ( FitsData::DaqStage daq_stage)
virtual

Perform parameter acquisition from Oldb

Parameters
[in]daq_stageThe current stage of the general acquisition
Returns
true if acquisition successfull.

Reimplemented in hlcc::telif::FitsItemRadToDeg, hlcc::telif::FitsItemTelAlt, hlcc::telif::FitsItemTelAz, hlcc::telif::FitsItemTelEpoch, hlcc::telif::FitsItemTelEpochsystem, hlcc::telif::FitsItemTelTargRa, and hlcc::telif::FitsItemTelTargDec.

◆ GetAcquisitionStage()

AcquisitionStage hlcc::telif::FitsItemGeneric::GetAcquisitionStage ( )
inlineprotected

Getter for the Acquisition stage.

Returns
The current Aquisition stage.

◆ GetFitsData()

const FitsData hlcc::telif::FitsItemGeneric::GetFitsData ( )
inlineprotected

Getter for the Fits data.

Returns
The Fits data for current object.

◆ GetFitsValues()

FitsValues hlcc::telif::FitsItemGeneric::GetFitsValues ( )
inlineprotected

Getter for the Fits values.

Returns
The current Fits Values for the object.

◆ GetJsonString()

bool hlcc::telif::FitsItemGeneric::GetJsonString ( std::string & str_json)

Message setter.

Parameters
[in]str_jsonMessage string
Returns
true if acquisition finished and produced a json string.

◆ GetOldbInterface()

OldbInterface & hlcc::telif::FitsItemGeneric::GetOldbInterface ( )
inlineprotected

Getter for the oldb intreface.

Returns
reference to the oldb interface.

◆ SetAcquisitionStage()

void hlcc::telif::FitsItemGeneric::SetAcquisitionStage ( AcquisitionStage p_acquisition_stage)
inlineprotected

Setter for the Acquisition stage.

Parameters
p_acquisition_stagekey The new aquisition stage to be stored.

◆ SetFitsValues()

void hlcc::telif::FitsItemGeneric::SetFitsValues ( const FitsValues & p_fits_values)
inlineprotected

Setter for the Fits values.

Parameters
p_fits_valuesThe new Fits Values to be stored.

◆ StringFormat() [1/4]

template<>
std::string hlcc::telif::FitsItemGeneric::StringFormat ( const std::string & format,
const char * arg )

◆ StringFormat() [2/4]

template<>
std::string hlcc::telif::FitsItemGeneric::StringFormat ( const std::string & format,
double arg )

◆ StringFormat() [3/4]

template<>
std::string hlcc::telif::FitsItemGeneric::StringFormat ( const std::string & format,
int arg )

◆ StringFormat() [4/4]

template<typename T >
std::string hlcc::telif::FitsItemGeneric::StringFormat ( const std::string & format,
T arg )

Template implementing the format features of 'printf' but applied to a std::string. This implementation support only 1 argument which is enough for the current purpose.

To be on the safe side we should limit the argument types allowed to the ones we know are valid. we are doing it with template specialization.

Parameters
[in]formatstring.
[in]argto be printed on the format string.
Returns
std::string with the final formated string.

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