Esempio n. 1
0
    def run(self):
        self.logger.info("Starting the sequence 1")

        if len(self.output_ports) == 0:
            self.logger.error("There are no ports which satisfy the scripts" \
                              " criteria.")
            return

        self.sendRSET()
        for port in self.output_ports:
            eipc = EIPC(port)
            message = "Port Id = %s" % port.tx_AFDX_port_id
            offset_size = eipc.command_size
            command = eipc.buildCommand(command = 'HOLD', 
                                    message = buildBigMessage(port, message,
                                                offset_size = offset_size))
            self.send(command, Factory.GET_TX_Port())
            if not pollForResponse("EIPC", timeout = 2):
                self.logger.error("The ES has not responded to EIPC")

        tcrq = TCRQ()
        self.send(tcrq.buildCommand(1), Factory.GET_TX_Port())

        if not pollForResponse("TCRQ", timeout = 10):
            self.logger.error("The ES has not responded to TCRQ")

        self.logger.info("Completed sequence 1")
        raw_input("Press any key to continue.")
Esempio n. 2
0
 def sequence4(self):
     self.captureForSequence(4)
     self.sendRSET()
     for port in self.input_ports:
         if port.port_characteristic != PORT_QUEUING:
             continue
         message = buildBigMessage(port, "Big message")
         self.send(message, port)
         rrpc = RRPC(port)
         self.send(rrpc.buildCommand(), Factory.GET_TX_Port())
         pollForResponse('RRPC')