Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) Close() error
- func (c *Client) Objects(dev bactype.Device) (bactype.Device, error)
- func (c *Client) ReadMultiProperty(dev bactype.Device, rp bactype.MultiplePropertyData) (bactype.MultiplePropertyData, error)
- func (c *Client) ReadProperty(dest bactype.Device, rp bactype.PropertyData) (bactype.PropertyData, error)
- func (c *Client) Run()
- func (c *Client) Send(dest bactype.Address, data []byte) (int, error)
- func (c *Client) WhoIs(low, high int) ([]types.Device, error)
- func (c *Client) WriteMultiProperty(dev bactype.Device, wp bactype.MultiplePropertyData) error
- func (c *Client) WriteProperty(dest bactype.Device, wp bactype.PropertyData) error
Constants ¶
const ArrayAll = 0xFFFFFFFF
ArrayAll is used when reading/writting to a property to read/write the entire array
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Close ¶
Close free resources for the client. Always call this function when using NewClient
func (*Client) Objects ¶
Objects retrieves all of the objects within the given device and returns a device with these objects. Along with the list of objects, it will also gather additional information from the object such as the name and description of the objects. The device returned contains all of the name and description fields for all objects
func (*Client) ReadMultiProperty ¶
func (c *Client) ReadMultiProperty(dev bactype.Device, rp bactype.MultiplePropertyData) (bactype.MultiplePropertyData, error)
ReadMultiProperty uses the given device and read property request to read from a device. Along with being able to read multiple properties from a device, it can also read these properties from multiple objects. This is a good feature to read all present values of every object in the device. This is a batch operation compared to a ReadProperty and should be used in place when reading more than two objects/properties.
func (*Client) ReadProperty ¶
func (c *Client) ReadProperty(dest bactype.Device, rp bactype.PropertyData) (bactype.PropertyData, error)
ReadProperty reads a single property from a single object in the given device.
func (*Client) WhoIs ¶
WhoIs finds all devices with ids between the provided low and high values. Use constant ArrayAll for both fields to scan the entire network at once. Using ArrayAll is highly discouraged for most networks since it can lead to a high congested network.