baetyl_bacnet

package
v0.0.0-...-be07254 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2023 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bacnet

type Bacnet struct {
	// contains filtered or unexported fields
}

func NewBacnet

func NewBacnet(ctx dm.Context, cfg *Config) (*Bacnet, error)

func (*Bacnet) Close

func (bac *Bacnet) Close() error

func (*Bacnet) DeltaCallback

func (bac *Bacnet) DeltaCallback(info *dm.DeviceInfo, delta v1.Delta) error

func (*Bacnet) PropertyGetCallback

func (bac *Bacnet) PropertyGetCallback(info *dm.DeviceInfo, properties []string) error

type Config

type Config struct {
	Slaves []SlaveConfig `yaml:"slaves" json:"slaves"`
	Jobs   []Job         `yaml:"jobs" json:"jobs"`
}

type Job

type Job struct {
	Device        string              `yaml:"device" json:"device"`
	DeviceId      uint32              `yaml:"deviceId" json:"deviceId"`
	AddressOffset uint                `yaml:"addressOffset" json:"addressOffset"`
	Properties    map[string]Property `yaml:"properties" json:"properties"`
	Interval      time.Duration       `yaml:"interval" json:"interval" default:"15s"`
}

type Property

type Property struct {
	Id                   string `yaml:"id" json:"id"`
	Name                 string `yaml:"name" json:"name"`
	Type                 string `yaml:"type" json:"type"`
	Mode                 string `yaml:"mode" json:"mode"`
	BacnetType           uint   `yaml:"bacnetType" json:"bacnetType"`
	BacnetAddress        uint   `yaml:"bacnetAddress" json:"bacnetAddress"`
	ApplicationTagNumber byte   `yaml:"applicationTagNumber" json:"applicationTagNumber"`
}

type Slave

type Slave struct {
	// contains filtered or unexported fields
}

func NewSlave

func NewSlave(info *dm.DeviceInfo, cfg SlaveConfig) (*Slave, error)

type SlaveConfig

type SlaveConfig struct {
	Device   string        `yaml:"device" json:"device"`
	DeviceId uint32        `yaml:"deviceId" json:"deviceId"`
	Interval time.Duration `yaml:"interval,omitempty" json:"interval,omitempty"`
	Address  string        `yaml:"address" json:"address"`
	Port     int           `yaml:"port" json:"port"`
}

type Worker

type Worker struct {
	// contains filtered or unexported fields
}

func NewWorker

func NewWorker(job Job, slave *Slave, ctx dm.Context, log *log.Logger) *Worker

func (*Worker) Execute

func (w *Worker) Execute() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL