Commit 3dbc206b authored by Marco Buttu's avatar Marco Buttu
Browse files

Interface, schema and CDB

parent 707cdd93
Loading
Loading
Loading
Loading
+147 −0
Original line number Diff line number Diff line
#ifndef __SUPERVISOR__IDL__ 
#define __SUPERVISOR__IDL__ 

#include <baci.idl>
#include <maciErrType.idl>
#include <ComponentErrors.idl>
#include <ManagmentDefinitions.idl>
#include <AntennaDefinitions.idl>

#pragma prefix "alma"


module Antenna {
 
    struct SupervisorDataBlock {
        ACS::Time timeMark;
        boolean tracking;
        double sunAvoidanceOffset;
    };

    const string SUPERVISOR_DATA_CHANNEL = "SupervisorData";

    interface Supervisor: 
        ACS::CharacteristicComponent,
        Management::CommandInterpreter
    {
   
        /** Take a configuration code and configure the component
         * 
         * This method takes a configuration code, gets the corresponding
         * sun avoidance configuration depending of the receiver setup. 
         *
         * @param code the setup mode (for instance: LLP, KKG, CCB, ecc.)
         * @throw ComponentErrors::ComponentErrorsEx
         */
        void setup(in string code) raises (ComponentErrors::ComponentErrorsEx);
 

        /** Return the actual setup configuration (KKG, CCB, unknown, etc.)
         *
         * In case no setup is given, getSetup() returns "unknown" and a
         * default value for the sun avoidance limit is applied.
         */
        string getSetup();


        /** Set wind avoidance to "ON" or "OFF"
         *
         * In case the wind avoidance is "ON", the Supervisor component parks
         * the antenna in case the average wind is above a safety limit.
         * The default value is "ON".
         *
         * @param mode the activation/deactivation of wind avoidance
         * @throw ComponentErrors::ComponentErrorsEx
         */
        void setWindAvoidance(in string mode) raises (ComponentErrors::ComponentErrorsEx);


        /** Get wind avoidance mode
         *
         * It returns "ON" or "OFF", depending of the current wind avoidance mode.
         *
         * @throw ComponentErrors::ComponentErrorsEx
         */
        string getWindAvoidance() raises (ComponentErrors::ComponentErrorsEx);

 
        /** Set the wind safe limit and override the value read from CDB.
         * 
         * @param limit
         * @throw ComponentErrors::ComponentErrorsEx
         */
        void setWindSafeLimit(in double limit) raises (ComponentErrors::ComponentErrorsEx);
 

        /** Get the wind safe limit.
         * 
         * @throw ComponentErrors::ComponentErrorsEx
         */
        double getWindSafeLimit() raises (ComponentErrors::ComponentErrorsEx);


        /** Set Sun avoidance to "ON" or "OFF"
         *
         * In case the Sun avoidance is "ON", the Supervisor component sets
         * an offset to the pointing every time the distance from the Sun is
         * less than a given safe limit that we read from the CDB.  That limit
         * can also be set by mean of the method setSunSafeLimit().
         * The default value for setSunAvoidance() is "ON".
         *
         * @param mode the activation/deactivation of Sun avoidance
         * @throw ComponentErrors::ComponentErrorsEx
         */
        void setSunAvoidance(in string mode) raises (ComponentErrors::ComponentErrorsEx);


        /** Get Sun avoidance mode
         *
         * It returns "ON" or "OFF", depending of the current Sun avoidance mode.
         *
         * @throw ComponentErrors::ComponentErrorsEx
         */
        string getSunAvoidance() raises (ComponentErrors::ComponentErrorsEx);

 
        /** Set the Sun safe limit and override the value read from CDB.
         * 
         * @param limit
         * @throw ComponentErrors::ComponentErrorsEx
         */
        void setSunSafeLimit(in double limit) raises (ComponentErrors::ComponentErrorsEx);
 

        /** Get the Sun safe limit.
         * 
         * @throw ComponentErrors::ComponentErrorsEx
         */
        double getSunSafeLimit() raises (ComponentErrors::ComponentErrorsEx);

         
        /** Get the current offset applied to the antenna coordinates
         *
         * @throw ComponentErrors::ComponentErrorsEx
         */
        double getSunOffset() raises (ComponentErrors::ComponentErrorsEx);


        /** Return true when the Supervisor is not setting any offset related
         * to the Sun avoidance
         *
         * @throw ComponentErrors::ComponentErrorsEx
         */
        boolean isTracking() raises (ComponentErrors::ComponentErrorsEx);


        /** This property reports the status of the Supervisor.
         *  The returned pattern is a 3 bits field with the following meaning:
         *
         *  @arg \c 0 tracking: value 1 means Supervisor is applying an offset
         *  #arg \c 1 failure: value 1 means the Supervisor is in failure
         */
         readonly attribute ACS::ROpattern status;
 
    };
};

#endif
+3 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ CDB_SCHEMAS = Mount Station PointingModel
# IDL Files and flags
# 
IDL_FILES = Observatory Mount PointingModel EphemGeneratorMACRO_include \
EphemGenerator SkySource OTF Refraction AntennaBoss Moon
EphemGenerator SkySource OTF Refraction AntennaBoss Moon Supervisor
IDL_TAO_FLAGS =
USER_IDL =
ObservatoryStubs_LIBS = baciStubs maciStubs AntennaDefinitionsStubs ComponentErrorsStubs
@@ -48,6 +48,8 @@ AntennaBossStubs_LIBS = baciStubs maciStubs ManagmentDefinitionsStubs Management
                        EphemGeneratorStubs ComponentErrorsStubs AntennaErrorsStubs \
                        AntennaDefinitionsStubs
MoonStubs_LIBS = baciStubs maciStubs EphemGeneratorStubs
SupervisorStubs_LIBS =  baciStubs maciStubs maciErrTypeStubs ComponentErrorsStubs \
    ManagmentDefinitionsStubs AntennaDefinitionsStubs


#
+1 −0
Original line number Diff line number Diff line
!bin/
+34 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Marco Buttu, marco.buttu@inaf.it -->

<xs:schema
    targetNamespace="urn:schemas-cosylab-com:Supervisor:1.0"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="urn:schemas-cosylab-com:Supervisor:1.0"
    xmlns:cdb="urn:schemas-cosylab-com:CDB:1.0"
    xmlns:baci="urn:schemas-cosylab-com:BACI:1.0"
	xmlns:mng="urn:schemas-cosylab-com:Managment:1.0"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified">

    <xs:import namespace="urn:schemas-cosylab-com:CDB:1.0" schemaLocation="CDB.xsd" />
    <xs:import namespace="urn:schemas-cosylab-com:BACI:1.0" schemaLocation="BACI.xsd" />
    <xs:import namespace="urn:schemas-cosylab-com:Managment:1.0" schemaLocation="Managment.xsd"/>

    <xs:complexType name="SupervisorType">
     <xs:complexContent>
      <xs:extension base="baci:CharacteristicComponent">
        <xs:sequence>
            <xs:element name="status" type="baci:ROpattern" />
        </xs:sequence>

        <xs:attribute name="WindLimit" type="xs:double" use="required" />
        <xs:attribute name="SunLimitDEFAULT" type="xs:double" use="required" />
        <xs:attribute name="SunLimitLLP" type="xs:double" use="required" />

      </xs:extension>
     </xs:complexContent>
    </xs:complexType>
    <xs:element name="Supervisor" type="SupervisorType"/>

</xs:schema>
+16 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Marco Buttu <marco.buttu@inaf.it> -->

<Component 
    xmlns="urn:schemas-cosylab-com:Component:1.0" 
    xmlns:baci="urn:schemas-cosylab-com:BACI:1.0"
    xmlns:cdb="urn:schemas-cosylab-com:CDB:1.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              
    Name="Supervisor"    
    Code="Supervisor.SupervisorImpl"
    Type="IDL:alma/Antenna/Supervisor:1.0"
    Container="SupervisorContainer"
    ImplLang="py"
	Default="true"
/>
Loading