os._exit(0) if __name__ == '__main__': # Parse any input option. debug, profiling, single, wait_for_tx_stats, send_to_id, nof_prb, mcs, txgain, rxgain, tx_slots, rx_slots, tx_channel, rx_channel = inputOptions( sys.argv[1:]) # Set the signal handler. signal.signal(signal.SIGINT, handler) source_module = interf.MODULE_AI print("Create CommManager object.") lc = LayerCommunicator(source_module, [interf.MODULE_RF_MON]) # Create a QUEUE to store data. # Create a single input and a single output queue for all threads. stats_queue = queue.Queue() send_to = send_to_id bandwidth = getBWIndex(nof_prb) mcs_idx = mcs tx_gain = txgain rx_gain = rxgain num_of_tx_slots = tx_slots num_of_rx_slots = rx_slots seq_number = 100 num_of_tx = -1 data = generateRandomData(num_of_tx_slots, bandwidth, mcs_idx)
if __name__ == '__main__': # Parse any input option. debug, single, rx_gain_cmd_line = inputOptions(sys.argv[1:]) # Set the signal handler. signal.signal(signal.SIGINT, handler) # decides if single or two host PCs. if (single == False): source_module = interf.MODULE_MAC # Make believe it is the MAC layer sending controls to PHY. else: source_module = interf.MODULE_DEBUG1 print("Create CommManager object.") lc = LayerCommunicator(source_module, [interf.MODULE_PHY]) # Create a QUEUE to store data. # Create a single input and a single output queue for all threads. rx_stat_queue = queue.Queue() seq_number = 123 channel = 0 mcs_idx = 0 rx_gain = rx_gain_cmd_line num_slots = 1 inc = 0 last_rxd_byte = -1 # last received byte out_of_seq_cnt = 0 # out of sequence error counter. in_seq_cnt = 0 # In sequence counter. total_pkt_number = 0 # Total number of received packets.
print("No packet received.") return total_rxd_bytes, host_timestamp if __name__ == '__main__': # Parse any input option. debug = inputOptions(sys.argv[1:]) # Set the signal handler. signal.signal(signal.SIGINT, handler) print("Create CommManager object.") module = interf.MODULE_MAC # Make believe it is the MAC layer sending controls to PHY. lc = LayerCommunicator(module) seq_number = 0 channel = 0 num_slots = 1 inc = 0 last_rxd_byte = -1 # last received byte out_of_seq_cnt = 0 # out of sequence error counter. in_seq_cnt = 0 # In sequence counter. total_pkt_number = 0 # Total number of received packets. while (True): seq_number = inc + 200 # Send RX control information to PHY. sendRxCtrlToPhy(lc, channel, num_slots, seq_number, debug)