adapt

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: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoDefault    = errors.New("no default adaptation for object")
	ErrNoAdaptation = errors.New("no adaptation from object to trait")
)

Functions

func BinaryObject

func BinaryObject(prefix string, client *gobacnet.Client, device bactypes.Device, object config.Object, statuses *statuspb.Map) (node.SelfAnnouncer, error)

BinaryObject adapts a binary bacnet object as smart core traits.

func DateToProto

func DateToProto(date bactypes.Date) *rpc.PropertyValue_DateValue

func Device

func Device(name string, client *gobacnet.Client, device bactypes.Device, known known.Context, statuses *statuspb.Map) node.SelfAnnouncer

Device adapts a bacnet Device into a Smart Core traits and other apis.

func DeviceName

func DeviceName(o config.Device) string

DeviceName returns the smart core name we should use for the configured object.

func Object

func Object(prefix string, client *gobacnet.Client, device bactypes.Device, object config.Object, statuses *statuspb.Map) (node.SelfAnnouncer, error)

Object adapts a bacnet object into one or more smart core named traits.

func ObjectIDFromProto

func ObjectIDFromProto(identifier *rpc.ObjectIdentifier) bactypes.ObjectID

func ObjectIDToProto

func ObjectIDToProto(id bactypes.ObjectID) *rpc.ObjectIdentifier

func ObjectName

func ObjectName(o config.Object) string

ObjectName returns the smart core name we should use for the configured object.

func PropertyToProto

func PropertyToProto(p bactypes.Property) *rpc.PropertyReference

func PropertyToProtoReadResult

func PropertyToProtoReadResult(p bactypes.Property) (*rpc.PropertyReadResult, error)

func PropertyValueToProto

func PropertyValueToProto(p bactypes.Property) (*rpc.PropertyValue, error)

func TimeToProto

func TimeToProto(time bactypes.Time) *rpc.PropertyValue_TimeValue

Types

type DeviceBacnetService

type DeviceBacnetService struct {
	rpc.UnimplementedBacnetDriverServiceServer
	// contains filtered or unexported fields
}

DeviceBacnetService implements rpc.BacnetDriverServiceServer targeting a single bacnet device. This provides read and write operations for objects on that device.

We should keep this API up to date wrt the features available in gobacnet.Client.

func (*DeviceBacnetService) AnnounceSelf

func (d *DeviceBacnetService) AnnounceSelf(a node.Announcer) node.Undo

func (*DeviceBacnetService) ListObjects

func (*DeviceBacnetService) ReadProperty

func (*DeviceBacnetService) ReadPropertyMultiple

func (*DeviceBacnetService) WriteProperty

func (*DeviceBacnetService) WritePropertyMultiple

Jump to

Keyboard shortcuts

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