Documentation ¶
Overview ¶
Copyright 2014 Matt Ho
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2014 Matt Ho ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2014 Matt Ho ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2014 Matt Ho ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2014 Matt Ho ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2014 Matt Ho ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2014 Matt Ho ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func IncrementMacAddress(inputMac string) string
- type Device
- type DeviceInfo
- type DeviceInfos
- type Wemo
- func (self *Wemo) Discover(urn string, timeout time.Duration) ([]*Device, error)
- func (self *Wemo) DiscoverAll(timeout time.Duration) ([]*Device, error)
- func (self *Wemo) Off(friendlyName string, timeout time.Duration)
- func (self *Wemo) On(friendlyName string, timeout time.Duration)
- func (self *Wemo) Toggle(friendlyName string, timeout time.Duration)
Constants ¶
const ( SSDP_BROADCAST = "239.255.255.250:1900" M_SEARCH = "" /* 146-byte string literal not displayed */ LOCATION = "LOCATION: " )
Variables ¶
This section is empty.
Functions ¶
func IncrementMacAddress ¶
Types ¶
type Device ¶
func (*Device) FetchDeviceInfo ¶
func (d *Device) FetchDeviceInfo(ctx context.Context) (*DeviceInfo, error)
func (*Device) GetBinaryState ¶
type DeviceInfo ¶
type DeviceInfo struct { Device *Device `json:"-"` DeviceType string `xml:"deviceType" json:"device-type"` FriendlyName string `xml:"friendlyName" json:"friendly-name"` MacAddress string `xml:"macAddress" json:"mac-address"` FirmwareVersion string `xml:"firmwareVersion" json:"firmware-version"` SerialNumber string `xml:"serialNumber" json:"serial-number"` }
type DeviceInfos ¶
type DeviceInfos []*DeviceInfo
func (DeviceInfos) Len ¶
func (d DeviceInfos) Len() int
func (DeviceInfos) Less ¶
func (d DeviceInfos) Less(i, j int) bool
func (DeviceInfos) Swap ¶
func (d DeviceInfos) Swap(i, j int)