Documentation
¶
Overview ¶
Package binaryiotypeb provides the API for the io4edge binaryIoTypeB functionblock
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a client for the binaryIoTypeB Module
func NewClientFromUniversalAddress ¶
NewClientFromUniversalAddress creates a new binaryIoTypeB client from addrOrService. If addrOrService is of the form "host:port", it creates the client from that host/port, otherwise it assumes addrOrService is the instance name of a mdns service (without _io4edge_binaryIoTypeB._tcp). The timeout specifies the maximal time waiting for a service to show up. If 0, use default timeout. Not used for "host:port"
func (*Client) AllInputs ¶
AllInputs reads the state of all input pins defined by mask.
Each bit in the returned value corresponds to one channel, bit0 being channel 0. The bit is false if the input channel is inactive, true if the input channel is active Channels whose bit is cleared in mask are reported as 0
func (*Client) Close ¶
func (c *Client) Close()
Close terminates the underlying connection to the functionblock
func (*Client) Describe ¶
func (c *Client) Describe() (*Description, error)
Describe reads the binaryIoTypeB function block description
func (*Client) Input ¶
Input reads the state of the input pin of a single channel.
The returned value is false if the input channel is inactive, true if the input channel is active
func (*Client) SetAllOutputs ¶
SetAllOutputs sets all or a group of output channels
states: binary coded map of outputs. 0 means deactivate output channel, 1 means activate output channel, LSB is Output0
mask: defines which channels are affected by the set all command.
type Description ¶
type Description struct {
Channels []*fspb.ChannelConfig
}
Description represents the describe response of the binaryIoTypeB function