/*
* $Header: https://oberon.oapd.inaf.it/shins/trunk/shins/src/iif/Interface/Ltcs/Iif/IifInstrum.cc 371 2018-01-10 13:47:18Z depa $
*
*/

/**
* @file
* @since 2017-01-17
* @author R. J. Mathar
*/

#include <Ltcs/Iif/IifInstrum.h>

/*!*********************
* Default ctor.
* Initialize the state as "no side" (of both)
* @param i The instrument by index in our local enumeration.
* @since 2017-01-17
*/
Ltcs::IifInstrum::IifInstrum(enum IifInstr i) : ins(i)
{
}

#if 0
/*!************************************
* @brief dtor.
* Does nothing (but what is done by the base class).
* @since 2017-01-17
*/
Ltcs::IifInstrum::~IifInstrum()
{
}
#endif

/*!************************************
* @brief Generate a string as used in the ICS initializations.
* @return the standard string representation "NONE", "LINC" "LUCI" etc
* @since 2017-01-17
*/
std::string Ltcs::IifInstrum::toString() const
{
	switch(ins)
	{
	case NONE:
		return std::string("NONE") ;
	case LUCI :
		return std::string("LUCIFER") ;
	case LN :
		return std::string("LINC") ;
	case LBTI :
		return std::string("LBTI") ;
	case LBC :
		return std::string("LBC") ;
	case MODS :
		return std::string("MODS") ;
	case PEPSIPOL :
		return std::string("PEPSIPOL") ;
	case PEPSIPFU :
		return std::string("PEPSIPFU") ;
	case LAT :
		return std::string("LAT") ;
	case DIMM :
		return std::string("DIMM") ;
	case IRTC :
		return std::string("IRTC") ;
	case ILOCATER :
		return std::string("ILOCATER") ;
	case SHARK :
		return std::string("SHARK") ;
	default :
		return std::string() ;
	}
}

/*!********************************
* @brief read the focal station associated with this instrument.
* @since 2017-01-17
*/
Ltcs::IifInstrum::operator Ltcs::IifStation()
{
	switch(ins)
	{
	case LUCI :
		return Ltcs::IifStation(FRONT) ;
	case LN :
		return Ltcs::IifStation(BACK) ;
	case LBTI :
    return Ltcs::IifStation(CENTER) ;
	case SHARK :
		return Ltcs::IifStation(CENTER) ;
	default :
		return Ltcs::IifStation() ;
	}
}
