Documentation ¶
Overview ¶
Package sensors contains a gRPC based sensors service client
Package sensors implements a sensors service.
Package sensors contains a gRPC based sensors service server
Index ¶
- Constants
- Variables
- func FindFirstName(r robot.Robot) string
- func Named(name string) resource.Name
- func NewServer(s subtype.Service) pb.SensorsServiceServer
- func NewUnimplementedInterfaceError(actual interface{}) error
- func WrapWithReconfigurable(s interface{}, name resource.Name) (resource.Reconfigurable, error)
- type Readings
- type Service
Constants ¶
const SubtypeName = resource.SubtypeName("sensors")
SubtypeName is the name of the type of service.
Variables ¶
var Subtype = resource.NewSubtype( resource.ResourceNamespaceRDK, resource.ResourceTypeService, SubtypeName, )
Subtype is a constant that identifies the sensor service resource subtype.
Functions ¶
func FindFirstName ¶ added in v0.0.8
FindFirstName returns name of first sensors service found.
func Named ¶
Named is a helper for getting the named sensor's typed resource name. RSDK-347 Implements senors's Named.
func NewServer ¶
func NewServer(s subtype.Service) pb.SensorsServiceServer
NewServer constructs a sensors gRPC service server.
func NewUnimplementedInterfaceError ¶ added in v0.1.0
func NewUnimplementedInterfaceError(actual interface{}) error
NewUnimplementedInterfaceError is used when there is a failed interface check.
func WrapWithReconfigurable ¶
func WrapWithReconfigurable(s interface{}, name resource.Name) (resource.Reconfigurable, error)
WrapWithReconfigurable wraps a Sensors service as a Reconfigurable.
Types ¶
type Service ¶
type Service interface { Sensors(ctx context.Context, extra map[string]interface{}) ([]resource.Name, error) Readings(ctx context.Context, sensorNames []resource.Name, extra map[string]interface{}) ([]Readings, error) resource.Generic }
A Service centralizes all sensors into one place.
func FirstFromRobot ¶ added in v0.0.8
FirstFromRobot returns the first sensor service in this robot.
func NewClientFromConn ¶
func NewClientFromConn(ctx context.Context, conn rpc.ClientConn, name string, logger golog.Logger) Service
NewClientFromConn constructs a new Client from connection passed in.
Directories ¶
Path | Synopsis |
---|---|
Package builtin implements the default sensors service.
|
Package builtin implements the default sensors service. |
Package register registers all relevant sensors models and also subtype specific functions
|
Package register registers all relevant sensors models and also subtype specific functions |