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 | alloc = inputbox("Alloc ID?" )
|
| 14 |
|
| 15 | SendApplicationCommand "/~ off "
|
| 16 | crt.sleep 100
|
| 17 |
|
| 18 | SendApplicationCommand "/api/set object=gpon_alloc pon_ni=" & pon_ni & " alloc_id=" & alloc & " onu_id=" & onu & " sla.cbr_rt_bw=5120000 sla.cbr_nrt_bw=0 sla.guaranteed_bw=5120000 sla.maximum_bw=5120000 sla.alloc_type=none sla.additional_bw_eligibility=none sla.cbr_rt_compensation=no sla.cbr_rt_ap_index=0 sla.cbr_nrt_ap_index=0 sla.weight=0 sla.priority=0"
|
| 19 | crt.sleep 100
|
| 20 | SendApplicationCommand "/~ on"
|
| 21 |
|
| 22 | End Sub
|