Commit 98489c93 authored by Carlo Migoni's avatar Carlo Migoni
Browse files

added

parent a1691b25
Loading
Loading
Loading
Loading
+112 −0
Original line number Diff line number Diff line
/******************************************************************************** $Id: JacPrep,v 1.12 2005/04/05 13:29:24 mzampare Exp $
* DO NOT EDIT
* Automatically generated from ../idl/NotoActiveSurfaceBoss.midl
* on Wed Nov 16 10:15:56 2016
*******************************************************************************/
#ifndef _NotoActiveSurfaceBoss_midl_
#define _NotoActiveSurfaceBoss_midl_
#ifndef _ACS_PREPROCESSED_
#define _ACS_PREPROCESSED_
#endif
#include <baci.idl>
#include <enumpropMACRO.idl>
#include <ComponentErrors.idl>
#include <ASErrors.idl>
#include <ManagmentDefinitions.idl>
#include <ActiveSurfaceBoss.idl>


#pragma prefix "alma"

module ActiveSurface {

    enum TASOneWayAction {
        AS_STOP,
        AS_SETUP,
        AS_STOW,
        AS_REFPOS,
        AS_UP,
        AS_DOWN,
        AS_BOTTOM,
        AS_TOP,
        AS_UPDATE,
        AS_CORRECTION,
        AS_MOVE,
 AS_PROFILE
    };

    typedef sequence<TASOneWayAction> TASOneWayActionSeq; interface CBTASOneWayAction : ACS::Callback { oneway void working(in TASOneWayAction value, in ACSErr::Completion c, in ACS::CBDescOut desc); oneway void done(in TASOneWayAction value, in ACSErr::Completion c, in ACS::CBDescOut desc); };
typedef CBTASOneWayAction TASOneWayActionCB; interface AlarmTASOneWayAction : ACS::Callback { oneway void alarm_raised(in TASOneWayAction value, in ACSErr::Completion c, in ACS::CBDescOut desc); oneway void alarm_cleared(in TASOneWayAction value, in ACSErr::Completion c, in ACS::CBDescOut desc); };
 typedef AlarmTASOneWayAction TASOneWayActionAlarm; interface PTASOneWayAction: ACS::TypelessProperty { TASOneWayAction get_sync(out ACSErr::Completion c); void get_async(in ACS::CBpattern cb, in ACS::CBDescIn desc); long get_history(in long n_last_values, out TASOneWayActionSeq vs, out ACS::TimeSeq ts); ACS::Monitorpattern create_monitor(in ACS::CBpattern cb, in ACS::CBDescIn desc); ACS::Monitor create_postponed_monitor (in ACS::Time start_time, in ACS::CBpattern cb, in ACS::CBDescIn desc); readonly attribute ACS::TimeInterval default_timer_trigger; readonly attribute ACS::TimeInterval min_timer_trigger; readonly attribute TASOneWayAction default_value; readonly attribute ACS::stringSeq statesDescription; readonly attribute ACS::ConditionSeq condition; readonly attribute TASOneWayActionSeq allStates; };
 interface ROTASOneWayAction: PTASOneWayAction{ ACS::Subscription new_subscription_AlarmEnum(in ACS::Alarmpattern cb, in ACS::CBDescIn desc); readonly attribute TASOneWayActionSeq alarm_on; readonly attribute TASOneWayActionSeq alarm_off; };
 interface RWTASOneWayAction: PTASOneWayAction { ACSErr::Completion set_sync(in TASOneWayAction value); void set_async(in TASOneWayAction value, in ACS::CBvoid cb, in ACS::CBDescIn desc); void set_nonblocking(in TASOneWayAction value);};


    enum TASProfile {
        AS_SHAPED,
 AS_SHAPED_FIXED,
        AS_PARABOLIC,
 AS_PARABOLIC_FIXED
    };

    typedef sequence<TASProfile> TASProfileSeq; interface CBTASProfile : ACS::Callback { oneway void working(in TASProfile value, in ACSErr::Completion c, in ACS::CBDescOut desc); oneway void done(in TASProfile value, in ACSErr::Completion c, in ACS::CBDescOut desc); };
typedef CBTASProfile TASProfileCB; interface AlarmTASProfile : ACS::Callback { oneway void alarm_raised(in TASProfile value, in ACSErr::Completion c, in ACS::CBDescOut desc); oneway void alarm_cleared(in TASProfile value, in ACSErr::Completion c, in ACS::CBDescOut desc); };
 typedef AlarmTASProfile TASProfileAlarm; interface PTASProfile: ACS::TypelessProperty { TASProfile get_sync(out ACSErr::Completion c); void get_async(in ACS::CBpattern cb, in ACS::CBDescIn desc); long get_history(in long n_last_values, out TASProfileSeq vs, out ACS::TimeSeq ts); ACS::Monitorpattern create_monitor(in ACS::CBpattern cb, in ACS::CBDescIn desc); ACS::Monitor create_postponed_monitor (in ACS::Time start_time, in ACS::CBpattern cb, in ACS::CBDescIn desc); readonly attribute ACS::TimeInterval default_timer_trigger; readonly attribute ACS::TimeInterval min_timer_trigger; readonly attribute TASProfile default_value; readonly attribute ACS::stringSeq statesDescription; readonly attribute ACS::ConditionSeq condition; readonly attribute TASProfileSeq allStates; };
 interface ROTASProfile: PTASProfile{ ACS::Subscription new_subscription_AlarmEnum(in ACS::Alarmpattern cb, in ACS::CBDescIn desc); readonly attribute TASProfileSeq alarm_on; readonly attribute TASProfileSeq alarm_off; };
 interface RWTASProfile: PTASProfile { ACSErr::Completion set_sync(in TASProfile value); void set_async(in TASProfile value, in ACS::CBvoid cb, in ACS::CBDescIn desc); void set_nonblocking(in TASProfile value);};

 interface NotoActiveSurfaceBoss: ActiveSurface::ActiveSurfaceBoss {
  readonly attribute Management::ROTBoolean enabled;




  readonly attribute ActiveSurface::ROTASProfile pprofile;




  readonly attribute Management::ROTBoolean tracking;
        void stop (in long circle, in long actuator, in long radius) raises (ComponentErrors::ComponentErrorsEx);



        void stow (in long circle, in long actuator, in long radius) raises (ComponentErrors::ComponentErrorsEx);

        void refPos (in long circle, in long actuator, in long radius) raises (ComponentErrors::ComponentErrorsEx);

        void update (in double elevation) raises (ComponentErrors::ComponentErrorsEx);

        void move (in long circle, in long actuator, in long radius, in long incr) raises (ComponentErrors::ComponentErrorsEx);

        void correction (in long circle, in long actuator, in long radius, in double correction) raises (ComponentErrors::ComponentErrorsEx);

        void setProfile (in ActiveSurface::TASProfile profile) raises (ComponentErrors::ComponentErrorsEx);

        void usdStatus4GUIClient (in long circle, in long actuator, out long status) raises (ComponentErrors::ComponentErrorsEx);

        void setActuator (in long circle, in long actuator, out long actPos, out long cmdPos, out long Fmin, out long Fmax, out long acc, out long delay) raises (ComponentErrors::ComponentErrorsEx);




        void up (in long circle, in long actuator, in long radius) raises (ComponentErrors::ComponentErrorsEx);

        void down (in long circle, in long actuator, in long radius) raises (ComponentErrors::ComponentErrorsEx);

        void bottom (in long circle, in long actuator, in long radius) raises (ComponentErrors::ComponentErrorsEx);

        void top (in long circle, in long actuator, in long radius) raises (ComponentErrors::ComponentErrorsEx);

        void reset (in long circle, in long actuator, in long radius) raises (ComponentErrors::ComponentErrorsEx);

        void recoverUSD(in long circle, in long actuator) raises (ComponentErrors::ComponentErrorsEx);

        oneway void calibrate (in long circle, in long actuator, in long radius);

        void calVer (in long circle, in long actuator, in long radius) raises (ComponentErrors::ComponentErrorsEx);
 };

};

#endif
+165 −0
Original line number Diff line number Diff line
/* *******************************************************************/
/* OAC Osservatorio Astronomico di Cagliari                          */
/*                                                                   */
/* This code is under GNU General Public Licence (GPL).              */
/*                                                                   */
/* Who                                when        what               */
/* Carlo Migoni (migoni.ca.astro.it)  24/02/2009  Creation           */
/*********************************************************************/

#ifndef _NOTOACTIVESURFACEBOSS_IDL_

#define _NOTOACTIVESURFACEBOSS_IDL_

#include <baci.idl>
#include <enumpropMACRO.idl>
#include <ComponentErrors.idl>
#include <ASErrors.idl>
#include <ManagmentDefinitions.idl>
#include <ActiveSurfaceBoss.idl>

#pragma prefix "alma"

module ActiveSurface {

    enum TASOneWayAction {
        AS_STOP,
        AS_SETUP,
        AS_STOW,
        AS_REFPOS,
        AS_UP,
        AS_DOWN,
        AS_BOTTOM,
        AS_TOP,
        AS_UPDATE,
        AS_CORRECTION,
        AS_MOVE,
	AS_PROFILE
    };
    ACS_ENUM(TASOneWayAction);

    enum TASProfile {
        AS_SHAPED,
	AS_SHAPED_FIXED,
        AS_PARABOLIC,
	AS_PARABOLIC_FIXED
    };
    ACS_ENUM(TASProfile);
	
	/**
	 * This component is the supervisor of the Noto Active Surface subsystem.
     * It will be used to control the entire active surface, i. e. during an
     * observation or a maintenance situation.
	 * @author <a href=mailto:migoni@ca.astro.it>Carlo Migoni</a>,
 	 * Osservatorio Astronomico di Cagliari, Italia
 	 * <br> 
	*/ 
	interface NotoActiveSurfaceBoss: ActiveSurface::ActiveSurfaceBoss {

        /**
		* This attribute is a general flag that shows if the subsytem led by this component is ok or some problems 
		* happened. It reports the internal staus of the boss. The boss status can be
		* altered by many situation, for example if an exception is found the <i>MNG_WARNING</i> is adopted. The internal
		* status will be valid for 3 seconds then, if not renewed,  it will be considered cleared. The boss status is not changed
		* to a lower level if the present status is not cleared.  If the the attribute <i>enabled</i> is false or the attribute <i>HPBW</i>
		*  is not set,  the status is always  <i>MNG_WARNING</i>. 
		* The meaning of the variuos status is the following:
		* @arg \c <i>MNG_OK</i> no errors everything is ok.
		* @arg \c <i>MNG_WARNING</i> a possible problem has been found, the obervation can continue but it would be better
		*               to investigate the problem.
		* @arg \c <i>MNG_FAILURE</i> a hard problem encoutered, the observation cannot be carried on. 
		*/
		/**readonly attribute Management::ROTSystemStatus status;*/

        /**
		 * This attribute shows if the NotoActiveSurfaceBoss component is enabled or not. Since this component is the subsystem leader and entry point,
		 * enabling or disabling this component corresponds to enabling or
         * disabling the functionality of the Active Surface subsystem.
		 * For example if not enable the component will not forwards any
         * commands to the Active Surface.
		*/
		readonly attribute Management::ROTBoolean enabled;
		
		/*
		 * This attribute shows the M1 profile
		*/
		readonly attribute ActiveSurface::ROTASProfile pprofile;

		/*
		 * This attribute shows if the ActiveSurfaceBoss is tracking or not, i.e., if M1 is refreshed when the elevation changes
		*/
		readonly attribute Management::ROTBoolean tracking;

        /**
		 *  This method can be called in order to disable the component. That
         *  means that the activesurface subsystem cannot be commanded any more via the
		 *  boss. The functionality of single component is not affected at all. By default the boss component comes up enabled. If the component is enabled
		 *  or not, is reported by the property <i>enable</i>.
		 * @throw CORBA::SystemException 
		*/
		//void disableAutoUpdate();
		
		/**
		 *  This method can be called in order to enable the component. That means restore all the functionalities of the  subsystem.
		 *  By default the boss component comes up enabled.
         *  If the component is enabled or not, is reported by the property <i>enabled</i>.
		 * @throw CORBA::SystemException 
		*/		
		//void enableAutoUpdate();

        /**
		 * This is the command line interpreter for the sub-system. All the attributes and all the methods exposed by the boss can be
		 * called. That means a full set of operation for standard observation, but not full control of the system.
		 * @param the string that contains the command line to be parsed
		 * @return the string that contains the answer to the command issued by the input parameter. The caller is resposible to
		 * free the returned string (@sa CORBA::string_free).
		 * @todo provide e full description of the syntax and protocol (to be decided yet)
		*/
		//boolean command (in string command,out string answer);
		//string command(in string cmd) raises (ComponentErrors::ComponentErrorsEx);

        /**
        * All this function are used in observation and maintenance situation
        */
        void stop (in long circle, in long actuator, in long radius) raises (ComponentErrors::ComponentErrorsEx);

        //void setup (in long circle, in long actuator, in long radius) raises (ComponentErrors::ComponentErrorsEx);

        void stow (in long circle, in long actuator, in long radius) raises (ComponentErrors::ComponentErrorsEx);

        void refPos (in long circle, in long actuator, in long radius) raises (ComponentErrors::ComponentErrorsEx);

        void update (in double elevation) raises (ComponentErrors::ComponentErrorsEx);

        void move (in long circle, in long actuator, in long radius, in long incr) raises (ComponentErrors::ComponentErrorsEx);

        void correction (in long circle, in long actuator, in long radius, in double correction) raises (ComponentErrors::ComponentErrorsEx);

        void setProfile (in ActiveSurface::TASProfile profile) raises (ComponentErrors::ComponentErrorsEx);

        void usdStatus4GUIClient (in long circle, in long actuator, out long status) raises (ComponentErrors::ComponentErrorsEx);

        void setActuator (in long circle, in long actuator, out long actPos, out long cmdPos, out long Fmin, out long Fmax, out long acc, out long delay) raises (ComponentErrors::ComponentErrorsEx);

        /**
        * All this function are used in maintenance situation
        */
        void up (in long circle, in long actuator, in long radius) raises (ComponentErrors::ComponentErrorsEx);

        void down (in long circle, in long actuator, in long radius) raises (ComponentErrors::ComponentErrorsEx);

        void bottom (in long circle, in long actuator, in long radius) raises (ComponentErrors::ComponentErrorsEx);

        void top (in long circle, in long actuator, in long radius) raises (ComponentErrors::ComponentErrorsEx);

        void reset (in long circle, in long actuator, in long radius) raises (ComponentErrors::ComponentErrorsEx);

        void recoverUSD(in long circle, in long actuator) raises (ComponentErrors::ComponentErrorsEx);

        oneway void calibrate (in long circle, in long actuator, in long radius);

        void calVer (in long circle, in long actuator, in long radius) raises (ComponentErrors::ComponentErrorsEx);
	};
};

#endif
+52 −0
Original line number Diff line number Diff line
#ifndef _lan_IDL_
#define _lan_IDL_
/** 
* $Id: lan.idl,v 1.1 2009-05-21 15:31:12 c.migoni Exp $
*/

#include <baci.idl>
#include <ASErrors.idl>


#pragma prefix "alma"


module ActiveSurface 
{
   /** @interface lan
     *  This interface rappresents the module converting comunications from serial to lan.
     *  A chain of AS actuator device are linked toghether by a serial 485 line.The serial stream is converted to lan packets.
     *  A chain rappresents a radius of paraboloid. 
     *  the component is istantiated the first time is requested. The a pointer to itself is passed to all the subsequent USD requiring it.
     */
     interface lan : ACS::CharacteristicComponent
	{
	
	    /**
    	*	send a command to adressed USD. 
    	*	@param cmd(in) the command.
    	*	@param addr(in) the serial address.
    	*	@param param(in) the optional parameters(max 4 byte).
    	*	@param nBytes(in) the lenght of param.
    	*
    	*   @return a completion w/o the errors
    	*/
	    ACSErr::Completion sendUSDCmd(in long cmd,in long addr, in long param, in long nBytes);
	    
	    /**
    	*	retrive a parameter from adressed USD. 
    	*	@param cmd(in) the command.
    	*	@param addr(in) the serial address.
    	*	@param nBytes(in) the lenght of param.
    	*	@param param(out) the optional parameters(max 4 byte).
    	*
    	*   @throw ASErrors::ASErrorsEx in case of error.
    	*/
	    void recUSDPar(in long cmd,in long addr,in long nBytes,out long param) raises (ASErrors::ASErrorsEx);
	    
	    readonly attribute ACS::RWdouble delay ;
	    readonly attribute ACS::ROlong status;
	};

};
#endif /* _lan_ */
+191 −0
Original line number Diff line number Diff line
#ifndef _USD_IDL_
#define _USD_IDL_

/*******************************************************************************
* "@(#) $Id: usd.idl,v 1.2 2010-07-26 12:34:49 c.migoni Exp $"
*
* who       when      what
* --------  --------  ----------------------------------------------
* GMM       sept 2005   creation	
* CM	    jan 2013  ACS 8.0.1 adaptions
* CM	    jan 2013  All code revised and adapted to be used from SRTActiveSurfaceBoss component
* CM	    jan 2013  calibrate and calVer routines transformed to oneway
*/

#include <baci.idl>
#include <ASErrors.idl>

#pragma prefix "alma"

module ActiveSurface
{

   /** @interface USD
     *  This interface rappresents a single AS actuator device.
     *  It provides property rapresenting all the actuators variable and methods
		 *  implementing the most usefull action that an actuator (USD) can do.
     */
     interface USD : ACS::CharacteristicComponent
	{
	
    	/**
    	*	the on-reply delay.
    	* 	Usd has a timer for the delay between the last received byte and the transmitter activation. The default is often not enaugh. 
    	*/
    	readonly attribute ACS::RWlong delay;
    	
    	/**
    	*	the last commanded absolute position (ustep)
    	*/
    	readonly attribute ACS::RWlong cmdPos;
    	
    	
    	/**
    	*	the starting velocity (Hz, means step/sec)
    	*/
    	readonly attribute ACS::RWlong Fmin;
    	
    	/**
    	*	the duty velocity (Hz, means step/sec)
    	*	the max speed is 10KHZ
    	*/
    	readonly attribute ACS::RWlong Fmax;
    	
    	/**
    	*	the acceleration factor.
    	* 	Usd has a minimal internal acceleration ramp of ~100KHz/sec.  
    	*  This number relax the base ramp  of factor+1 times,
    	*  i.e. 99 means an acceleration of 1KHz/sec
    	*/
    	readonly attribute ACS::RWlong acc;
    	
    	/**
    	*	configure the USD users bits
    	*/
    	readonly attribute ACS::RWlong uBits;
    	
      /**
    	*	last minute correction
    	*/
    	readonly attribute ACS::RWdouble lmCorr;
    	
			/**
    	*	the actual absolute position (ustep)
    	*/
    	readonly attribute ACS::ROlong actPos;
    	
    	/**
    	*	the status of USD.
    	*	byte 2: unused.\n
    	*	byte 1: n.u.(MSB),DIO2,DIO1,DIO0,n.u.,fault,driv_on,zero. \n
    	*	byte 0: run(MSB),differ_exec,ready,stnby,auto,RS2,RS1,RS0. \n
    	*/
    	readonly attribute ACS::ROpattern status;
    	
    	/**
    	*	the USD software version (must be 1.3).
    	*	this command is often use to check the USD availability
    	*/
    	readonly attribute ACS::ROlong softVer;
    	
    	/**
    	*	the USD type (must be 0x21 USD60xxx)
    	*/
    	readonly attribute ACS::ROlong type;
    	
		/**
    	*	gravity correction
    	*/
    	readonly attribute ACS::RWdouble gravCorr;
    	
    	/**
    	*	user offset
    	*/
    	readonly attribute ACS::RWdouble userOffset;
    	
    	/**
    	*	stop immediate with ramp
    	*/
    	oneway void stop();
    	
    	/**
    	*	soft reset of USD. 
    	*	The position counter will be resetted and the link will restart at 9600bps
    	*/
    	void reset();
    	
    	/**
    	*	move up(out) and down(in) the actuator untill a stop.
    	*	the  command must be sent only when motor is stopped
    	*/
    	oneway void up();
    	oneway void down();
    	
    	/**
    	*	move relative to actual position of an amount of ustep. 
    	*	@param incr the amount to move in ustep. negative number means move down(in).
    	*/
    	oneway void move(in long incr);
    	
		/**
    	*	makes the scale calibration. USD must be against the upper edge. 
    	*	@return 
    	*/
    	//ACSErr::Completion calibrate() raises (ASErrors::ASErrorsEx);
    	oneway void calibrate();

		/**
    	*	makes the scale verification. 
    	*	@return a completion with the result of verification
			*	@throw  ASErrors::USDUnavailableEx or ASErrors::USDunCalibratedEx if the USD is not available or calibrated.
    	*/
	//ACSErr::Completion calVer() raises (ASErrors::ASErrorsEx);
	oneway void calVer();

	/**
	* writes calibration results into CDB
	*/
	void writeCalibration(out double cammaLenD, out double cammaPosD, out boolean calibrate) raises (ASErrors::ASErrorsEx);

	/**
	* sets actuators corrections table
	*/
	void posTable (in ACS::doubleSeq actuatorsCorrections, in long parPositions, in double deltaEL, in long threshold);

		/**
    	*	go to reference position. 
    	*	@return 
    	*/
    	oneway void refPos();

		/**
    	*	set the profile, 0 shaped, 1 parabolic, 2 parabolic fixed. 
    	*/
    	void setProfile(in long prof) raises (ASErrors::ASErrorsEx);

		/**
    	*	set the last minute corrections. 
    	*/
    	oneway void correction(in double corr);

		/**
    	*	recalculates the gravity and user corrections based on antenna elevation. 
    	*/
    	oneway void update(in double elev);
    	/* oneway void update(in long position); */
		
		/**
    	*	stow and setup  
    	*/
    	oneway void stow();
    	oneway void setup();

		/**
    	*	move to most top or bottom positions. These are reached in subsequent movements of maxRun lenght  
    	*/
    	oneway void top();
    	oneway void bottom();
	};

};
#endif /* _USD_ */
+135 KiB

File added.

No diff preview for this file type.

Loading