Commit d7d67762 authored by Giuseppe Carboni's avatar Giuseppe Carboni Committed by GitHub
Browse files

First implementation of the Calmux component (#362)

* First implementation of the Calmux component

Alongside the component, the IDL interface has been written.
Also, a basic configuration for Noto station has been added to the Noto CDB (both configuration and test CDB)

* Fix #361, removed an unnecessary variable from PyCalmux.xsd schema

* Fix #361, interfaces modified as requested

* Fix #361, changed `Default` attribute of PyCalmux component CDB xml file to `false`
parent d81b3ca1
Loading
Loading
Loading
Loading
+32 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="ISO-8859-1"?>

<!-- Authors: Giuseppe Carboni, giuseppe.carboni@inaf.it -->

<xs:schema
	targetNamespace="urn:schemas-cosylab-com:CalMuxTable:1.0"
	xmlns="urn:schemas-cosylab-com:CalMuxTable:1.0"
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xmlns:cdb="urn:schemas-cosylab-com:CDB:1.0"
	xmlns:baci="urn:schemas-cosylab-com:BACI: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:complexType name="BackendTableHeader">
 		<xs:sequence>
 			<xs:element name="Backend" type="xs:string" />
 			<xs:element name="Channel" type="xs:unsignedInt" />
 			<xs:element name="Polarity" type="xs:unsignedInt" />
 		</xs:sequence>
 	</xs:complexType>
 	
 	<xs:complexType name="BackendTable">
		<xs:sequence>
			<xs:element name="BackendEntry" type="BackendTableHeader"  minOccurs="1" maxOccurs="unbounded" />
		</xs:sequence>
 	</xs:complexType>
 	
 	<xs:element name="CalMuxTable" type="BackendTable" />	
	
</xs:schema>
+32 −0
Original line number Diff line number Diff line
/***************************************************************\
 *  Authors: 
 *      Giuseppe Carboni <giuseppe.carboni@inaf.it>
\***************************************************************/

#ifndef __CAL_DIODE_CONTROLLER_IDL__ 
#define __CAL_DIODE_CONTROLLER_IDL__ 

#include <ComponentErrors.idl>

#pragma prefix "alma"


module Backends {
 
    interface CalDiodeController
    {
        /** Turns on the calibration noise
         *
         * @throw ComponentErrors::ComponentErrorsEx
         */
        void calOn() raises (ComponentErrors::ComponentErrorsEx);

        /** Turns off the calibration noise
         *
         * @throw ComponentErrors::ComponentErrorsEx
         */
        void calOff() raises (ComponentErrors::ComponentErrorsEx);
    };
};

#endif
+53 −0
Original line number Diff line number Diff line
/***************************************************************\
 *  Authors: 
 *      Giuseppe Carboni <giuseppe.carboni@inaf.it>
\***************************************************************/

#ifndef __CAL_MUX_IDL__ 
#define __CAL_MUX_IDL__ 

#include <ComponentErrors.idl>
#include "CalDiodeController.idl"

#pragma prefix "alma"


module Backends {
 
    interface CalMux : CalDiodeController
    {
        /** Take the backend name and configurate the component
         *
         * @param backend_name the name of the backend that will handle the calibration diode
         * @throw ComponentErrors::ComponentErrorsEx
         */
        void setup(in string backend_name) raises (ComponentErrors::ComponentErrorsEx);

        /** Returns the current setup
         *
         * @return an empty string if no backend is controlling the calibration diode,
         * otherwise the name of the backend that controls the calibration diode
         */
        string getSetup();

        /** Return the current selected channel
         *
         * @return an integer representing the current channel
         */
        long getChannel() raises (ComponentErrors::ComponentErrorsEx);

        /** Return the current channel polarity
         *
         * @return an integer representing the current channel polarity
         */
        long getPolarity() raises (ComponentErrors::ComponentErrorsEx);

        /** Return the current calibration noise status
         *
         * @return the status of the calibration noise
         */
        long getCalStatus() raises (ComponentErrors::ComponentErrorsEx);
    };
};

#endif
+4 −2
Original line number Diff line number Diff line
@@ -28,12 +28,12 @@ MAKE_PDF = ON
#
# Configuration Database Files
# ----------------------------
CDB_SCHEMAS = GenericBackend DigitalXCorrelator Holography
CDB_SCHEMAS = GenericBackend DigitalXCorrelator Holography CalMuxTable

# 
# IDL Files and flags
# 
IDL_FILES = GenericBackend BackendsBoss TotalPower NoiseGenerator DigitalXCorrelator Holography DBBC DFBInterface Sardara
IDL_FILES = GenericBackend BackendsBoss TotalPower NoiseGenerator DigitalXCorrelator Holography DBBC DFBInterface Sardara CalDiodeController CalMux
IDL_TAO_FLAGS =
USER_IDL =

@@ -49,6 +49,8 @@ HolographyStubs_LIBS = baciStubs GenericBackendStubs
DBBCStubs_LIBS = baciStubs GenericBackendStubs
DFBInterfaceStubs_LIBS = baciStubs GenericBackendStubs
SardaraStubs_LIBS = baciStubs GenericBackendStubs
CalDiodeControllerStubs_LIBS = baciStubs ComponentErrorsStubs
CalMuxStubs_LIBS = baciStubs ComponentErrorsStubs CalDiodeControllerStubs

#
# list of all possible C-sources (used to create automatic dependencies)
+32 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- 
     Giuseppe Carboni, giuseppe.carboni@inaf.it
-->

<xs:schema
    targetNamespace="urn:schemas-cosylab-com:PyCalmux:1.0"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="urn:schemas-cosylab-com:PyCalmux: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="PyCalmuxType">
        <xs:complexContent>
            <xs:extension base="baci:CharacteristicComponent">
                <xs:attribute name="IP" type="xs:string" use="required" />
                <xs:attribute name="PORT" type="xs:unsignedShort" use="required" />
                <xs:attribute name="MAX_CHANNELS" type="xs:unsignedInt" use="optional" default="17"/>
                <xs:attribute name="INTERNAL_CHANNEL" type="xs:unsignedInt" use="optional" default="16"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:element name="PyCalmux" type="PyCalmuxType" />
</xs:schema>
Loading