#!/usr/bin/python
# Filename: lte-measurement-example
import os
import sys

# Import MobileInsight modules
from mobile_insight.analyzer import LteMeasurementAnalyzer
from mobile_insight.monitor import OnlineMonitor


"""
This example shows how to get LTE radio measurements with LteMeasurementAnalyzer
"""

if __name__ == "__main__":

    if len(sys.argv) < 3:
        print "Error: please specify physical port name and baudrate."
        print __file__, "SERIAL_PORT_NAME BAUNRATE"
        sys.exit(1)

    # Initialize a 3G/4G monitor
    src = OnlineMonitor()
    src.set_serial_port(sys.argv[1])  # the serial port to collect the traces
    src.set_baudrate(int(sys.argv[2]))  # the baudrate of the port

    meas_analyzer = LteMeasurementAnalyzer()
    meas_analyzer.set_source(src)

    # save the analysis result. All analyzers share the same output file.
    meas_analyzer.set_log("lte-measurement-example.txt")

    # Start the monitoring
    src.run()

#!/usr/bin/python
# Filename: lte-measurement-example
import os
import sys

# Import MobileInsight modules
from mobile_insight.analyzer import LteMeasurementAnalyzer
from mobile_insight.monitor import OnlineMonitor


"""
This example shows how to get LTE radio measurements with LteMeasurementAnalyzer
"""

if __name__ == "__main__":

    if len(sys.argv) < 3:
        print "Error: please specify physical port name and baudrate."
        print __file__, "SERIAL_PORT_NAME BAUNRATE"
        sys.exit(1)

    # Initialize a 3G/4G monitor
    src = OnlineMonitor()
    src.set_serial_port(sys.argv[1])  # the serial port to collect the traces
    src.set_baudrate(int(sys.argv[2]))  # the baudrate of the port

    meas_analyzer = LteMeasurementAnalyzer()
    meas_analyzer.set_source(src)

    # save the analysis result. All analyzers share the same output file.
    meas_analyzer.set_log("lte-measurement-example.txt")

    # Start the monitoring
    src.run()

#!/usr/bin/python # Filename: lte-measurement-example # Import MobileInsight modules This example shows how to get LTE radio measurements with LteMeasurementAnalyzer # Initialize a 3G/4G monitor # the serial port to collect the traces # the baudrate of the port # save the analysis result. All analyzers share the same output file. # Start the monitoring