Skip to content
Snippets Groups Projects
Commit 583137da authored by Giuseppe Carboni's avatar Giuseppe Carboni Committed by GitHub
Browse files

Porting master branch features into stable

parents b2e657a2 590ce504
No related branches found
No related tags found
No related merge requests found
Showing
with 762 additions and 144 deletions
......@@ -68,3 +68,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/
### Fixed
issue #452 - The Total Power component erroneously assigned a timestamp to the samples in case more samples were needed to reach total integration time
issue #473 - The SRT AS USDs now retry 5 times to communicate with the hardware before setting their state to unavailable
## [discos1.0.4] 03-02-2020
### Added
issue #505 - CALMUX integrated and tested into the SRT production line (it has been successfully tested with DBBC and DFB backends)
### Changed
issue #477 - removed the SecureArea from some AntennaBoss methods
issue #476 - replaced all occurrencies of DPI/2 with the defined variable DPIBY2, this should improve precision
issue #489 - new focus curve for SRT X band receiver
issue #506 - each SRT local oscillator now has its dedicated container
issue #510 - fixed SRT TotalPower CDB configuration in order to use the correct IP address
### Fixed
issue #433 - limited refraction correction values to a meaningful range in order to avoid flooding the jlog with warning messages whenever the elevation is close to 90 degrees
issue #502 - removed last service daemon reference from Manager.xml io SRT production line
......@@ -841,7 +841,7 @@ bool CIRATools::latitudeToRad(const IRA::CString& lat,double& rad,bool complete,
res=sexagesimalAngleToRad(lat,rad,complete,delimiter);
}
if (complete) {
if ((rad<-(DPI/2)) || (rad>(DPI/2))) return false;
if (rad<-DPIBY2 || rad>DPIBY2) return false;
else return res;
}
else return res;
......@@ -915,7 +915,7 @@ bool CIRATools::elevationToRad(const IRA::CString& el,double& rad,bool complete)
{
bool res=angleToRad(el,rad);
if (complete) {
if ((rad<0) || (rad>DPI/2)) return false;
if (rad<0 || rad>DPIBY2) return false;
else return res;
}
else return res;
......
......@@ -202,7 +202,7 @@ int main(int argc, char *argv[])
_CP_ printf("Horizontal coordinates:\tazimuth %.8lf°, elevation %.8lf°\n",az*DR2D,el*DR2D);
double obsZenithDistance=(DPI/2.0)-el;
double obsZenithDistance=DPIBY2-el;
double corZenithDistance;
double tdk = 13 + 273.0; // temperature
double wl = 36000.0;
......
......@@ -673,6 +673,7 @@ private:
SmartPropertyPointer<ROdouble> m_pdeclinationOffset;
SmartPropertyPointer<ROdouble> m_plongitudeOffset;
SmartPropertyPointer<ROdouble> m_platitudeOffset;
CBossCore *m_boss;
IRA::CSecureArea<CBossCore> *m_core;
CWorkingThread *m_workingThread;
CWatchingThread *m_watchingThread;
......
......@@ -56,6 +56,7 @@ AntennaBossImpl::AntennaBossImpl(const ACE_CString &CompName,maci::ContainerServ
m_pdeclinationOffset(this),
m_plongitudeOffset(this),
m_platitudeOffset(this),
m_boss(NULL),
m_core(NULL)
{
AUTO_TRACE("AntennaBossImpl::AntennaBossImpl()");
......@@ -71,7 +72,6 @@ AntennaBossImpl::~AntennaBossImpl()
void AntennaBossImpl::initialize() throw (ACSErr::ACSbaseExImpl)
{
AUTO_TRACE("AntennaBossImpl::initialize()");
CBossCore *boss;
ACS_LOG(LM_FULL_INFO,"AntennaBossImpl::initialize()",(LM_INFO,"AntennaBoss::COMPSTATE_INITIALIZING"));
try {
m_config.init(getContainerServices()); //throw CDBAcessExImpl;
......@@ -81,8 +81,8 @@ void AntennaBossImpl::initialize() throw (ACSErr::ACSbaseExImpl)
throw _dummy;
}
try {
boss=(CBossCore *)new CBossCore(getContainerServices(),&m_config,this);
m_core=new IRA::CSecureArea<CBossCore>(boss);
m_boss=(CBossCore *)new CBossCore(getContainerServices(),&m_config,this);
m_core=new IRA::CSecureArea<CBossCore>(m_boss);
m_ptarget=new ROstring(getContainerServices()->getName()+":target",getComponent(),new DevIOTargetName(m_core),true);
m_prawAzimuth=new ROdouble(getContainerServices()->getName()+":rawAzimuth",getComponent(),
new DevIORawHorizontal(m_core,DevIORawHorizontal::AZIMUTH),true);
......@@ -143,16 +143,16 @@ void AntennaBossImpl::initialize() throw (ACSErr::ACSbaseExImpl)
new DevIOOffsets(m_core,DevIOOffsets::LATITUDEOFF),true);
// create the parser for command line execution
m_parser = new SimpleParser::CParser<CBossCore>(boss,10);
m_parser = new SimpleParser::CParser<CBossCore>(m_boss,10);
}
catch (std::bad_alloc& ex) {
_EXCPT(ComponentErrors::MemoryAllocationExImpl,dummy,"AntennaBossImpl::initialize()");
throw dummy;
}
boss->initialize(); //could throw (ComponentErrors::UnexpectedExImpl)
m_boss->initialize(); //could throw (ComponentErrors::UnexpectedExImpl)
try {
m_watchingThread=getContainerServices()->getThreadManager()->create<CWatchingThread,CBossCore*>
("BOSSWATCHER",boss);
("BOSSWATCHER",m_boss);
m_workingThread=getContainerServices()->getThreadManager()->create<CWorkingThread,CSecureArea<CBossCore> *>
("BOSSWORKER",m_core);
}
......@@ -164,30 +164,30 @@ void AntennaBossImpl::initialize() throw (ACSErr::ACSbaseExImpl)
_THROW_EXCPT(ComponentErrors::UnexpectedExImpl,"AntennaBossImpl::initialize()");
}
// inform the boss core of the thread in charge of trajectory update
boss->setWorkingThread(m_workingThread);
m_boss->setWorkingThread(m_workingThread);
// configure the parser.....
m_parser->add("antennaDisable",new function0<CBossCore,non_constant,void_type >(boss,&CBossCore::disable),0);
m_parser->add("antennaEnable",new function0<CBossCore,non_constant,void_type >(boss,&CBossCore::enable),0);
m_parser->add("antennaCorrectionOn",new function0<CBossCore,non_constant,void_type >(boss,&CBossCore::enableCorrection),0);
m_parser->add("antennaCorrectionOff",new function0<CBossCore,non_constant,void_type >(boss,&CBossCore::disableCorrection),0);
m_parser->add("antennaPark",new function0<CBossCore,non_constant,void_type >(boss,&CBossCore::stow),0);
m_parser->add("antennaStop",new function0<CBossCore,non_constant,void_type >(boss,&CBossCore::stop),0);
m_parser->add("antennaAzEl",new function0<CBossCore,non_constant,void_type >(boss,&CBossCore::setPreset),0);
m_parser->add("antennaTrack",new function0<CBossCore,non_constant,void_type >(boss,&CBossCore::setProgramTrack),0);
m_parser->add("antennaUnstow",new function0<CBossCore,non_constant,void_type >(boss,&CBossCore::unstow),0);
m_parser->add("antennaSetup",new function1<CBossCore,non_constant,void_type,I<string_type> >(boss,&CBossCore::setup),1);
m_parser->add("preset",new function2<CBossCore,non_constant,void_type,I<angle_type<rad> >,I<angle_type<rad> > >(boss,&CBossCore::preset),2);
//m_parser->add("vlsr",new function1<CBossCore,non_constant,void_type,I<double_type> >(boss,&CBossCore::setVlsr),1);
m_parser->add("fwhm",new function2<CBossCore,non_constant,void_type,I<angle_type<rad> >, I<double_type> >(boss,&CBossCore::setFWHM),2);
m_parser->add("azelOffsets",new function2<CBossCore,non_constant,void_type,I<angleOffset_type<rad> >,I<angleOffset_type<rad> > >(boss,&CBossCore::setHorizontalOffsets),2);
m_parser->add("radecOffsets",new function2<CBossCore,non_constant,void_type,I<angleOffset_type<rad> >,I<angleOffset_type<rad> > >(boss,&CBossCore::setEquatorialOffsets),2);
m_parser->add("lonlatOffsets",new function2<CBossCore,non_constant,void_type,I<angleOffset_type<rad> >,I<angleOffset_type<rad> > >(boss,&CBossCore::setGalacticOffsets),2);
//m_parser->add("skydipOTF",new function3<CBossCore,non_constant,time_type,I<elevation_type<rad,false> >,I<elevation_type<rad,false> >,I<interval_type> >(boss,&CBossCore::skydip),3);
m_parser->add("antennaReset",new function0<CBossCore,non_constant,void_type >(boss,&CBossCore::resetFailures),0);
//m_parser->add("goOff",new function2<CBossCore,non_constant,void_type,I<enum_type<AntennaFrame2String,Antenna::TCoordinateFrame > >,I<double_type > >(boss,&CBossCore::goOff),2);
m_parser->add("antennaDisable",new function0<CBossCore,non_constant,void_type >(m_boss,&CBossCore::disable),0);
m_parser->add("antennaEnable",new function0<CBossCore,non_constant,void_type >(m_boss,&CBossCore::enable),0);
m_parser->add("antennaCorrectionOn",new function0<CBossCore,non_constant,void_type >(m_boss,&CBossCore::enableCorrection),0);
m_parser->add("antennaCorrectionOff",new function0<CBossCore,non_constant,void_type >(m_boss,&CBossCore::disableCorrection),0);
m_parser->add("antennaPark",new function0<CBossCore,non_constant,void_type >(m_boss,&CBossCore::stow),0);
m_parser->add("antennaStop",new function0<CBossCore,non_constant,void_type >(m_boss,&CBossCore::stop),0);
m_parser->add("antennaAzEl",new function0<CBossCore,non_constant,void_type >(m_boss,&CBossCore::setPreset),0);
m_parser->add("antennaTrack",new function0<CBossCore,non_constant,void_type >(m_boss,&CBossCore::setProgramTrack),0);
m_parser->add("antennaUnstow",new function0<CBossCore,non_constant,void_type >(m_boss,&CBossCore::unstow),0);
m_parser->add("antennaSetup",new function1<CBossCore,non_constant,void_type,I<string_type> >(m_boss,&CBossCore::setup),1);
m_parser->add("preset",new function2<CBossCore,non_constant,void_type,I<angle_type<rad> >,I<angle_type<rad> > >(m_boss,&CBossCore::preset),2);
//m_parser->add("vlsr",new function1<CBossCore,non_constant,void_type,I<double_type> >(m_boss,&CBossCore::setVlsr),1);
m_parser->add("fwhm",new function2<CBossCore,non_constant,void_type,I<angle_type<rad> >, I<double_type> >(m_boss,&CBossCore::setFWHM),2);
m_parser->add("azelOffsets",new function2<CBossCore,non_constant,void_type,I<angleOffset_type<rad> >,I<angleOffset_type<rad> > >(m_boss,&CBossCore::setHorizontalOffsets),2);
m_parser->add("radecOffsets",new function2<CBossCore,non_constant,void_type,I<angleOffset_type<rad> >,I<angleOffset_type<rad> > >(m_boss,&CBossCore::setEquatorialOffsets),2);
m_parser->add("lonlatOffsets",new function2<CBossCore,non_constant,void_type,I<angleOffset_type<rad> >,I<angleOffset_type<rad> > >(m_boss,&CBossCore::setGalacticOffsets),2);
//m_parser->add("skydipOTF",new function3<CBossCore,non_constant,time_type,I<elevation_type<rad,false> >,I<elevation_type<rad,false> >,I<interval_type> >(m_boss,&CBossCore::skydip),3);
m_parser->add("antennaReset",new function0<CBossCore,non_constant,void_type >(m_boss,&CBossCore::resetFailures),0);
//m_parser->add("goOff",new function2<CBossCore,non_constant,void_type,I<enum_type<AntennaFrame2String,Antenna::TCoordinateFrame > >,I<double_type > >(m_boss,&CBossCore::goOff),2);
m_parser->add("radialVelocity",new function3<CBossCore,non_constant,void_type,I< basic_type<double,double_converter,VRad_WildCard> >,
I<enum_type<ReferenceFrame_converter,Antenna::TReferenceFrame,ReferenceFrame_WildCard> >,
I<enum_type<VradDefinition_converter,Antenna::TVradDefinition,VradDefinition_WildCard> > >(boss,&CBossCore::radialVelocity),3);
I<enum_type<VradDefinition_converter,Antenna::TVradDefinition,VradDefinition_WildCard> > >(m_boss,&CBossCore::radialVelocity),3);
ACS_LOG(LM_FULL_INFO,"AntennaBossImpl::initialize()",(LM_INFO,"COMPSTATE_INITIALIZED"));
}
......@@ -543,9 +543,12 @@ void AntennaBossImpl::getRawCoordinates(ACS::Time time,CORBA::Double_out az,CORB
{
double Az=0.0;
double El=0.0;
//workaround for strange behavior: this method seems so be called at startup before initialize() completes
//this result in a segmentation fault because m_boss is not initialized yet. Has it something to do with the
//CoordinateGrabber? it strangely uses the methods that are affected by this problem.
if (!m_boss) return;
TIMEVALUE requestTime(time);
CSecAreaResourceWrapper<CBossCore> resource=m_core->Get("IMPL:getRawcoordinate");
resource->getRawHorizontal(requestTime,Az,El);
m_boss->getRawHorizontal(requestTime,Az,El);
az=(CORBA::Double)Az;
el=(CORBA::Double)El;
}
......@@ -562,14 +565,10 @@ void AntennaBossImpl::getObservedEquatorial(ACS::Time time,ACS::TimeInterval dur
{
double Ra=0.0;
double Dec=0.0;
//workaround for strange behavior: this method seems so be called at startup before initialize() completes
//this result in a segmentation fault because m_core is not created yet. Has it something to do with the
//CoordinateGrabber? it strangely uses the methods that are affected by this problem.
if (!m_core) return;
if (!m_boss) return;
TIMEVALUE requestTime(time);
TIMEDIFFERENCE requestedDuration(duration);
CSecAreaResourceWrapper<CBossCore> resource=m_core->Get("IMPL:getObservedEquatorial");
resource->getObservedEquatorial(requestTime,requestedDuration,Ra,Dec);
m_boss->getObservedEquatorial(requestTime,requestedDuration,Ra,Dec);
ra=(CORBA::Double)Ra;
dec=(CORBA::Double)Dec;
}
......@@ -579,11 +578,10 @@ void AntennaBossImpl::getObservedGalactic(ACS::Time time,ACS::TimeInterval durat
{
double Long=0.0;
double Lat=0.0;
if (!m_core) return;
if (!m_boss) return;
TIMEVALUE requestTime(time);
TIMEDIFFERENCE requestedDuration(duration);
CSecAreaResourceWrapper<CBossCore> resource=m_core->Get("IMPL:getObservedgalactic");
resource->getObservedGalactic(requestTime,requestedDuration,Long,Lat);
m_boss->getObservedGalactic(requestTime,requestedDuration,Long,Lat);
longitude=(CORBA::Double)Long;
latitude=(CORBA::Double)Lat;
}
......@@ -593,12 +591,10 @@ void AntennaBossImpl::getObservedHorizontal(ACS::Time time,ACS::TimeInterval dur
{
double Az=0.0;
double El=0.0;
// see GetObservedEquatorial for a comment
if (!m_core) return;
if (!m_boss) return;
TIMEVALUE requestTime(time);
TIMEDIFFERENCE requestedDuration(duration);
CSecAreaResourceWrapper<CBossCore> resource=m_core->Get("IMPL:getObservedHorizontal");
resource->getObservedHorizontal(requestTime,requestedDuration,Az,El);
m_boss->getObservedHorizontal(requestTime,requestedDuration,Az,El);
az=(CORBA::Double)Az;
el=(CORBA::Double)El;
}
......
......@@ -1023,7 +1023,7 @@ bool CBossCore::updateAttributes() throw (ComponentErrors::CORBAProblemExImpl,Co
loadPointingModel(m_pointingModel); // throw ComponentErrors::CouldntGetComponentExImpl
// get Offset from refraction;
try {
m_refraction->getCorrection(DPI/2.0-el,m_waveLength,m_refractionOffset);
m_refraction->getCorrection(DPIBY2-el,m_waveLength,m_refractionOffset);
}
catch (AntennaErrors::AntennaErrorsEx& ex) {
_ADD_BACKTRACE(ComponentErrors::CouldntCallOperationExImpl,impl,ex,"CBossCore::updateAttributes()");
......@@ -1249,7 +1249,7 @@ void CBossCore::loadTrackingPoint(const TIMEVALUE& time,bool restart) throw (Com
refOff=0.0;
try {
if (el>0.0) {
m_refraction->getCorrection(DPI/2.0-el,m_waveLength,refOff);
m_refraction->getCorrection(DPIBY2-el,m_waveLength,refOff);
}
}
catch (AntennaErrors::AntennaErrorsEx& ex) {
......
......@@ -118,11 +118,9 @@ void CRefractionCore::cleanUp()
void CRefractionCore::getCorrection(double obsZenithDistance,double waveLen, double &corZenithDistance)
{
AUTO_TRACE("CRefractionCore::getCorrection()");
//double elevation;
double correction = 0.0;
baci::ThreadSyncGuard guardParametes(&m_parametersMutex);
//elevation = 90.0 - obsZenithDistance*DR2D;
//if (elevation >= 0.0 && elevation <= 90.0) {
if ((obsZenithDistance>=0.0) && (obsZenithDistance<=(DPI/2.0))) {
if (obsZenithDistance>=0.0 && obsZenithDistance<DPIBY2) {
double hm = m_site.getHeight(); // meters
double tdk = m_temperature + 273.0;
double wl = waveLen*1000000; //micro meters
......@@ -130,9 +128,14 @@ void CRefractionCore::getCorrection(double obsZenithDistance,double waveLen, dou
double tlr = 0.0065;
double eps = 1e-8;
slaRefro(obsZenithDistance, hm, tdk, m_pressure, m_humidity, wl, phi, tlr, eps, &corZenithDistance);
slaRefro(obsZenithDistance, hm, tdk, m_pressure, m_humidity, wl, phi, tlr, eps, &correction);
correction = std::min(correction, 2.0e17);
if(correction < 1.0e-9) {
correction = 0.0;
}
else corZenithDistance = 0.0;
}
corZenithDistance = correction;
}
void CRefractionCore::getMeteoParameters()
......
......@@ -751,21 +751,34 @@ private:
inline void clearStatusField(TstatusFields field) { m_backendStatus &= ~(1 << field); }
bool m_SK77;
bool m_SK00;
bool m_SK01;
bool m_SK02;
bool m_SK03;
bool m_SK04;
bool m_SK05;
bool m_SK06;
bool m_SK00;
bool m_SC00;
bool m_SL00;
bool m_SP00;
bool m_SK77S;
bool m_SK00S;
bool m_SK01S;
bool m_SK02S;
bool m_SK03S;
bool m_SK04S;
bool m_SK05S;
bool m_SK06S;
bool m_SK00S;
bool m_SC00S;
bool m_SL00S;
bool m_SP00S;
bool m_SCC00;
bool m_SCH00;
bool m_SCC00S;
bool m_SCH00S;
bool m_stationSRT;
bool m_stationMED;
};
......
This diff is collapsed.
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Marco Buttu, marco.buttu@inaf.it -->
<xs:schema
targetNamespace="urn:schemas-cosylab-com:Positioner:1.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="urn:schemas-cosylab-com:Positioner:1.0"
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="PositionerType">
<xs:complexContent>
<xs:extension base="baci:CharacteristicComponent">
<xs:sequence>
<xs:element name="status" type="baci:ROpattern" />
<xs:element name="position" type="baci:ROdouble" />
<xs:element name="current" type="baci:ROdouble" />
<xs:element name="seq" type="baci:ROdoubleSeq" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="Positioner" type="PositionerType"/>
</xs:schema>
/*************************************************\
* Author: Marco Buttu <marco.buttu@inaf.it>
\*************************************************/
#ifndef __TESTNAMESPACE_INTERFACE__IDL__
#define __TESTNAMESPACE_INTERFACE__IDL__
#include <baci.idl>
#pragma prefix "alma"
module TestNamespaceInterface {
struct PositionerDataBlock {
boolean ready;
};
const string POSITIONER_DATA_CHANNEL = "PositionerData";
interface Positioner: ACS::CharacteristicComponent
{
/** Set the position */
void setPosition(in double position);
/** Return the actual position */
double getPosition();
/** Set a dummy sequence */
void setSequence(in ACS::doubleSeq seq);
/** Return a dummy sequence */
ACS::doubleSeq getSequence();
/** This property reports the status (4 bits pattern) of the Positioner. */
readonly attribute ACS::ROpattern status;
/** This property reports the position of the Positioner. */
readonly attribute ACS::ROdouble position;
/** This property reports the current of the Positioner engine. */
readonly attribute ACS::ROdouble current;
/** A dummy sequence */
readonly attribute ACS::ROdoubleSeq seq;
};
};
#endif
#*****************************************************************
# Positioner Makefile
# ===================
# A Component to be used for testing purpose
# Marco Buttu <marco.buttu@inaf.it>
#*****************************************************************
# Interface
# ----------------------------
CDB_SCHEMAS = Positioner
IDL_FILES = TestNamespaceInterface
TestNamespaceInterfaceStubs_LIBS = baciStubs acscomponentStubs
# Python directives
PY_PACKAGES = Positioner
# Documentation
MAKE_PDF = ON
# List of all possible C-sources (used to create automatic dependencies)
CSOURCENAMES = \
$(foreach exe, $(EXECUTABLES) $(EXECUTABLES_L), $($(exe)_OBJECTS)) \
$(foreach rtos, $(RTAI_MODULES) , $($(rtos)_OBJECTS)) \
$(foreach lib, $(LIBRARIES) $(LIBRARIES_L), $($(lib)_OBJECTS))
TMP := $(shell searchFile /tmp/tmp.txt)
ifeq ($(TMP),\#error\#)
PERM:=$(shell stat --format=%a $(ERRXMLFILE))
else
PERM=$(shell cat /tmp/tmp.txt)
endif
# Include standards
MAKEDIRTMP := $(shell searchFile include/acsMakefile)
ifneq ($(MAKEDIRTMP),\#error\#)
MAKEDIR := $(MAKEDIRTMP)/include
include $(MAKEDIR)/acsMakefile
endif
# TARGETS
all: do_all
@echo " . . . 'all' done"
clean : clean_all
# Clear INTROOT interface
$(RM) $(INTROOT)/lib/python/site-packages/TestNamespace*
# Clear INTROOT Impl
$(RM) $(INTROOT)/lib/python/site-packages/Positioner*
$(RM) $(INTROOT)/lib/python/site-packages/libPositionerStubs.*
# Clear local lib
$(RM) *~ *Impl/*~ Positioner/*.pyc
$(RM) ../bin/
$(RM) ../include/
$(RM) ../lib/
$(RM) ../object/
$(RM) ../rtai/
@echo " . . . clean done"
clean_dist : clean_all clean_dist_all
@echo " . . . clean_dist done"
man : do_man
@echo " . . . man page(s) done"
install : install_all
@rm -rf /tmp/tmp.txt
@echo " . . . installation done"
@echo " . . . installation done"
from __future__ import print_function
import time
from Acspy.Servants.CharacteristicComponent import CharacteristicComponent as cc
from Acspy.Servants.ContainerServices import ContainerServices as services
from Acspy.Servants.ComponentLifecycle import ComponentLifecycle as lcycle
from Acspy.Util.BaciHelper import addProperty
from Acspy.Common.Log import getLogger
from TestNamespaceInterface__POA import Positioner as POA
from Positioner.devios import GenericDevIO, PositionDevIO, SequenceDevIO
__copyright__ = "Marco Buttu <marco.buttu@inaf.it>"
logger = getLogger()
class PositionerImpl(POA, cc, services, lcycle):
def __init__(self):
cc.__init__(self)
services.__init__(self)
self.position = 0
self.sequence = [1.1, 2.2, 3.3]
def initialize(self):
addProperty(self, 'status', devio_ref=GenericDevIO())
addProperty(self, 'position', devio_ref=PositionDevIO(self))
addProperty(self, 'current', devio_ref=GenericDevIO())
addProperty(self, 'seq', devio_ref=SequenceDevIO(self))
print('Component initialized')
def setPosition(self, position):
print('Setting the position to ', position)
self.position = position
def getPosition(self):
return self.position
def setSequence(self, sequence):
self.sequence = sequence
def getSequence(self):
return self.sequence
from ACSImpl.DevIO import DevIO
class GenericDevIO(DevIO):
def __init__(self, value=0):
DevIO.__init__(self, value)
def read(self):
return self.value
def write(self, value):
self.value = value
class PositionDevIO(DevIO):
def __init__(self, device):
self.device = device
DevIO.__init__(self, device.getPosition())
def read(self):
return self.device.getPosition()
class SequenceDevIO(DevIO):
def __init__(self, device):
self.device = device
DevIO.__init__(self, self.read())
def read(self):
return self.device.getSequence()
......@@ -13,7 +13,7 @@
CommandLineTimeout="10000000"
ConnectTimeout="3000000"
PropertyRefreshTime="1000000"
Configuration="SC00"
Configuration="SCC00"
TimeTollerance="250000"
RepetitionCacheTime="2000000"
RepetitionExpireTime="5000000"
......
......@@ -21,7 +21,7 @@
</Configuration>
<Configuration>
<configurationID>SK03</configurationID>
<configurationID>SK01</configurationID>
<sections>4</sections>
<calSwitchingEnabled>TRUE</calSwitchingEnabled>
<inputPort>GREGORIAN</inputPort>
......@@ -30,43 +30,28 @@
<attenuation>7.0</attenuation>
<section_boards>0 1 2 3</section_boards>
<polarizations>L R L R</polarizations>
<feed>0 0 3 3</feed>
<feed>0 0 1 1</feed>
<IF>0 1 0 1</IF>
<bins>1024</bins>
</Configuration>
<Configuration>
<configurationID>SK06</configurationID>
<sections>4</sections>
<calSwitchingEnabled>TRUE</calSwitchingEnabled>
<inputPort>GREGORIAN</inputPort>
<beams>2</beams>
<bandWidth>1500.0</bandWidth>
<attenuation>7.0</attenuation>
<section_boards>0 1 2 3</section_boards>
<polarizations>L R L R</polarizations>
<feed>0 0 6 6</feed>
<IF>0 1 0 1</IF>
<bins>1024</bins>
</Configuration>
<Configuration>
<configurationID>SK77</configurationID>
<sections>14</sections>
<configurationID>SCC00</configurationID>
<sections>2</sections>
<calSwitchingEnabled>TRUE</calSwitchingEnabled>
<inputPort>GREGORIAN</inputPort>
<beams>7</beams>
<inputPort>BWG</inputPort>
<beams>1</beams>
<bandWidth>1500.0</bandWidth>
<attenuation>7.0</attenuation>
<section_boards>0 1 2 3 4 5 6 7 8 9 10 11 12 13</section_boards>
<polarizations>L R L R L R L R L R L R L R</polarizations>
<feed>0 0 1 1 2 2 3 3 4 4 5 5 6 6</feed>
<IF>0 1 0 1 0 1 0 1 0 1 0 1 0 1</IF>
<attenuation>9.0</attenuation>
<section_boards>0 1</section_boards>
<polarizations>L R</polarizations>
<feed>0 0</feed>
<IF>0 1</IF>
<bins>1024</bins>
</Configuration>
<Configuration>
<configurationID>SC00</configurationID>
<configurationID>SCH00</configurationID>
<sections>2</sections>
<calSwitchingEnabled>TRUE</calSwitchingEnabled>
<inputPort>BWG</inputPort>
......@@ -126,7 +111,7 @@
</Configuration>
<Configuration>
<configurationID>SK03S</configurationID>
<configurationID>SK01S</configurationID>
<sections>4</sections>
<calSwitchingEnabled>TRUE</calSwitchingEnabled>
<inputPort>GREGORIAN</inputPort>
......@@ -135,43 +120,28 @@
<attenuation>7.0</attenuation>
<section_boards>0 1 2 3</section_boards>
<polarizations>S S S S</polarizations>
<feed>0 0 3 3</feed>
<feed>0 0 1 1</feed>
<IF>0 1 0 1</IF>
<bins>1024</bins>
</Configuration>
<Configuration>
<configurationID>SK06S</configurationID>
<sections>4</sections>
<calSwitchingEnabled>TRUE</calSwitchingEnabled>
<inputPort>GREGORIAN</inputPort>
<beams>2</beams>
<bandWidth>1500.0</bandWidth>
<attenuation>7.0</attenuation>
<section_boards>0 1 2 3</section_boards>
<polarizations>S S S S</polarizations>
<feed>0 0 6 6</feed>
<IF>0 1 0 1</IF>
<bins>1024</bins>
</Configuration>
<Configuration>
<configurationID>SK77S</configurationID>
<sections>14</sections>
<configurationID>SCC00S</configurationID>
<sections>2</sections>
<calSwitchingEnabled>TRUE</calSwitchingEnabled>
<inputPort>GREGORIAN</inputPort>
<beams>7</beams>
<inputPort>BWG</inputPort>
<beams>1</beams>
<bandWidth>1500.0</bandWidth>
<attenuation>7.0</attenuation>
<section_boards>0 1 2 3 4 5 6 7 8 9 10 11 12 13</section_boards>
<polarizations>S S S S S S S S S S S S S S</polarizations>
<feed>0 0 1 1 2 2 3 3 4 4 5 5 6 6</feed>
<IF>0 1 0 1 0 1 0 1 0 1 0 1 0 1</IF>
<attenuation>9.0</attenuation>
<section_boards>0 1</section_boards>
<polarizations>S S</polarizations>
<feed>0 0</feed>
<IF>0 1</IF>
<bins>1024</bins>
</Configuration>
<Configuration>
<configurationID>SC00S</configurationID>
<configurationID>SCH00S</configurationID>
<sections>2</sections>
<calSwitchingEnabled>TRUE</calSwitchingEnabled>
<inputPort>BWG</inputPort>
......
<?xml version="1.0" encoding="ISO-8859-1"?>
<EventChannel xmlns="urn:schemas-cosylab-com:EventChannel:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
IntegrationLogs="false"
MaxQueueLength="5"
MaxSuppliers="20"
RejectNewEvents="false"
DiscardPolicy="FifoOrder"
EventReliability="BestEffort"
ConnectionReliability="Persistent">
<Events>
<_ Name="PositionerDataBlock" MaxProcessTime="2.0"/>
</Events>
</EventChannel>
<?xml version="1.0" encoding="utf-8"?>
<!--
Giuseppe Carboni <giuseppe.carboni@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="PyCalmux"
Code="Calmux.PyCalmuxImpl"
Type="IDL:alma/Backends/CalMux:1.0"
Container="PyCalmuxContainer"
ImplLang="py"
KeepAliveTime="-1"
Default="false"
/>
<?xml version="1.0" encoding="utf-8"?>
<!-- Marco Buttu <mbuttu@oa-cagliari.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="Positioner"
Code="Positioner.PositionerImpl"
Type="IDL:alma/TestNamespaceInterface/Positioner:1.0"
Container="PositionerContainer"
ImplLang="py"
Default="true"
/>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment