Example #1
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)
Example #2
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_ComputeTimeToDoThings_UseHasTime(self, delay=10000000)
        IrisUtil.Process_TxActivate_WriteFlagAndDataToTxStream_UseHasTime(self)
        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_TxDeactive(self)
        IrisUtil.Process_RxDeactive(self)