Shad Ansari | 2f7f9be | 2017-06-07 13:34:53 -0700 | [diff] [blame] | 1 | # $language = "VBScript"
|
| 2 | # $interface = "1.0"
|
| 3 |
|
| 4 | Sub SendApplicationCommand(shell_command)
|
| 5 | crt.Screen.Send shell_command & VbCr & VbCr
|
| 6 | crt.sleep 1000
|
| 7 | End Sub
|
| 8 |
|
| 9 | Sub main
|
| 10 |
|
| 11 | pon_ni = inputbox("PON NI: [0-15]" )
|
| 12 | onu = inputbox("ONU ID: [0-127]" )
|
| 13 |
|
| 14 | SendApplicationCommand "/~ off "
|
| 15 | crt.sleep 10
|
| 16 | serial = string(8 - Len(onu), "0") & onu
|
| 17 | SendApplicationCommand "/api/set object=gpon_onu pon_ni=" & pon_ni & " onu_id=" & onu & " serial_number.vendor_id=00000000 ds_ber_reporting_interval=1000000 serial_number.vendor_specific=" & serial & " omci_port_id=" & onu
|
| 18 | crt.sleep 10
|
| 19 | SendApplicationCommand "/~ on "
|
| 20 |
|
| 21 | End Sub
|