comm

package
v0.0.0-test-multiarch Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPropNotFound   = errors.New("property not found")
	ErrObjectNotFound = errors.New("object not found")
)

Functions

func AnyValue

func AnyValue(data any) (any, error)

func BitStringValue

func BitStringValue(data any) (bactypes.BitString, error)

func BoolValue

func BoolValue(data any) (bool, error)

func EnumValue

func EnumValue(data any) (bactypes.Enumerated, error)

func Float32Value

func Float32Value(data any) (float32, error)

func Float64Value

func Float64Value(data any) (float64, error)

func LogPollError

func LogPollError(logger *zap.Logger, msg string, err error)

func ReadProperties

func ReadProperties(ctx context.Context, client *gobacnet.Client, known known.Context, values ...config.ValueSource) []any

func ReadPropertiesChunked

func ReadPropertiesChunked(ctx context.Context, client *gobacnet.Client, known known.Context, chunkSize int, values ...config.ValueSource) []any

ReadPropertiesChunked is like readProperties but splits values into chunks of at most chunkSize that are executed in parallel.

func ReadProperty

func ReadProperty(ctx context.Context, client *gobacnet.Client, known known.Context, value config.ValueSource) (any, error)

func StringValue

func StringValue(data any) (string, error)

func WriteProperty

func WriteProperty(ctx context.Context, client *gobacnet.Client, known known.Context, value config.ValueSource, data any, priority uint) error

Types

type ErrReadProperty

type ErrReadProperty struct {
	Prop  string
	Cause error
}

func (ErrReadProperty) Error

func (e ErrReadProperty) Error() string

func (ErrReadProperty) PropName

func (e ErrReadProperty) PropName() string

func (ErrReadProperty) Unwrap

func (e ErrReadProperty) Unwrap() error

Jump to

Keyboard shortcuts

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