84
Sample Source Code
14.3 Sample Source Code
Imports System.IO.Ports
Public Class Main
Private index As Integer
Private buff As String
Private commands() As String = { _
"CONF:ANL:SG:MODE WLAN_11ag", _
"CONF:ANL:SG:CH_NUM 36", _
"CONF:ANL:SG:NUM_FRAME 10", _
"CONF:ANL:SG:RUN ON" _
}
' Open serial port
Private Sub bt_portOpen_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles bt_portOpen.Click
serial.BaudRate = 115200
serial.PortName = "COM3"
serial.Open()
End Sub
Private Sub Main_Disposed(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Disposed
serial.Close()
serial.Dispose()
End Sub
Private Sub serial_DataReceived(ByVal sender As Object, ByVal e As
System.IO.Ports.SerialDataReceivedEventArgs) Handles serial.DataReceived
If Me.InvokeRequired Then
Dim d As New SerialDataReceivedEventHandler(AddressOf serial_DataReceived)
Me.Invoke(d, New System.Object() {sender, e})
Exit Sub
End If
Dim rd As String = ""
If serial.IsOpen = True Then
If serial.BytesToRead > 0 Then
rd = serial.ReadLine()
Summary of Contents for MTP200B
Page 1: ...MTP200B WLAN BT LE Tester Operating Manual R20160511 ...
Page 10: ...x ...
Page 11: ...xi ...
Page 12: ......
Page 14: ......
Page 16: ......
Page 18: ......
Page 30: ...14 GEN Generator Menu Tree 4 2 GEN Generator Menu Tree Figure 4 2 GEN Generator Menu Tree ...
Page 31: ...ANL Analyzer Menu Tree 15 4 3 ANL Analyzer Menu Tree Figure 4 3 ANL Analyzer Menu Tree ...
Page 34: ......
Page 41: ...PART 2 WLAN Test 25 ...
Page 42: ......
Page 62: ......
Page 63: ...PART 3 BT LE Test 47 ...
Page 64: ......
Page 68: ......
Page 76: ......
Page 82: ......
Page 83: ...PART 4 Programming Guide 67 ...
Page 84: ......
Page 102: ......
Page 103: ...PART 5 Command List 87 ...
Page 104: ......
Page 129: ...PART 6 User s Device Diagnosis 113 ...
Page 130: ......
Page 144: ......
Page 145: ...PART 7 Appendix 129 ...
Page 146: ......
Page 156: ......