-
Notifications
You must be signed in to change notification settings - Fork 1
/
wlan1_get_beacon_advertisement.go
30 lines (27 loc) · 973 Bytes
/
wlan1_get_beacon_advertisement.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
package lan
import (
"encoding/xml"
"github.com/nitram509/gofritz/pkg/soap"
"github.com/nitram509/gofritz/pkg/tr064model"
)
// Wlan1GetBeaconAdvertisement AUTO-GENERATED (do not edit) code from [wlanconfigSCPD],
// based on SOAP action 'GetBeaconAdvertisement', Fritz!Box-System-Version 164.07.57
//
// [wlanconfigSCPD]: http://fritz.box:49000/wlanconfigSCPD.xml
func Wlan1GetBeaconAdvertisement(session *soap.SoapSession) (tr064model.GetBeaconAdvertisementResponse, error) {
fbAction, err := soap.NewSoapRequest(session).
ReqPath("/upnp/control/wlanconfig1").
Uri("urn:dslforum-org:service:WLANConfiguration:1").
Action("GetBeaconAdvertisement").
Do()
if err != nil {
return tr064model.GetBeaconAdvertisementResponse{}, err
}
bodyData := fbAction.Body.Data
result := tr064model.GetBeaconAdvertisementResponse{}
err = xml.Unmarshal(bodyData, &result)
if err != nil {
return tr064model.GetBeaconAdvertisementResponse{}, err
}
return result, nil
}