-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwlan3_xavm_set_wlan_hybrid_mode.go
39 lines (36 loc) · 1.48 KB
/
wlan3_xavm_set_wlan_hybrid_mode.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package lan
import (
"encoding/xml"
"github.com/nitram509/gofritz/pkg/soap"
"github.com/nitram509/gofritz/pkg/tr064model"
)
// Wlan3XavmSetWLANHybridMode AUTO-GENERATED (do not edit) code from [wlanconfigSCPD],
// based on SOAP action 'X_AVM-DE_SetWLANHybridMode', Fritz!Box-System-Version 164.08.00
//
// [wlanconfigSCPD]: http://fritz.box:49000/wlanconfigSCPD.xml
func Wlan3XavmSetWLANHybridMode(session *soap.SoapSession, enable bool, beaconType string, keyPassphrase string, ssid string, bSsid string, trafficMode string, manualSpeed bool, maxSpeedDS int, maxSpeedUS int) (tr064model.XavmSetWLANHybridModeResponse, error) {
fbAction, err := soap.NewSoapRequest(session).
ReqPath("/upnp/control/wlanconfig3").
Uri("urn:dslforum-org:service:WLANConfiguration:3").
Action("X_AVM-DE_SetWLANHybridMode").
AddBoolParam("NewEnable", enable).
AddStringParam("NewBeaconType", beaconType).
AddStringParam("NewKeyPassphrase", keyPassphrase).
AddStringParam("NewSSID", ssid).
AddStringParam("NewBSSID", bSsid).
AddStringParam("NewTrafficMode", trafficMode).
AddBoolParam("NewManualSpeed", manualSpeed).
AddIntParam("NewMaxSpeedDS", maxSpeedDS).
AddIntParam("NewMaxSpeedUS", maxSpeedUS).
Do()
if err != nil {
return tr064model.XavmSetWLANHybridModeResponse{}, err
}
bodyData := fbAction.Body.Data
result := tr064model.XavmSetWLANHybridModeResponse{}
err = xml.Unmarshal(bodyData, &result)
if err != nil {
return tr064model.XavmSetWLANHybridModeResponse{}, err
}
return result, nil
}