def shutdown_device(cls, ctrl_conn: Connection): logger.debug("HackRF: closing device") ret = hackrf.close() ctrl_conn.send("CLOSE:" + str(ret)) ret = hackrf.exit() ctrl_conn.send("EXIT:" + str(ret)) return True
def shutdown_device(cls, ctrl_conn: Connection): logger.debug("HackRF: closing device") ret = hackrf.close() ctrl_conn.send("CLOSE:" + str(ret)) ret = hackrf.exit() ctrl_conn.send("EXIT:" + str(ret)) return True
def shutdown_hackrf(ctrl_conn): logger.debug("HackRF: closing device") ret = hackrf.close() ctrl_conn.send("close:" + str(ret)) ret = hackrf.exit() ctrl_conn.send("exit:" + str(ret)) return True
def shutdown_device(cls, ctrl_conn: Connection, is_tx: bool): if is_tx: result = hackrf.stop_tx_mode() ctrl_conn.send("STOP TX MODE:" + str(result)) else: result = hackrf.stop_rx_mode() ctrl_conn.send("STOP RX MODE:" + str(result)) result = hackrf.close() ctrl_conn.send("CLOSE:" + str(result)) result = hackrf.exit() ctrl_conn.send("EXIT:" + str(result)) return True
def test_c_api(self): def callback(n): print("called") return np.array([1], dtype=np.complex64) print("init", hackrf.init()) print("open", hackrf.open()) print("start_tx", hackrf.start_tx_mode(callback)) time.sleep(1) print("stop_tx", hackrf.stop_tx_mode()) print("close", hackrf.close()) print("exit", hackrf.exit())
def test_c_api(self): def callback(n): print("called") return np.array([1], dtype=np.complex64) print("init", hackrf.init()) print("open", hackrf.open()) print("start_tx", hackrf.start_tx_mode(callback)) time.sleep(1) print("stop_tx", hackrf.stop_tx_mode()) print("close", hackrf.close()) print("exit", hackrf.exit())
def shutdown_device(cls, ctrl_conn: Connection, is_tx: bool): if is_tx: result = hackrf.stop_tx_mode() ctrl_conn.send("STOP TX MODE:" + str(result)) else: result = hackrf.stop_rx_mode() ctrl_conn.send("STOP RX MODE:" + str(result)) result = hackrf.close() ctrl_conn.send("CLOSE:" + str(result)) result = hackrf.exit() ctrl_conn.send("EXIT:" + str(result)) return True
def exit(self): return hackrf.exit()