Commit 25a59810 authored by Marco Buttu's avatar Marco Buttu
Browse files

Working LO_LP Simulator

parent e28bc8ad
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
# Dependency file for module: LocalOscillatorImpl
# Created automatically by vltMakePythonPackDependencies -  15.10.15 11:00:22
# Created automatically by vltMakePythonPackDependencies -  28.10.15 12:15:51
# DO NOT EDIT THIS FILE
../object/LocalOscillatorImpl.dpps: Makefile

+1 −1
Original line number Diff line number Diff line
# Dependency file for Errors&Logs index files
# Created automatically by vltMakeIndexFilesDependencies -  15.10.15 11:23:10
# Created automatically by vltMakeIndexFilesDependencies -  28.10.15 12:15:51
# DO NOT EDIT THIS FILE

do_ERRORS:
+13 −8
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@ from Acspy.Servants.CharacteristicComponent import CharacteristicComponent as CC
from Acspy.Servants.ContainerServices import ContainerServices as CS
from Acspy.Servants.ComponentLifecycle import ComponentLifecycle as CL
from Acspy.Util.BaciHelper import addProperty
from PyLocalOscillator.LocalOscillatorSimImpl import devios
from LocalOscillatorSimImpl.devios import GenericDevIO as GDevIO


class LocalOscillator(Receivers__POA.LocalOscillator, CC, CS, CL):
@@ -11,20 +11,25 @@ class LocalOscillator(Receivers__POA.LocalOscillator, CC, CS, CL):
    def __init__(self):
        CC.__init__(self)
        CS.__init__(self)
        self.power = 0
        self.frequency = 0
        self.amplitude = 0
        self.isLocked = 0


    def initialize(self):
        addProperty(self, 'frequency', devio_ref=devios.frequencyDevIO())
        addProperty(self, 'amplitude', devio_ref=devios.amplitudeDevIO())
        addProperty(self, 'isLocked', devio_ref=devios.isLockedDevIO())
        addProperty(self, 'frequency', devio_ref=GDevIO(self, 'frequency'))
        addProperty(self, 'amplitude', devio_ref=GDevIO(self, 'amplitude'))
        addProperty(self, 'isLocked', devio_ref=GDevIO(self, 'isLocked'))


    def set(self, rf_power, rf_freq):
        pass
    def set(self, power, frequency):
        self.power = power
        self.frequency = frequency


    def get(self, rf_power, rf_freq):
        pass
    def get(self):
        return self.power, self.frequency


    def rfon(self):
+5 −31
Original line number Diff line number Diff line
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 amplitudeDevIO(DevIO):
    def __init__(self, value=0):
        DevIO.__init__(self, value)

    def read(self):
        return self.value

    def write(self, value):
        self.value = value
                                    
class frequencyDevIO(DevIO):
    def __init__(self, value=0):
        DevIO.__init__(self, value)

    def read(self):
        return self.value
class GenericDevIO(DevIO):

    def write(self, value):
        self.value = value
class isLockedDevIO(DevIO):
    def __init__(self, value=0):
    def __init__(self, lo, property_name, value=0):
        DevIO.__init__(self, value)
        self.lo = lo
        self.property_name = property_name

    def read(self):
        return self.value
        return getattr(self.lo, property_name)

    def write(self, value):
        self.value = value
+4 −1
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ PY_SCRIPTS_L =
PY_MODULES         = 
PY_MODULES_L       =

PY_PACKAGES        =LocalOscillatorImpl
PY_PACKAGES        =LocalOscillatorImpl LocalOscillatorSimImpl
PY_PACKAGES_L      =
pppppp_MODULES	   =

@@ -192,6 +192,9 @@ all: do_all
	@echo " . . . 'all' done" 

clean : clean_all 
	$(RM) *~ *Impl/*~ LocalOscillator*/*.pyc
	$(RM) ../lib/python/site-packages/*
	$(RM) $(INTROOT)/lib/python/site-packages/LocalOscillator*Impl*
	@echo " . . . clean done"

clean_dist : clean_all clean_dist_all 
Loading