Commit fde5217f authored by TheDebbio's avatar TheDebbio
Browse files

devIO header now availables

parent c5cea2a6
Loading
Loading
Loading
Loading
+75 −0
Original line number Diff line number Diff line
#ifndef _DEVIOBANDWIDTH_H_
#define _DEVIOBANDWIDTH_H_

/** **************************************************************************************************** */
/* IRA Istituto di Radioastronomia                                                                      */
/*                                                                                                      */
/* This code is under GNU General Public Licence (GPL).                                                 */
/*                                                                                                      */
/* Who                                when            What                                              */
/* Andrea Orlati(aorlati@ira.inaf.it) 10/08/2011     Creation                                         */


#include <baciDevIO.h>
#include <IRA>

/**
 * This class is derived from template DevIO and it is used by the bandWidth property of the  component.
 * @author <a href=mailto:a.orlati@ira.inaf.it>Andrea Orlati</a>,
 * Istituto di Radioastronomia, Italia<br>
*/
class DevIOBandWidth : public DevIO<ACS::doubleSeq>
{
public:

	/**
	 * Constructor
	 * @param core pointer to the boss core
	*/
	DevIOBandWidth(CComponentCore* core) :  m_pCore(core)
	{
		AUTO_TRACE("DevIOBandWidth::DevIOBandWidth()");
	}

	/**
	 * Destructor
	*/
	~DevIOBandWidth()
	{
		ACS_TRACE("DevIOBandWidth::~DevIOBandWidth()");
	}

	/**
	 * @return true to initialize the property with default value from CDB.
	*/
	bool initializeValue()
	{
		AUTO_TRACE("DevIOBandWidth::DevIOBandWidth()");
		return false;
	}

	/**
	 * Used to read the property value.
	 * @param timestamp epoch when the operation completes
	*/
	ACS::doubleSeq read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl)
	{
		m_pCore->getBandwidth(m_val);
		timestamp=getTimeStamp();  //Completion time
		return m_val;
	}
	/**
	 * It writes values into controller. Unused because the properties are read-only.
	*/
	void write(const ACS::doubleSeq& value, ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl)
	{
		timestamp=getTimeStamp();
		return;
	}

private:
	CComponentCore* m_pCore;
	ACS::doubleSeq m_val;
};

#endif
+55 −0
Original line number Diff line number Diff line
#ifndef _DEVIOCOMPONENTSTATUS_H_
#define _DEVIOCOMPONENTSTATUS_H_

/* ************************************************************************************************************* */
/* IRA Istituto di Radioastronomia                                                                               */
/*                                                                                                               */
/* This code is under GNU General Public Licence (GPL).                                                          */
/*                                                                                                               */
/* Who                                                  When                       What                                                       */
/* Andrea Orlati(aorlati@ira.inaf.it)  11/05/2008      Creation                                                  */

#include <baciDevIO.h>
#include <IRA>

using namespace IRA;

/**
 * This class is derived from template DevIO and it is used by the componentStatus property
 * @author <a href=mailto:a.orlati@ira.inaf.it>Andrea Orlati</a>,
 * Istituto di Radioastronomia, Italia<br>
*/
class DevIOComponentStatus: public virtual DevIO<Management::TSystemStatus>
{

public:

	DevIOComponentStatus(CComponentCore* core): m_pCore(core) {
		AUTO_TRACE("DevIOComponentStatus::DevIOComponentStatus()");
	}

	~DevIOComponentStatus() {
		AUTO_TRACE("DevIOComponentStatus::~DevIOComponentStatus()");
	}

	bool initializeValue(){
		return false;
	}

	Management::TSystemStatus  read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) {
		m_val=m_pCore->getComponentStatus();
		timestamp=getTimeStamp();  //Completion time
		return m_val;
    }

    void write(const CORBA::Long& value, ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl) {
		timestamp=getTimeStamp();
		return;
	}

private:
	CComponentCore* m_pCore;
	Management::TSystemStatus m_val;
};

#endif
+76 −0
Original line number Diff line number Diff line
#ifndef _DEVIOCRYOCOOLHEAD_H_
#define _DEVIOCRYOCOOLHEAD_H_

/** **************************************************************************************************** */
/* IRA Istituto di Radioastronomia                                                                      */
/*                                                                                                      */
/* This code is under GNU General Public Licence (GPL).                                                 */
/*                                                                                                      */
/* Who                                when            What                                              */
/* Andrea Orlati(aorlati@ira.inaf.it) 19/08/2011     Creation                                         */


#include <baciDevIO.h>
#include <IRA>

/**
 * This class is derived from template DevIO and it is used by the cryoTemparatureCoolHead  property of the  component.
 * @author <a href=mailto:a.orlati@ira.inaf.it>Andrea Orlati</a>,
 * Istituto di Radioastronomia, Italia<br>
*/
class DevIOCryoTemperatureCoolHead : public DevIO<CORBA::Double>
{
public:

	/**
	 * Constructor
	 * @param core pointer to the boss core
	*/
	DevIOCryoTemperatureCoolHead(CComponentCore* core) :  m_pCore(core)
	{
		AUTO_TRACE("DevIOCryoTemperatureCoolHead::DevIOCryoTemperatureCoolHead()");
	}

	/**
	 * Destructor
	*/
	~DevIOCryoTemperatureCoolHead()
	{
		ACS_TRACE("DevIOCryoTemperatureCoolHead::~DevIOCryoTemperatureCoolHead()");
	}

	/**
	 * @return true to initialize the property with default value from CDB.
	*/
	bool initializeValue()
	{
		AUTO_TRACE("DevIOCryoTemperatureCoolHead::initializeValue()");
		return true; // initialize with the default in order to avoid the alarm system when the component start and the value has not been read at least once
	}

	/**
	 * Used to read the property value.
	 * @param timestamp epoch when the operation completes
	*/
	CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl)
	{
        CConfiguration::BoardValue result = m_pCore->getCryoCoolHead();
        m_val = result.temperature;
        timestamp = result.timestamp;
		return m_val;
	}
	/**
	 * It writes values into controller. Unused because the properties are read-only.
	*/
	void write(const CORBA::Double& value, ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl)
	{
		timestamp=getTimeStamp();
		return;
	}

private:
	CComponentCore* m_pCore;
	double  m_val;
};

#endif
+76 −0
Original line number Diff line number Diff line
#ifndef _DEVIOCRYOCOOLHEADWIN_H_
#define _DEVIOCRYOCOOLHEADWIN_H_

/** **************************************************************************************************** */
/* IRA Istituto di Radioastronomia                                                                      */
/*                                                                                                      */
/* This code is under GNU General Public Licence (GPL).                                                 */
/*                                                                                                      */
/* Who                                when            What                                              */
/* Andrea Orlati(aorlati@ira.inaf.it) 19/08/2011     Creation                                         */


#include <baciDevIO.h>
#include <IRA>

/**
 * This class is derived from template DevIO and it is used by the cryoTemparatureCoolHeadWindow  property of the  component.
 * @author <a href=mailto:a.orlati@ira.inaf.it>Andrea Orlati</a>,
 * Istituto di Radioastronomia, Italia<br>
*/
class DevIOCryoTemperatureCoolHeadWin : public DevIO<CORBA::Double>
{
public:

	/**
	 * Constructor
	 * @param core pointer to the boss core
	*/
	DevIOCryoTemperatureCoolHeadWin(CComponentCore* core) :  m_pCore(core)
	{
		AUTO_TRACE("DevIOCryoTemperatureCoolHeadWin::DevIOCryoTemperatureCoolHeadWin()");
	}

	/**
	 * Destructor
	*/
	~DevIOCryoTemperatureCoolHeadWin()
	{
		ACS_TRACE("DevIOCryoTemperatureCoolHeadWin::~DevIOCryoTemperatureCoolHeadWin()");
	}

	/**
	 * @return true to initialize the property with default value from CDB.
	*/
	bool initializeValue()
	{
		AUTO_TRACE("DevIOCryoTemperatureCoolHeadWin::initializeValue()");
		return true; // initialize with the default in order to avoid the alarm system when the component start and the value has not been read at least once
	}

	/**
	 * Used to read the property value.
	 * @param timestamp epoch when the operation completes
	*/
	CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl)
	{
        CConfiguration::BoardValue result = m_pCore->getCryoCoolHeadWin();
        m_val = result.temperature;
        timestamp = result.timestamp;
		return m_val;
	}
	/**
	 * It writes values into controller. Unused because the properties are read-only.
	*/
	void write(const CORBA::Double& value, ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl)
	{
		timestamp=getTimeStamp();
		return;
	}

private:
	CComponentCore* m_pCore;
	double  m_val;
};

#endif
+76 −0
Original line number Diff line number Diff line
#ifndef _DEVIOCRYOLNA_H_
#define _DEVIOCRYOLNA_H_

/** **************************************************************************************************** */
/* IRA Istituto di Radioastronomia                                                                      */
/*                                                                                                      */
/* This code is under GNU General Public Licence (GPL).                                                 */
/*                                                                                                      */
/* Who                                when            What                                              */
/* Andrea Orlati(aorlati@ira.inaf.it) 19/08/2011     Creation                                         */


#include <baciDevIO.h>
#include <IRA>

/**
 * This class is derived from template DevIO and it is used by the cryoTemparatureLNA  property of the  component.
 * @author <a href=mailto:a.orlati@ira.inaf.it>Andrea Orlati</a>,
 * Istituto di Radioastronomia, Italia<br>
*/
class DevIOCryoTemperatureLNA : public DevIO<CORBA::Double>
{
public:

	/**
	 * Constructor
	 * @param core pointer to the boss core
	*/
	DevIOCryoTemperatureLNA(CComponentCore* core) :  m_pCore(core)
	{
		AUTO_TRACE("DevIOCryoTemperatureLNA::DevIOCryoTemperatureLNA()");
	}

	/**
	 * Destructor
	*/
	~DevIOCryoTemperatureLNA()
	{
		ACS_TRACE("DevIOCryoTemperatureLNA::~DevIOCryoTemperatureLNA()");
	}

	/**
	 * @return true to initialize the property with default value from CDB.
	*/
	bool initializeValue()
	{
		AUTO_TRACE("DevIOCryoTemperatureLNA::initializeValue()");
		return true; // initialize with the default in order to avoid the alarm system when the component start and the value has not been read at least once
	}

	/**
	 * Used to read the property value.
	 * @param timestamp epoch when the operation completes
	*/
	CORBA::Double read(ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl)
	{
        CConfiguration::BoardValue result = m_pCore->getCryoLNA();
        m_val = result.temperature;
        timestamp = result.timestamp;
		return m_val;
	}
	/**
	 * It writes values into controller. Unused because the properties are read-only.
	*/
	void write(const CORBA::Double& value, ACS::Time& timestamp) throw (ACSErr::ACSbaseExImpl)
	{
		timestamp=getTimeStamp();
		return;
	}

private:
	CComponentCore* m_pCore;
	double  m_val;
};

#endif
Loading