blob: 478cd2b58db0589aab80f01dae2997a31af4ac98 [file] [log] [blame]
Shad Ansari2f7f9be2017-06-07 13:34:53 -07001# $language = "VBScript"
2# $interface = "1.0"
3
4Sub SendApplicationCommand(shell_command)
5 crt.Screen.Send shell_command & VbCr & VbCr
6 crt.sleep 200
7End Sub
8
9Sub main
10
11 If crt.Arguments.Count>0 Then
12 pon_ni = crt.Arguments(0)
13 Else
14 pon_ni = inputbox("PON NI: XGPON:[0-7] XGS:[0-1]")
15 End If
16
17 If crt.Arguments.Count>1 Then
18 onu_id = crt.Arguments(1)
19 Else
20 onu_id = inputbox("ONU id: [0-255]")
21 End IF
22
23 If crt.Arguments.Count>2 Then
24 port_id = crt.Arguments(2)
25 Else
26 port_id = inputbox("port_id")
27 End IF
28
29 SendApplicationCommand "/~ off"
30
31 'config port
32 SendApplicationCommand "/api/set object=xgpon_gem_port pon_ni=" & pon_ni & " gem_port_id=" & port_id & " configuration.direction=bidirectional configuration.type=multicast downstream_encryption_mode=disable upstream_destination_queue=data control=enable"
33
34 SendApplicationCommand "/~ on"
35
36End Sub