Documentation ¶
Index ¶
- Variables
- type Device
- func (device *Device) DeviceDiscover(options *bacnet.WhoIsOpts) ([]*Device, error)
- func (device *Device) DeviceObjects(deviceID btypes.ObjectInstance, checkAPDU bool) (objectList []btypes.ObjectID, err error)
- func (device *Device) GetDeviceDetails(deviceID btypes.ObjectInstance) (resp *DeviceDetails, err error)
- func (device *Device) GetDevicePoints(deviceID btypes.ObjectInstance) (resp []*PointDetails, err error)
- func (device *Device) PointDetails(pnt *Point) (resp *PointDetails, err error)
- func (device *Device) PointReadBool(pnt *Point) (uint32, error)
- func (device *Device) PointReadFloat32(pnt *Point) (float32, error)
- func (device *Device) PointReadMultiState(pnt *Point) (uint32, error)
- func (device *Device) PointReadPriority(pnt *Point) (pri *priority.Float32, err error)
- func (device *Device) PointReleasePriority(pnt *Point, pri uint8) error
- func (device *Device) PointWriteAnalogue(pnt *Point, value float32) error
- func (device *Device) PointWriteBool(pnt *Point, value uint32) error
- func (device *Device) PointWriteMultiState(pnt *Point, value uint32) error
- func (device *Device) Read(obj *Object) (out btypes.PropertyData, err error)
- func (device *Device) ReadDeviceName(ObjectID btypes.ObjectInstance) (string, error)
- func (device *Device) ReadPointName(pnt *Point) (string, error)
- func (device *Device) ReadString(obj *Object) (string, error)
- func (device *Device) ToBitString(d btypes.PropertyData) *btypes.BitString
- func (device *Device) Whois(options *bacnet.WhoIsOpts) ([]btypes.Device, error)
- func (device *Device) Write(write *Write) error
- func (device *Device) WriteDeviceName(ObjectID btypes.ObjectInstance, value string) error
- func (device *Device) WritePointName(pnt *Point, value string) error
- type DeviceDetails
- type DevicePoints
- type Network
- func (net *Network) GetDeviceDetails(device btypes.Device) (resp *DeviceDetails, err error)
- func (net *Network) NetworkClose(closeLogs bool) error
- func (net *Network) NetworkDiscover(options *bacnet.WhoIsOpts) ([]btypes.Device, error)
- func (net *Network) NetworkRun()
- func (net *Network) Whois(options *bacnet.WhoIsOpts) ([]btypes.Device, error)
- type Object
- type Point
- type PointDetails
- type Store
- type Write
Constants ¶
This section is empty.
Variables ¶
var (
ObjectNil = errors.New("object list can not be empty")
)
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct { Ip string Port int DeviceID int NetworkNumber int MacMSTP int MaxApdu uint32 Segmentation uint32 StoreID string DeviceName string VendorName string // contains filtered or unexported fields }
func (*Device) DeviceDiscover ¶
func (*Device) DeviceObjects ¶
func (device *Device) DeviceObjects(deviceID btypes.ObjectInstance, checkAPDU bool) (objectList []btypes.ObjectID, err error)
DeviceObjects get device objects
func (*Device) GetDeviceDetails ¶
func (device *Device) GetDeviceDetails(deviceID btypes.ObjectInstance) (resp *DeviceDetails, err error)
GetDeviceDetails get the device name, max adpu and so on first read device and see what it supports and get the name and so on try and get the object list if it's an error then loop through the arrayIndex to build the object list
func (*Device) GetDevicePoints ¶
func (device *Device) GetDevicePoints(deviceID btypes.ObjectInstance) (resp []*PointDetails, err error)
GetDevicePoints build a device points list first read device and see what it supports and get the name and so on try and get the object list if it's an error then loop through the arrayIndex to build the object list with the object list do a point's discovery, get the name, units and so on
func (*Device) PointDetails ¶
func (device *Device) PointDetails(pnt *Point) (resp *PointDetails, err error)
PointDetails use this when wanting to read point name, units and so on
func (*Device) PointReadBool ¶
PointReadBool use this when wanting to read point values for an BI, BV, BO
func (*Device) PointReadFloat32 ¶
PointReadFloat32 use this when wanting to read point values for an AI, AV, AO
func (*Device) PointReadMultiState ¶
PointReadMultiState use this when wanting to read point values for an MI, MV, MO
func (*Device) PointReadPriority ¶
PointReadPriority use this when wanting to read point values for an AI, AV, AO
func (*Device) PointReleasePriority ¶
PointReleasePriority use this when releasing a priority
func (*Device) PointWriteAnalogue ¶
PointWriteAnalogue use this when wanting to write a new value for an AV, AO
func (*Device) PointWriteBool ¶
PointWriteBool use this when wanting to write a new value for an BV, AO
func (*Device) PointWriteMultiState ¶
PointWriteMultiState use this when wanting to write a new value for an MV, MO
func (*Device) ReadDeviceName ¶
func (device *Device) ReadDeviceName(ObjectID btypes.ObjectInstance) (string, error)
func (*Device) ReadString ¶
ReadString to read a string like objectName
func (*Device) ToBitString ¶
func (device *Device) ToBitString(d btypes.PropertyData) *btypes.BitString
func (*Device) WriteDeviceName ¶
func (device *Device) WriteDeviceName(ObjectID btypes.ObjectInstance, value string) error
type DeviceDetails ¶
type DevicePoints ¶
type Network ¶
type Network struct { Interface string Ip string Port int SubnetCIDR int StoreID string Store *Store // contains filtered or unexported fields }
func (*Network) GetDeviceDetails ¶ added in v0.1.2
func (net *Network) GetDeviceDetails(device btypes.Device) (resp *DeviceDetails, err error)
func (*Network) NetworkClose ¶
func (*Network) NetworkDiscover ¶ added in v0.1.2
func (*Network) NetworkRun ¶
func (net *Network) NetworkRun()
type Object ¶
type Object struct { ObjectID btypes.ObjectInstance `json:"object_id"` ObjectType btypes.ObjectType `json:"object_type"` Prop btypes.PropertyType `json:"prop"` ArrayIndex uint32 `json:"array_index"` }
type Point ¶
type Point struct { ObjectID btypes.ObjectInstance `json:"object_id,omitempty"` ObjectType btypes.ObjectType `json:"object_type,omitempty"` WriteValue interface{} WriteNull bool WritePriority uint8 ReadPresentValue bool ReadPriority bool }
type PointDetails ¶
type PointDetails struct { Name string `json:"name,omitempty"` Unit uint32 `json:"unit,omitempty"` UnitString string `json:"unit_string,omitempty"` ObjectID btypes.ObjectInstance `json:"object_id,omitempty"` ObjectType btypes.ObjectType `json:"object_type,omitempty"` PointType string `json:"point_type,omitempty"` }
type Store ¶
func (*Store) NewNetwork ¶ added in v0.1.7
NewNetwork updated a cached
type Write ¶
type Write struct { ObjectID btypes.ObjectInstance ObjectType btypes.ObjectType Prop btypes.PropertyType WriteValue interface{} WriteNull bool WritePriority uint8 }