Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) Command(cmd *fbv1.Command, timeout time.Duration) (*fbv1.Response, error)
- func (c *Client) Describe() (*binio.ConfigurationControlDescribeResponse, error)
- func (c *Client) GetAll(mask uint32) (uint32, error)
- func (c *Client) GetConfiguration() (*Configuration, error)
- func (c *Client) GetResponse(context string) *functionblockV1.Response
- func (c *Client) GetSingle(channel uint) (bool, error)
- func (c *Client) ReadResponses()
- func (c *Client) SetAll(values uint32, mask uint32) error
- func (c *Client) SetAllBinaryChannels(output uint32) error
- func (c *Client) SetBinaryChannel(channel int, state bool) error
- func (c *Client) SetConfiguration(config Configuration) error
- func (c *Client) SetRecover(customRecover func())
- func (c *Client) SetSingle(channel uint, state bool) error
- func (c *Client) StartStream(config *StreamConfiguration, callback func(*binio.Sample, uint32)) error
- func (c *Client) StopStream() error
- func (c *Client) StreamDefaultConfiguration() *StreamConfiguration
- func (c *Client) StreamStatus() bool
- func (c *Client) WaitForResponse(context string, timeout time.Duration) (*functionblockV1.Response, error)
- type ClientInterface
- type Configuration
- type StreamConfiguration
Constants ¶
const ( DefaultChannelFilterMask uint32 = 0xFFFFFFFF DefaultKeepaliveInterval uint32 = 10 DefaultBufferSize uint32 = 50 )
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 binaryIoTypeA function
func NewClientFromService ¶
NewClientFromService creates a new core function client from a socket with a address, which was acquired from the specified service. The timeout specifies the maximal time waiting for a service to show up.
func NewClientFromSocketAddress ¶
NewClientFromSocketAddress creates a new binaryIoTypeA function client from a socket with the specified address.
func (*Client) Command ¶ added in v0.1.4
Command issues a command cmd to a channel, waits for the devices response and returns it in res
func (*Client) Describe ¶
func (c *Client) Describe() (*binio.ConfigurationControlDescribeResponse, error)
func (*Client) GetConfiguration ¶
func (c *Client) GetConfiguration() (*Configuration, error)
func (*Client) GetResponse ¶ added in v0.1.4
func (c *Client) GetResponse(context string) *functionblockV1.Response
func (*Client) ReadResponses ¶ added in v0.1.4
func (c *Client) ReadResponses()
func (*Client) SetAllBinaryChannels ¶
SetAllBinaryChannels sets all binary channels to the given value from the bitmask LSB is channel 0. True: output is on, False, output is off For iou01 there are only four output channels. All other bits are ignored
func (*Client) SetBinaryChannel ¶
SetBinaryChannel sets the binary channel to the given value
func (*Client) SetConfiguration ¶
func (c *Client) SetConfiguration(config Configuration) error
func (*Client) SetRecover ¶ added in v0.1.4
func (c *Client) SetRecover(customRecover func())
SetRecover sets a function to inform the client about a panic event like timeout.
func (*Client) StartStream ¶ added in v0.1.4
func (*Client) StopStream ¶ added in v0.1.4
func (*Client) StreamDefaultConfiguration ¶ added in v0.1.4
func (c *Client) StreamDefaultConfiguration() *StreamConfiguration