コード例 #1
0
ファイル: Script017.py プロジェクト: kailashnath/AFDXSuite
 def sequence4(self):
     self.captureForSequence(4)
     self.sendRSET(poll=True)
     for port in self.icmp_ports:
         message = buildFragmentedMessage(port, 2, "Fragmented")
         count = 150
         while count > 0:
             outport = Factory.WRITE_ICMP(port.rx_vl_id, message)
             packet = self.application.transmitter.transmit(outport, self.network, send=False)[0]
             self.application.transmitter.transmit_packets([packet], self.network)
             count -= 1
         self.sendICMP(port, "ES Test ping")
コード例 #2
0
ファイル: Script013.py プロジェクト: kailashnath/AFDXSuite
 def send_modified_snfragments(self, ports, networks):
     self.sendRSET()
     for port in ports:
         message = "PortId = %s" % port.RX_AFDX_port_id
         message = buildFragmentedMessage(port, len(networks), message)
         outport = Factory.WRITE(port.RX_AFDX_port_id, message)
         setattr(outport, 'sn_func', self.sn_modifier)
         self.application.transmitter.transmit(outport, networks)
         self.logger.info("Filling rx port : %s" % port.RX_AFDX_port_id)
         rrpc = RRPC(port)
         self.network = NETWORK_A
         self.send(rrpc.buildCommand(), Factory.GET_TX_Port())
         self.logger.info("Sending an RRPC on network %s" % self.network)
         pollForResponse('RRPC')
コード例 #3
0
ファイル: Script021.py プロジェクト: kailashnath/AFDXSuite
    def do_operation(self, networks):
        if len(self.input_ports) == 0:
            self.logger.info("There are no ports in the ICD satisfying the " \
                             "scripts criteria")
            return
        for port in self.input_ports:
            message = buildFragmentedMessage(port, len(networks), "Big message")
            outport = Factory.WRITE(port.RX_AFDX_port_id, message)

            self.application.transmitter.transmit(outport, networks)

            rrpc = RRPC(port)
            self.send(rrpc.buildCommand(), port)
            pollForResponse('RRPC')
コード例 #4
0
ファイル: Script020.py プロジェクト: kailashnath/AFDXSuite
 def sequence1(self):
     if len(self.input_ports) == 0:
         self.logger.info("There are no ports in the ICD satisfying the " \
                          "scripts criteria")
         return
     self.captureForSequence(1)
     self.sendRSET()
     for port in self.input_ports:
         message = buildFragmentedMessage(port, 5)
         outport = Factory.WRITE(port.RX_AFDX_port_id, message)
         packets = self.application.transmitter.transmit(outport, 
                                                        self.network,
                                                        False)
         self.application.transmitter.transmit_packets(packets[0],
                                                       self.network)
     for port in self.icmp_ports:
         self.sendICMP(port, "Port Test")
コード例 #5
0
ファイル: Script009.py プロジェクト: kailashnath/AFDXSuite
    def sendMessage(self, seqNo, ports, networks):
        if len(ports) == 0 :
            self.logger.error("This sequence cannot proceed as there are no" \
                              " ports in the ICD satisfying the sequence" \
                              " requirements")
            return

        self.captureForSequence(seqNo)
        self.sendRSET()
        pollForResponse('OK')

        for port in ports:
            message = buildFragmentedMessage(port, 6, message = "Fragmented")
            outPort = Factory.WRITE(port.RX_AFDX_port_id, message)
            self.application.transmitter.transmit(outPort, \
                                          network = networks)
            rrpc = RRPC(port)
            self.send(rrpc.buildCommand(), Factory.GET_TX_Port())
            pollForResponse('RRPC')