Documentation ¶
Index ¶
- Variables
- func BinaryObject(prefix string, client *gobacnet.Client, device bactypes.Device, ...) (node.SelfAnnouncer, error)
- func BitStringToProto(bs bactypes.BitString) *rpc.PropertyValue_BitStringValue
- func DateToProto(date bactypes.Date) *rpc.PropertyValue_DateValue
- func Device(name string, client *gobacnet.Client, device bactypes.Device, ...) node.SelfAnnouncer
- func DeviceName(o config.Device) string
- func Object(prefix string, client *gobacnet.Client, device bactypes.Device, ...) (node.SelfAnnouncer, error)
- func ObjectIDFromProto(identifier *rpc.ObjectIdentifier) bactypes.ObjectID
- func ObjectIDToProto(id bactypes.ObjectID) *rpc.ObjectIdentifier
- func ObjectName(o config.Object) string
- func PropertyToProto(p bactypes.Property) *rpc.PropertyReference
- func PropertyToProtoReadResult(p bactypes.Property) (*rpc.PropertyReadResult, error)
- func PropertyValueToProto(p bactypes.Property) (*rpc.PropertyValue, error)
- func TimeToProto(time bactypes.Time) *rpc.PropertyValue_TimeValue
- type DeviceBacnetService
- func (d *DeviceBacnetService) AnnounceSelf(a node.Announcer) node.Undo
- func (d *DeviceBacnetService) ListObjects(_ context.Context, _ *rpc.ListObjectsRequest) (*rpc.ListObjectsResponse, error)
- func (d *DeviceBacnetService) ReadProperty(ctx context.Context, request *rpc.ReadPropertyRequest) (*rpc.ReadPropertyResponse, error)
- func (d *DeviceBacnetService) ReadPropertyMultiple(ctx context.Context, request *rpc.ReadPropertyMultipleRequest) (*rpc.ReadPropertyMultipleResponse, error)
- func (d *DeviceBacnetService) WriteProperty(ctx context.Context, request *rpc.WritePropertyRequest) (*rpc.WritePropertyResponse, error)
- func (d *DeviceBacnetService) WritePropertyMultiple(ctx context.Context, request *rpc.WritePropertyMultipleRequest) (*rpc.WritePropertyMultipleResponse, error)
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 BitStringToProto ¶
func BitStringToProto(bs bactypes.BitString) *rpc.PropertyValue_BitStringValue
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 ¶
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 ¶
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 (d *DeviceBacnetService) ListObjects(_ context.Context, _ *rpc.ListObjectsRequest) (*rpc.ListObjectsResponse, error)
func (*DeviceBacnetService) ReadProperty ¶
func (d *DeviceBacnetService) ReadProperty(ctx context.Context, request *rpc.ReadPropertyRequest) (*rpc.ReadPropertyResponse, error)
func (*DeviceBacnetService) ReadPropertyMultiple ¶
func (d *DeviceBacnetService) ReadPropertyMultiple(ctx context.Context, request *rpc.ReadPropertyMultipleRequest) (*rpc.ReadPropertyMultipleResponse, error)
func (*DeviceBacnetService) WriteProperty ¶
func (d *DeviceBacnetService) WriteProperty(ctx context.Context, request *rpc.WritePropertyRequest) (*rpc.WritePropertyResponse, error)
func (*DeviceBacnetService) WritePropertyMultiple ¶
func (d *DeviceBacnetService) WritePropertyMultiple(ctx context.Context, request *rpc.WritePropertyMultipleRequest) (*rpc.WritePropertyMultipleResponse, error)
Click to show internal directories.
Click to hide internal directories.