Documentation ¶
Index ¶
- Variables
- func XMLDeviceToSIFTDevice(device XMLDevice) (types.Device, error)
- type AdapterFactory
- type XMLDID
- type XMLDevice
- type XMLDeviceLevel
- type XMLDeviceName
- type XMLDeviceOffline
- type XMLDeviceState
- type XMLGCmd
- type XMLGData
- type XMLGWRCmd
- type XMLGWRCmds
- type XMLGip
- type XMLLoginGip
- type XMLRC
- type XMLRoom
- type XMLToken
- type XMLVersion
- Bugs
Constants ¶
This section is empty.
Variables ¶
var Log = logging.Log.New("pkg", "drivers/connectedbytcp")
Log is used to log messages for the connectedbytcp package. Logs are disabled by default; use sift/logging.SetLevel() to set log levels for all packages, or Log.SetHandler() to set a custom handler for this package (see: https://godoc.org/gopkg.in/inconshreveable/log15.v2)
Functions ¶
Types ¶
type AdapterFactory ¶
type AdapterFactory struct{}
An AdapterFactory creates adapters
func NewFactory ¶
func NewFactory() *AdapterFactory
NewFactory properly instantiates a new AdapterFactory
func (*AdapterFactory) GetIPv4Description ¶
func (f *AdapterFactory) GetIPv4Description() ipv4.ServiceDescription
GetIPv4Description returns a description of the example IPv4 service that can be used to identify example services on a network
func (*AdapterFactory) HandleIPv4 ¶
func (f *AdapterFactory) HandleIPv4(context *ipv4.ServiceContext) adapter.Adapter
HandleIPv4 spawns a new Adapter to handle a context
func (*AdapterFactory) Name ¶
func (f *AdapterFactory) Name() string
Name returns the name of this adapter factory, "Connected By TCP"
type XMLDevice ¶
type XMLDevice struct { XMLName xml.Name `xml:"device"` DID XMLDID `xml:"did"` Name XMLDeviceName `xml:"name"` Offline XMLDeviceOffline `xml:"offline"` State XMLDeviceState `xml:"state"` Level XMLDeviceLevel `xml:"level"` }
XMLDevice captures the data from a similarly-named Connected by TCP API structure
func ReadDevice ¶
ReadDevice marshals valid XML describing a Device from the Connected by TCP API into an XMLDevice struct
type XMLDeviceLevel ¶
XMLDeviceLevel captures the data from a similarly-named Connected by TCP API structure
type XMLDeviceName ¶
XMLDeviceName captures the data from a similarly-named Connected by TCP API structure
type XMLDeviceOffline ¶
XMLDeviceOffline captures the data from a similarly-named Connected by TCP API structure
type XMLDeviceState ¶
XMLDeviceState captures the data from a similarly-named Connected by TCP API structure
type XMLGWRCmd ¶
type XMLGWRCmd struct { XMLName xml.Name `xml:"gwrcmd"` Command XMLGCmd `xml:"gcmd"` Data XMLGData `xml:"gdata"` }
XMLGWRCmd captures the data from a similarly-named Connected by TCP API structure
func DecodeGwrcmds ¶
DecodeGwrcmds marshals valid XML describing Gwrcmds from the Connected by TCP API into a collection of XMLGWRCmd structs
func ReadGwrcmds ¶
ReadGwrcmds marshals valid XML describing Gwrcmds from the Connected by TCP API into a collection of XMLGWRCmd structs
type XMLGWRCmds ¶
XMLGWRCmds captures the data from a similarly-named Connected by TCP API structure
type XMLLoginGip ¶
type XMLLoginGip struct { XMLName xml.Name `xml:"gip"` Version XMLVersion `xml:"version"` RC XMLRC `xml:"rc"` Token XMLToken `xml:"token"` Rooms []XMLRoom `xml:"room"` }
XMLLoginGip captures the data from a similarly-named Connected by TCP API structure
func ReadGwrLogin ¶
func ReadGwrLogin(xmlStr []byte) (XMLLoginGip, error)
ReadGwrLogin marshals valid XML describing GwrLogins from the Connected by TCP API into a collection of XMLLoginGip structs
type XMLVersion ¶
XMLVersion captures the data from a similarly-named Connected by TCP API structure
Notes ¶
Bugs ¶
The ConnectedByTCP Gateway produces a x509 certificate which is not recognized by the default HTTP client. This adapter currently ignores the certificate check (!!!)