Ejemplo n.º 1
0
    def run(self):
        # do read for any length of data
        finished = IrisUtil.Process_ReadFromRxStream_Async(self)

        if finished:
            # do deinitialize work here
            IrisUtil.Process_RxDeactive(self)
            self.running = False
        
        return finished
Ejemplo n.º 2
0
    def doSimpleRx(self):
        # prepare work, create tx rx buffer
        IrisUtil.Process_CreateReceiveBuffer(self)
        IrisUtil.Process_ClearStreamBuffer(self)
        # activate
        IrisUtil.Process_ComputeTimeToDoThings_UseHasTime(self, delay = 10000000)
        IrisUtil.Process_RxActivate_WriteFlagToRxStream_UseHasTime(self, rx_delay = 57)

        # sleep to wait
        IrisUtil.Process_WaitForTime_NoTrigger(self)

        # read stream
        IrisUtil.Process_ReadFromRxStream(self)
        IrisUtil.Process_HandlePostcode(self)  # postcode is work on received data
    
        # deactive
        IrisUtil.Process_RxDeactive(self)
Ejemplo n.º 3
0
    def doSimpleRxTx(self):
        # prepare work, create tx rx buffer
        IrisUtil.Process_BuildTxTones_Sinusoid(self)
        IrisUtil.Process_CreateReceiveBuffer(self)
        IrisUtil.Process_ClearStreamBuffer(self)
        # activate
        IrisUtil.Process_TxActivate_WriteFlagAndDataToTxStream(self)
        IrisUtil.Process_RxActivate_WriteFlagToRxStream(self)

        # trigger in the near future
        time.sleep(0.1)
        IrisUtil.Process_GenerateTrigger(self)
        time.sleep(0.1)

        # read stream
        IrisUtil.Process_ReadFromRxStream(self)
        IrisUtil.Process_HandlePostcode(self)  # postcode is work on received data
    
        # deactive
        IrisUtil.Process_TxDeactive(self)
        IrisUtil.Process_RxDeactive(self)
Ejemplo n.º 4
0
    def doSimpleRx(self):
        # prepare work, create tx rx buffer
        IrisUtil.Process_CreateReceiveBuffer(self)
        IrisUtil.Process_ClearStreamBuffer(self)
        # activate
        IrisUtil.Process_ComputeTimeToDoThings_UseHasTime(self,
                                                          delay=10000000,
                                                          alignment=2730667)
        IrisUtil.Process_RxActivate_WriteFlagToRxStream_UseHasTime(self,
                                                                   rx_delay=0)

        # sleep to wait
        IrisUtil.Process_WaitForTime_NoTrigger(self)

        # read stream
        IrisUtil.Process_ReadFromRxStream(self)
        IrisUtil.Process_HandlePostcode(
            self)  # postcode is work on received data

        # deactive
        IrisUtil.Process_RxDeactive(self)

        # do correlation
        IrisUtil.Process_DoCorrelation2FindFirstPFDMSymbol(self)