Documentation ¶
Overview ¶
Package internal handles input set command
Index ¶
- type NodeValueStamp
- type OWServerBinding
- func (binding *OWServerBinding) CreateBindingTD() *thing.TD
- func (binding *OWServerBinding) CreateTDFromNode(node *eds.OneWireNode) (tdoc *thing2.TD)
- func (binding *OWServerBinding) HandleActionRequest(action *thing.ThingValue) (reply []byte, err error)
- func (binding *OWServerBinding) PollNodes() ([]*eds.OneWireNode, error)
- func (binding *OWServerBinding) PublishNodeValues(nodes []*eds.OneWireNode) (err error)
- func (binding *OWServerBinding) PublishThings(nodes []*eds.OneWireNode) (err error)
- func (binding *OWServerBinding) RefreshPropertyValues() error
- func (binding *OWServerBinding) Start() error
- func (binding *OWServerBinding) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NodeValueStamp ¶
type NodeValueStamp struct {
// contains filtered or unexported fields
}
type OWServerBinding ¶
type OWServerBinding struct { // Configuration of this protocol binding Config config.OWServerConfig // contains filtered or unexported fields }
OWServerBinding is the hub protocol binding plugin for capturing 1-wire OWServer V2 Data
func NewOWServerBinding ¶
func NewOWServerBinding(config config.OWServerConfig, hc *hubclient.HubClient) *OWServerBinding
NewOWServerBinding creates a new OWServer Protocol Binding service
config holds the configuration of the service hc is the connection with the hubClient to use.
func (*OWServerBinding) CreateBindingTD ¶
func (binding *OWServerBinding) CreateBindingTD() *thing.TD
CreateBindingTD generates a TD document for this binding
func (*OWServerBinding) CreateTDFromNode ¶
func (binding *OWServerBinding) CreateTDFromNode(node *eds.OneWireNode) (tdoc *thing2.TD)
CreateTDFromNode converts the 1-wire node into a TD that describes the node. - All attributes will be added as node properties - Writable non-sensors attributes are marked as writable configuration - Sensors are also added as events. - Writable sensors are also added as actions.
func (*OWServerBinding) HandleActionRequest ¶
func (binding *OWServerBinding) HandleActionRequest(action *thing.ThingValue) (reply []byte, err error)
HandleActionRequest handles requests to activate inputs
func (*OWServerBinding) PollNodes ¶
func (binding *OWServerBinding) PollNodes() ([]*eds.OneWireNode, error)
PollNodes polls the OWServer gateway for nodes and property values
func (*OWServerBinding) PublishNodeValues ¶
func (binding *OWServerBinding) PublishNodeValues(nodes []*eds.OneWireNode) (err error)
PublishNodeValues publishes node property values of each node Properties are combined as submitted as a single 'properties' event. Sensor values are send as individual events
func (*OWServerBinding) PublishThings ¶
func (binding *OWServerBinding) PublishThings(nodes []*eds.OneWireNode) (err error)
PublishThings converts the nodes to TD documents and publishes these on the Hub message bus This returns an error if one or more publications fail
func (*OWServerBinding) RefreshPropertyValues ¶
func (binding *OWServerBinding) RefreshPropertyValues() error
RefreshPropertyValues polls the OWServer hub for changed Thing values
func (*OWServerBinding) Start ¶
func (binding *OWServerBinding) Start() error
Start the OWServer protocol binding This publishes a TD for this binding, starts a background heartbeat. This uses the given hub client connection.
func (*OWServerBinding) Stop ¶
func (binding *OWServerBinding) Stop()
Stop the heartbeat and remove subscriptions This does NOTE close the given hubclient connection.