def test_entity_loader(self):
     utils.load_converter('forwarder',
                          base_class_type=Transceiver,
                          *(),
                          **{
                              'frontend': '0',
                              'backend': '1',
                              'kind': 'forwarder',
                              'name': 'DUT'
                          })
     utils.load_converter('example_converter',
                          base_class_type=Transceiver,
                          *(),
                          **{
                              'frontend': '0',
                              'backend': '1',
                              'kind': 'example_converter',
                              'name': 'DUT'
                          })
     utils.load_receiver('example_receiver',
                         base_class_type=Receiver,
                         *(),
                         **{
                             'frontend': '0',
                             'kind': 'example_receiver',
                             'name': 'DUT'
                         })
     utils.load_producer_sim('example_producer_sim',
                             base_class_type=producer_sim.ProducerSim,
                             *(),
                             **{
                                 'backend': '0',
                                 'kind': 'example_producer_sim',
                                 'name': 'DUT'
                             })
 def test_entity_loader(self):
     utils.load_converter('forwarder', base_class_type=Transceiver, *(), **{'frontend': '0',
                                                                            'backend': '1',
                                                                            'kind': 'forwarder',
                                                                            'name': 'DUT'})
     utils.load_converter('example_converter', base_class_type=Transceiver, *(), **{'frontend': '0',
                                                                                    'backend': '1',
                                                                                    'kind': 'example_converter',
                                                                                    'name': 'DUT'})
     utils.load_receiver('example_receiver', base_class_type=Receiver, *(), **{'frontend': '0',
                                                                               'kind': 'example_receiver',
                                                                               'name': 'DUT'})
     utils.load_producer_sim('example_producer_sim', base_class_type=producer_sim.ProducerSim, *(), **{'backend': '0',
                                                                                                       'kind': 'example_producer_sim',
                                                                                                       'name': 'DUT'})
 def start_receivers(self):
     receivers = []
     try:
         self.configuration['receiver']
     except KeyError:
         return receivers
     if self.configuration['receiver']:
         logging.info('Starting %d receivers', len(self.configuration['receiver']))
         for (receiver_name, receiver_settings) in self.configuration['receiver'].items():
             receiver_settings['name'] = receiver_name
             receiver = utils.load_receiver(receiver_settings['kind'], base_class_type=Receiver, *(), **receiver_settings)
             receiver.setup_widgets(self.tab_widget, name=receiver_name)
             receiver.start()
             receivers.append(receiver)
         return receivers
Exemple #4
0
 def start_receivers(self):
     receivers = []
     try:
         self.configuration['receiver']
     except KeyError:
         return receivers
     if self.configuration['receiver']:
         logging.info('Starting %d receivers', len(self.configuration['receiver']))
         for (receiver_name, receiver_settings) in self.configuration['receiver'].items():
             receiver_settings['name'] = receiver_name
             receiver = utils.load_receiver(receiver_settings['kind'], base_class_type=Receiver, *(), **receiver_settings)
             receiver.setup_widgets(self.tab_widget, name=receiver_name)
             receiver.start()
             receivers.append(receiver)
         return receivers