示例#1
0
    def __init__(self, identifier, execparams):
        loggerName = (execparams['NAME_BINDING'].replace('/',
                                                         '.')).rsplit("_",
                                                                      1)[0]
        Resource.__init__(self, identifier, execparams, loggerName=loggerName)
        ThreadedComponent.__init__(self)

        # self.auto_start is deprecated and is only kept for API compatibility
        # with 1.7.X and 1.8.0 components.  This variable may be removed
        # in future releases
        self.auto_start = False
        # Instantiate the default implementations for all ports on this component
        self.port_a = bulkio.InFloatPort("a", maxsize=self.DEFAULT_QUEUE_SIZE)
        self.port_b = bulkio.InFloatPort("b", maxsize=self.DEFAULT_QUEUE_SIZE)
        self.port_out = bulkio.OutFloatPort("out")
    def initialize(self):
        Resource.initialize(self)

        self.port_dataCharIn = bulkio.InCharPort("dataCharIn")
        self.port_dataOctetIn = bulkio.InOctetPort("dataOctetIn")
        self.port_dataShortIn = bulkio.InShortPort("dataShortIn")
        self.port_dataUShortIn = bulkio.InUShortPort("dataUShortIn")
        self.port_dataLongIn = bulkio.InLongPort("dataLongIn")
        self.port_dataULongIn = bulkio.InULongPort("dataULongIn")
        self.port_dataLongLongIn = bulkio.InLongLongPort("dataLongLongIn")
        self.port_dataULongLongIn = bulkio.InULongLongPort("dataULongLongIn")
        self.port_dataFloatIn = bulkio.InFloatPort("dataFloatIn")
        self.port_dataDoubleIn = bulkio.InDoublePort("dataDoubleIn")
        self.port_dataFileIn = bulkio.InFilePort("dataFileIn")
        self.port_dataXMLIn = bulkio.InXMLPort("dataXMLIn")
        self.port_dataSDDSIn = bulkio.InSDDSPort("dataSDDSIn")

        self.port_dataCharOut = bulkio.OutCharPort("dataCharOut")
        self.port_dataOctetOut = bulkio.OutOctetPort("dataOctetOut")
        self.port_dataShortOut = bulkio.OutShortPort("dataShortOut")
        self.port_dataUShortOut = bulkio.OutUShortPort("dataUShortOut")
        self.port_dataLongOut = bulkio.OutLongPort("dataLongOut")
        self.port_dataULongOut = bulkio.OutULongPort("dataULongOut")
        self.port_dataLongLongOut = bulkio.OutLongLongPort("dataLongLongOut")
        self.port_dataULongLongOut = bulkio.OutULongLongPort(
            "dataULongLongOut")
        self.port_dataFloatOut = bulkio.OutFloatPort("dataFloatOut")
        self.port_dataDoubleOut = bulkio.OutDoublePort("dataDoubleOut")
        self.port_dataFileOut = bulkio.OutFilePort("dataFileOut")
        self.port_dataXMLOut = bulkio.OutXMLPort("dataXMLOut")
        self.port_dataSDDSOut = bulkio.OutSDDSPort("dataSDDSOut")

        self.port_propEvent = PropertyEventSupplier(self)
示例#3
0
    def setUp(self):
        """Set up the unit test - this is run before every method that starts with test        """
        ossie.utils.testing.ScaComponentTestCase.setUp(self)
        #self.floatSink = test_utils.MyDataSink()
        #self.shortSink = test_utils.MyDataSink()
        self.floatSink = bulkio.InFloatPort("dataFloat_in")
        self.shortSink = bulkio.InShortPort("dataShort_in")

        #start all components
        self.launch(initialize=True)
        self.comp.start()
        #self.floatSink.start()
        #self.shortSink.start()
        #do the connections
        floatOutPort = self.comp.getPort('dataFloat_out')
        #self.floatSink._narrow(BULKIO__POA.dataFloat)

        floatOutPort.connectPort(self.floatSink._this(), "floatConnectionID")

        shortOutPort = self.comp.getPort('dataShort_out')
        shortOutPort.connectPort(self.shortSink._this(), "shortConnectionID")

        #self.comp.connect(self.floatSink, usesPortName='dataFloat_out',providesPortName = 'dataFloat_in')
        #self.comp.connect(self.shortSink, usesPortName="dataShort_out",providesPortName = 'dataShort_in')
        self.waveforms = waveforms.Waveforms()
    def __init__(self, devmgr, uuid, label, softwareProfile, compositeDevice,
                 execparams):
        Device.__init__(self, devmgr, uuid, label, softwareProfile,
                        compositeDevice, execparams)
        ThreadedComponent.__init__(self)

        # self.auto_start is deprecated and is only kept for API compatibility
        # with 1.7.X and 1.8.0 devices.  This variable may be removed
        # in future releases
        self.auto_start = False
        # Instantiate the default implementations for all ports on this device
        self.port_dataFloat_in = bulkio.InFloatPort(
            "dataFloat_in", maxsize=self.DEFAULT_QUEUE_SIZE)
        self.port_dataFloat_out = bulkio.OutFloatPort("dataFloat_out")
示例#5
0
    def __init__(self, identifier, execparams):
        loggerName = (execparams['NAME_BINDING'].replace('/',
                                                         '.')).rsplit("_",
                                                                      1)[0]
        Resource.__init__(self, identifier, execparams, loggerName=loggerName)
        ThreadedComponent.__init__(self)

        # self.auto_start is deprecated and is only kept for API compatibility
        # with 1.7.X and 1.8.0 components.  This variable may be removed
        # in future releases
        self.auto_start = False
        # Instantiate the default implementations for all ports on this component
        self.port_dataSDDS_in = bulkio.InSDDSPort("dataSDDS_in")
        self.port_dataVITA49_in = bulkio.InVITA49Port("dataVITA49_in")
        self.port_dataFloat_in = bulkio.InFloatPort(
            "dataFloat_in", maxsize=self.DEFAULT_QUEUE_SIZE)
        self.port_dataSDDS_out = bulkio.OutSDDSPort("dataSDDS_out")
        self.port_dataVITA49_out = bulkio.OutVITA49Port("dataVITA49_out")
        self.addPropertyChangeListener('connectionTable',
                                       self.updated_connectionTable)
示例#6
0
 def __init__(self, name="svc_b", execparams={}):
     self.name = name
     self._log = logging.getLogger(self.name)
     self.port_dataFloat = bulkio.InFloatPort("dataFloat", maxsize=10)