v1

package
v0.1.178 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_component_motor_v1_motor_proto protoreflect.FileDescriptor
View Source
var MotorService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "viam.component.motor.v1.MotorService",
	HandlerType: (*MotorServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SetPower",
			Handler:    _MotorService_SetPower_Handler,
		},
		{
			MethodName: "GoFor",
			Handler:    _MotorService_GoFor_Handler,
		},
		{
			MethodName: "GoTo",
			Handler:    _MotorService_GoTo_Handler,
		},
		{
			MethodName: "ResetZeroPosition",
			Handler:    _MotorService_ResetZeroPosition_Handler,
		},
		{
			MethodName: "GetPosition",
			Handler:    _MotorService_GetPosition_Handler,
		},
		{
			MethodName: "GetProperties",
			Handler:    _MotorService_GetProperties_Handler,
		},
		{
			MethodName: "Stop",
			Handler:    _MotorService_Stop_Handler,
		},
		{
			MethodName: "IsPowered",
			Handler:    _MotorService_IsPowered_Handler,
		},
		{
			MethodName: "IsMoving",
			Handler:    _MotorService_IsMoving_Handler,
		},
		{
			MethodName: "DoCommand",
			Handler:    _MotorService_DoCommand_Handler,
		},
		{
			MethodName: "GetGeometries",
			Handler:    _MotorService_GetGeometries_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "component/motor/v1/motor.proto",
}

MotorService_ServiceDesc is the grpc.ServiceDesc for MotorService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterMotorServiceHandler

func RegisterMotorServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterMotorServiceHandler registers the http handlers for service MotorService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterMotorServiceHandlerClient

func RegisterMotorServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MotorServiceClient) error

RegisterMotorServiceHandlerClient registers the http handlers for service MotorService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MotorServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MotorServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MotorServiceClient" to call the correct interceptors.

func RegisterMotorServiceHandlerFromEndpoint

func RegisterMotorServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterMotorServiceHandlerFromEndpoint is same as RegisterMotorServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterMotorServiceHandlerServer

func RegisterMotorServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MotorServiceServer) error

RegisterMotorServiceHandlerServer registers the http handlers for service MotorService to "mux". UnaryRPC :call MotorServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMotorServiceHandlerFromEndpoint instead.

func RegisterMotorServiceServer

func RegisterMotorServiceServer(s grpc.ServiceRegistrar, srv MotorServiceServer)

Types

type GetPositionRequest

type GetPositionRequest struct {

	// Name of a motor
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Additional arguments to the method
	Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPositionRequest) Descriptor deprecated

func (*GetPositionRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetPositionRequest.ProtoReflect.Descriptor instead.

func (*GetPositionRequest) GetExtra

func (x *GetPositionRequest) GetExtra() *structpb.Struct

func (*GetPositionRequest) GetName

func (x *GetPositionRequest) GetName() string

func (*GetPositionRequest) ProtoMessage

func (*GetPositionRequest) ProtoMessage()

func (*GetPositionRequest) ProtoReflect

func (x *GetPositionRequest) ProtoReflect() protoreflect.Message

func (*GetPositionRequest) Reset

func (x *GetPositionRequest) Reset()

func (*GetPositionRequest) String

func (x *GetPositionRequest) String() string

type GetPositionResponse

type GetPositionResponse struct {

	// Current position of the motor relative to its home
	Position float64 `protobuf:"fixed64,1,opt,name=position,proto3" json:"position,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPositionResponse) Descriptor deprecated

func (*GetPositionResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetPositionResponse.ProtoReflect.Descriptor instead.

func (*GetPositionResponse) GetPosition

func (x *GetPositionResponse) GetPosition() float64

func (*GetPositionResponse) ProtoMessage

func (*GetPositionResponse) ProtoMessage()

func (*GetPositionResponse) ProtoReflect

func (x *GetPositionResponse) ProtoReflect() protoreflect.Message

func (*GetPositionResponse) Reset

func (x *GetPositionResponse) Reset()

func (*GetPositionResponse) String

func (x *GetPositionResponse) String() string

type GetPropertiesRequest

type GetPropertiesRequest struct {

	// Name of a motor
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Additional arguments to the method
	Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPropertiesRequest) Descriptor deprecated

func (*GetPropertiesRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetPropertiesRequest.ProtoReflect.Descriptor instead.

func (*GetPropertiesRequest) GetExtra

func (x *GetPropertiesRequest) GetExtra() *structpb.Struct

func (*GetPropertiesRequest) GetName

func (x *GetPropertiesRequest) GetName() string

func (*GetPropertiesRequest) ProtoMessage

func (*GetPropertiesRequest) ProtoMessage()

func (*GetPropertiesRequest) ProtoReflect

func (x *GetPropertiesRequest) ProtoReflect() protoreflect.Message

func (*GetPropertiesRequest) Reset

func (x *GetPropertiesRequest) Reset()

func (*GetPropertiesRequest) String

func (x *GetPropertiesRequest) String() string

type GetPropertiesResponse

type GetPropertiesResponse struct {

	// Returns true if the motor supports reporting its position
	PositionReporting bool `protobuf:"varint,1,opt,name=position_reporting,json=positionReporting,proto3" json:"position_reporting,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPropertiesResponse) Descriptor deprecated

func (*GetPropertiesResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetPropertiesResponse.ProtoReflect.Descriptor instead.

func (*GetPropertiesResponse) GetPositionReporting

func (x *GetPropertiesResponse) GetPositionReporting() bool

func (*GetPropertiesResponse) ProtoMessage

func (*GetPropertiesResponse) ProtoMessage()

func (*GetPropertiesResponse) ProtoReflect

func (x *GetPropertiesResponse) ProtoReflect() protoreflect.Message

func (*GetPropertiesResponse) Reset

func (x *GetPropertiesResponse) Reset()

func (*GetPropertiesResponse) String

func (x *GetPropertiesResponse) String() string

type GoForRequest

type GoForRequest struct {

	// Name of a motor
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Speed of motor travel in rotations per minute
	Rpm float64 `protobuf:"fixed64,2,opt,name=rpm,proto3" json:"rpm,omitempty"`
	// Number of revolutions relative to motor's start position
	Revolutions float64 `protobuf:"fixed64,3,opt,name=revolutions,proto3" json:"revolutions,omitempty"`
	// Additional arguments to the method
	Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"`
	// contains filtered or unexported fields
}

func (*GoForRequest) Descriptor deprecated

func (*GoForRequest) Descriptor() ([]byte, []int)

Deprecated: Use GoForRequest.ProtoReflect.Descriptor instead.

func (*GoForRequest) GetExtra

func (x *GoForRequest) GetExtra() *structpb.Struct

func (*GoForRequest) GetName

func (x *GoForRequest) GetName() string

func (*GoForRequest) GetRevolutions

func (x *GoForRequest) GetRevolutions() float64

func (*GoForRequest) GetRpm

func (x *GoForRequest) GetRpm() float64

func (*GoForRequest) ProtoMessage

func (*GoForRequest) ProtoMessage()

func (*GoForRequest) ProtoReflect

func (x *GoForRequest) ProtoReflect() protoreflect.Message

func (*GoForRequest) Reset

func (x *GoForRequest) Reset()

func (*GoForRequest) String

func (x *GoForRequest) String() string

type GoForResponse

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

func (*GoForResponse) Descriptor deprecated

func (*GoForResponse) Descriptor() ([]byte, []int)

Deprecated: Use GoForResponse.ProtoReflect.Descriptor instead.

func (*GoForResponse) ProtoMessage

func (*GoForResponse) ProtoMessage()

func (*GoForResponse) ProtoReflect

func (x *GoForResponse) ProtoReflect() protoreflect.Message

func (*GoForResponse) Reset

func (x *GoForResponse) Reset()

func (*GoForResponse) String

func (x *GoForResponse) String() string

type GoToRequest

type GoToRequest struct {

	// Name of a motor
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Speed of motor travel in rotations per minute
	Rpm float64 `protobuf:"fixed64,2,opt,name=rpm,proto3" json:"rpm,omitempty"`
	// Number of revolutions relative to motor's home home/zero
	PositionRevolutions float64 `protobuf:"fixed64,3,opt,name=position_revolutions,json=positionRevolutions,proto3" json:"position_revolutions,omitempty"`
	// Additional arguments to the method
	Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"`
	// contains filtered or unexported fields
}

func (*GoToRequest) Descriptor deprecated

func (*GoToRequest) Descriptor() ([]byte, []int)

Deprecated: Use GoToRequest.ProtoReflect.Descriptor instead.

func (*GoToRequest) GetExtra

func (x *GoToRequest) GetExtra() *structpb.Struct

func (*GoToRequest) GetName

func (x *GoToRequest) GetName() string

func (*GoToRequest) GetPositionRevolutions

func (x *GoToRequest) GetPositionRevolutions() float64

func (*GoToRequest) GetRpm

func (x *GoToRequest) GetRpm() float64

func (*GoToRequest) ProtoMessage

func (*GoToRequest) ProtoMessage()

func (*GoToRequest) ProtoReflect

func (x *GoToRequest) ProtoReflect() protoreflect.Message

func (*GoToRequest) Reset

func (x *GoToRequest) Reset()

func (*GoToRequest) String

func (x *GoToRequest) String() string

type GoToResponse

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

func (*GoToResponse) Descriptor deprecated

func (*GoToResponse) Descriptor() ([]byte, []int)

Deprecated: Use GoToResponse.ProtoReflect.Descriptor instead.

func (*GoToResponse) ProtoMessage

func (*GoToResponse) ProtoMessage()

func (*GoToResponse) ProtoReflect

func (x *GoToResponse) ProtoReflect() protoreflect.Message

func (*GoToResponse) Reset

func (x *GoToResponse) Reset()

func (*GoToResponse) String

func (x *GoToResponse) String() string

type IsMovingRequest added in v0.1.24

type IsMovingRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*IsMovingRequest) Descriptor deprecated added in v0.1.24

func (*IsMovingRequest) Descriptor() ([]byte, []int)

Deprecated: Use IsMovingRequest.ProtoReflect.Descriptor instead.

func (*IsMovingRequest) GetName added in v0.1.24

func (x *IsMovingRequest) GetName() string

func (*IsMovingRequest) ProtoMessage added in v0.1.24

func (*IsMovingRequest) ProtoMessage()

func (*IsMovingRequest) ProtoReflect added in v0.1.24

func (x *IsMovingRequest) ProtoReflect() protoreflect.Message

func (*IsMovingRequest) Reset added in v0.1.24

func (x *IsMovingRequest) Reset()

func (*IsMovingRequest) String added in v0.1.24

func (x *IsMovingRequest) String() string

type IsMovingResponse added in v0.1.24

type IsMovingResponse struct {
	IsMoving bool `protobuf:"varint,1,opt,name=is_moving,json=isMoving,proto3" json:"is_moving,omitempty"`
	// contains filtered or unexported fields
}

func (*IsMovingResponse) Descriptor deprecated added in v0.1.24

func (*IsMovingResponse) Descriptor() ([]byte, []int)

Deprecated: Use IsMovingResponse.ProtoReflect.Descriptor instead.

func (*IsMovingResponse) GetIsMoving added in v0.1.24

func (x *IsMovingResponse) GetIsMoving() bool

func (*IsMovingResponse) ProtoMessage added in v0.1.24

func (*IsMovingResponse) ProtoMessage()

func (*IsMovingResponse) ProtoReflect added in v0.1.24

func (x *IsMovingResponse) ProtoReflect() protoreflect.Message

func (*IsMovingResponse) Reset added in v0.1.24

func (x *IsMovingResponse) Reset()

func (*IsMovingResponse) String added in v0.1.24

func (x *IsMovingResponse) String() string

type IsPoweredRequest

type IsPoweredRequest struct {

	// Name of a motor
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Additional arguments to the method
	Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"`
	// contains filtered or unexported fields
}

func (*IsPoweredRequest) Descriptor deprecated

func (*IsPoweredRequest) Descriptor() ([]byte, []int)

Deprecated: Use IsPoweredRequest.ProtoReflect.Descriptor instead.

func (*IsPoweredRequest) GetExtra

func (x *IsPoweredRequest) GetExtra() *structpb.Struct

func (*IsPoweredRequest) GetName

func (x *IsPoweredRequest) GetName() string

func (*IsPoweredRequest) ProtoMessage

func (*IsPoweredRequest) ProtoMessage()

func (*IsPoweredRequest) ProtoReflect

func (x *IsPoweredRequest) ProtoReflect() protoreflect.Message

func (*IsPoweredRequest) Reset

func (x *IsPoweredRequest) Reset()

func (*IsPoweredRequest) String

func (x *IsPoweredRequest) String() string

type IsPoweredResponse

type IsPoweredResponse struct {

	// Returns true if the motor is on
	IsOn bool `protobuf:"varint,1,opt,name=is_on,json=isOn,proto3" json:"is_on,omitempty"`
	// Returns power percent (from 0 to 1, or from -1 to 1 for motors that support negative power),
	// based on the last command sent to motor. If the last command was a stop command, this value
	// will be 0.
	PowerPct float64 `protobuf:"fixed64,2,opt,name=power_pct,json=powerPct,proto3" json:"power_pct,omitempty"`
	// contains filtered or unexported fields
}

func (*IsPoweredResponse) Descriptor deprecated

func (*IsPoweredResponse) Descriptor() ([]byte, []int)

Deprecated: Use IsPoweredResponse.ProtoReflect.Descriptor instead.

func (*IsPoweredResponse) GetIsOn

func (x *IsPoweredResponse) GetIsOn() bool

func (*IsPoweredResponse) GetPowerPct added in v0.1.2

func (x *IsPoweredResponse) GetPowerPct() float64

func (*IsPoweredResponse) ProtoMessage

func (*IsPoweredResponse) ProtoMessage()

func (*IsPoweredResponse) ProtoReflect

func (x *IsPoweredResponse) ProtoReflect() protoreflect.Message

func (*IsPoweredResponse) Reset

func (x *IsPoweredResponse) Reset()

func (*IsPoweredResponse) String

func (x *IsPoweredResponse) String() string

type MotorServiceClient

type MotorServiceClient interface {
	// SetPower sets the percentage of the motor's total power that should be employed
	// expressed a value between -1 and 1 where negative values indicate a backwards
	// direction and positive values a forward direction
	SetPower(ctx context.Context, in *SetPowerRequest, opts ...grpc.CallOption) (*SetPowerResponse, error)
	// GoFor instructs the motor to turn at a specified speed, which is expressed in RPM,
	// for a specified number of rotations relative to its starting position
	// This method will return an error if position reporting is not supported
	// If revolutions is 0, this will run the motor at rpm indefinitely
	// If revolutions != 0, this will block until the number of revolutions has been completed or another operation comes in.
	GoFor(ctx context.Context, in *GoForRequest, opts ...grpc.CallOption) (*GoForResponse, error)
	// GoTo requests the robot's motor to move to a specific position that
	// is relative to its home position at a specified speed which is expressed in RPM
	// This method will return an error if position reporting is not supported
	GoTo(ctx context.Context, in *GoToRequest, opts ...grpc.CallOption) (*GoToResponse, error)
	// ResetZeroPosition sets the current position of the motor as the new zero position
	// This method will return an error if position reporting is not supported
	ResetZeroPosition(ctx context.Context, in *ResetZeroPositionRequest, opts ...grpc.CallOption) (*ResetZeroPositionResponse, error)
	// Position reports the position of the robot's motor relative to its zero position
	// This method will return an error if position reporting is not supported
	GetPosition(ctx context.Context, in *GetPositionRequest, opts ...grpc.CallOption) (*GetPositionResponse, error)
	// GetProperties returns a message of booleans indicating which optional features the robot's motor supports
	GetProperties(ctx context.Context, in *GetPropertiesRequest, opts ...grpc.CallOption) (*GetPropertiesResponse, error)
	// Stop turns the robot's motor off
	Stop(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*StopResponse, error)
	// IsPowered returns true if the robot's motor is on
	IsPowered(ctx context.Context, in *IsPoweredRequest, opts ...grpc.CallOption) (*IsPoweredResponse, error)
	// IsMoving reports if a component is in motion
	IsMoving(ctx context.Context, in *IsMovingRequest, opts ...grpc.CallOption) (*IsMovingResponse, error)
	// DoCommand sends/receives arbitrary commands
	DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error)
	// GetGeometries returns the geometries of the component in their current configuration
	GetGeometries(ctx context.Context, in *v1.GetGeometriesRequest, opts ...grpc.CallOption) (*v1.GetGeometriesResponse, error)
}

MotorServiceClient is the client API for MotorService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type MotorServiceServer

type MotorServiceServer interface {
	// SetPower sets the percentage of the motor's total power that should be employed
	// expressed a value between -1 and 1 where negative values indicate a backwards
	// direction and positive values a forward direction
	SetPower(context.Context, *SetPowerRequest) (*SetPowerResponse, error)
	// GoFor instructs the motor to turn at a specified speed, which is expressed in RPM,
	// for a specified number of rotations relative to its starting position
	// This method will return an error if position reporting is not supported
	// If revolutions is 0, this will run the motor at rpm indefinitely
	// If revolutions != 0, this will block until the number of revolutions has been completed or another operation comes in.
	GoFor(context.Context, *GoForRequest) (*GoForResponse, error)
	// GoTo requests the robot's motor to move to a specific position that
	// is relative to its home position at a specified speed which is expressed in RPM
	// This method will return an error if position reporting is not supported
	GoTo(context.Context, *GoToRequest) (*GoToResponse, error)
	// ResetZeroPosition sets the current position of the motor as the new zero position
	// This method will return an error if position reporting is not supported
	ResetZeroPosition(context.Context, *ResetZeroPositionRequest) (*ResetZeroPositionResponse, error)
	// Position reports the position of the robot's motor relative to its zero position
	// This method will return an error if position reporting is not supported
	GetPosition(context.Context, *GetPositionRequest) (*GetPositionResponse, error)
	// GetProperties returns a message of booleans indicating which optional features the robot's motor supports
	GetProperties(context.Context, *GetPropertiesRequest) (*GetPropertiesResponse, error)
	// Stop turns the robot's motor off
	Stop(context.Context, *StopRequest) (*StopResponse, error)
	// IsPowered returns true if the robot's motor is on
	IsPowered(context.Context, *IsPoweredRequest) (*IsPoweredResponse, error)
	// IsMoving reports if a component is in motion
	IsMoving(context.Context, *IsMovingRequest) (*IsMovingResponse, error)
	// DoCommand sends/receives arbitrary commands
	DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error)
	// GetGeometries returns the geometries of the component in their current configuration
	GetGeometries(context.Context, *v1.GetGeometriesRequest) (*v1.GetGeometriesResponse, error)
	// contains filtered or unexported methods
}

MotorServiceServer is the server API for MotorService service. All implementations must embed UnimplementedMotorServiceServer for forward compatibility

type ResetZeroPositionRequest

type ResetZeroPositionRequest struct {

	// Name of a motor
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Motor position
	Offset float64 `protobuf:"fixed64,2,opt,name=offset,proto3" json:"offset,omitempty"`
	// Additional arguments to the method
	Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"`
	// contains filtered or unexported fields
}

func (*ResetZeroPositionRequest) Descriptor deprecated

func (*ResetZeroPositionRequest) Descriptor() ([]byte, []int)

Deprecated: Use ResetZeroPositionRequest.ProtoReflect.Descriptor instead.

func (*ResetZeroPositionRequest) GetExtra

func (x *ResetZeroPositionRequest) GetExtra() *structpb.Struct

func (*ResetZeroPositionRequest) GetName

func (x *ResetZeroPositionRequest) GetName() string

func (*ResetZeroPositionRequest) GetOffset

func (x *ResetZeroPositionRequest) GetOffset() float64

func (*ResetZeroPositionRequest) ProtoMessage

func (*ResetZeroPositionRequest) ProtoMessage()

func (*ResetZeroPositionRequest) ProtoReflect

func (x *ResetZeroPositionRequest) ProtoReflect() protoreflect.Message

func (*ResetZeroPositionRequest) Reset

func (x *ResetZeroPositionRequest) Reset()

func (*ResetZeroPositionRequest) String

func (x *ResetZeroPositionRequest) String() string

type ResetZeroPositionResponse

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

func (*ResetZeroPositionResponse) Descriptor deprecated

func (*ResetZeroPositionResponse) Descriptor() ([]byte, []int)

Deprecated: Use ResetZeroPositionResponse.ProtoReflect.Descriptor instead.

func (*ResetZeroPositionResponse) ProtoMessage

func (*ResetZeroPositionResponse) ProtoMessage()

func (*ResetZeroPositionResponse) ProtoReflect

func (*ResetZeroPositionResponse) Reset

func (x *ResetZeroPositionResponse) Reset()

func (*ResetZeroPositionResponse) String

func (x *ResetZeroPositionResponse) String() string

type SetPowerRequest

type SetPowerRequest struct {

	// Name of a motor
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Percentage of motor's power, between -1 and 1
	PowerPct float64 `protobuf:"fixed64,2,opt,name=power_pct,json=powerPct,proto3" json:"power_pct,omitempty"`
	// Additional arguments to the method
	Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"`
	// contains filtered or unexported fields
}

func (*SetPowerRequest) Descriptor deprecated

func (*SetPowerRequest) Descriptor() ([]byte, []int)

Deprecated: Use SetPowerRequest.ProtoReflect.Descriptor instead.

func (*SetPowerRequest) GetExtra

func (x *SetPowerRequest) GetExtra() *structpb.Struct

func (*SetPowerRequest) GetName

func (x *SetPowerRequest) GetName() string

func (*SetPowerRequest) GetPowerPct

func (x *SetPowerRequest) GetPowerPct() float64

func (*SetPowerRequest) ProtoMessage

func (*SetPowerRequest) ProtoMessage()

func (*SetPowerRequest) ProtoReflect

func (x *SetPowerRequest) ProtoReflect() protoreflect.Message

func (*SetPowerRequest) Reset

func (x *SetPowerRequest) Reset()

func (*SetPowerRequest) String

func (x *SetPowerRequest) String() string

type SetPowerResponse

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

func (*SetPowerResponse) Descriptor deprecated

func (*SetPowerResponse) Descriptor() ([]byte, []int)

Deprecated: Use SetPowerResponse.ProtoReflect.Descriptor instead.

func (*SetPowerResponse) ProtoMessage

func (*SetPowerResponse) ProtoMessage()

func (*SetPowerResponse) ProtoReflect

func (x *SetPowerResponse) ProtoReflect() protoreflect.Message

func (*SetPowerResponse) Reset

func (x *SetPowerResponse) Reset()

func (*SetPowerResponse) String

func (x *SetPowerResponse) String() string

type Status

type Status struct {

	// Returns true if the motor is powered
	IsPowered bool `protobuf:"varint,1,opt,name=is_powered,json=isPowered,proto3" json:"is_powered,omitempty"`
	// Returns current position of the motor relative to its home
	Position float64 `protobuf:"fixed64,3,opt,name=position,proto3" json:"position,omitempty"`
	// Returns true if the motor is moving
	IsMoving bool `protobuf:"varint,4,opt,name=is_moving,json=isMoving,proto3" json:"is_moving,omitempty"`
	// contains filtered or unexported fields
}

func (*Status) Descriptor deprecated

func (*Status) Descriptor() ([]byte, []int)

Deprecated: Use Status.ProtoReflect.Descriptor instead.

func (*Status) GetIsMoving

func (x *Status) GetIsMoving() bool

func (*Status) GetIsPowered

func (x *Status) GetIsPowered() bool

func (*Status) GetPosition

func (x *Status) GetPosition() float64

func (*Status) ProtoMessage

func (*Status) ProtoMessage()

func (*Status) ProtoReflect

func (x *Status) ProtoReflect() protoreflect.Message

func (*Status) Reset

func (x *Status) Reset()

func (*Status) String

func (x *Status) String() string

type StopRequest

type StopRequest struct {

	// Name of a motor
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Additional arguments to the method
	Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"`
	// contains filtered or unexported fields
}

func (*StopRequest) Descriptor deprecated

func (*StopRequest) Descriptor() ([]byte, []int)

Deprecated: Use StopRequest.ProtoReflect.Descriptor instead.

func (*StopRequest) GetExtra

func (x *StopRequest) GetExtra() *structpb.Struct

func (*StopRequest) GetName

func (x *StopRequest) GetName() string

func (*StopRequest) ProtoMessage

func (*StopRequest) ProtoMessage()

func (*StopRequest) ProtoReflect

func (x *StopRequest) ProtoReflect() protoreflect.Message

func (*StopRequest) Reset

func (x *StopRequest) Reset()

func (*StopRequest) String

func (x *StopRequest) String() string

type StopResponse

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

func (*StopResponse) Descriptor deprecated

func (*StopResponse) Descriptor() ([]byte, []int)

Deprecated: Use StopResponse.ProtoReflect.Descriptor instead.

func (*StopResponse) ProtoMessage

func (*StopResponse) ProtoMessage()

func (*StopResponse) ProtoReflect

func (x *StopResponse) ProtoReflect() protoreflect.Message

func (*StopResponse) Reset

func (x *StopResponse) Reset()

func (*StopResponse) String

func (x *StopResponse) String() string

type UnimplementedMotorServiceServer

type UnimplementedMotorServiceServer struct {
}

UnimplementedMotorServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedMotorServiceServer) DoCommand added in v0.1.79

func (UnimplementedMotorServiceServer) GetGeometries added in v0.1.129

func (UnimplementedMotorServiceServer) GetPosition

func (UnimplementedMotorServiceServer) GetProperties

func (UnimplementedMotorServiceServer) GoFor

func (UnimplementedMotorServiceServer) GoTo

func (UnimplementedMotorServiceServer) IsMoving added in v0.1.24

func (UnimplementedMotorServiceServer) IsPowered

func (UnimplementedMotorServiceServer) ResetZeroPosition

func (UnimplementedMotorServiceServer) SetPower

func (UnimplementedMotorServiceServer) Stop

type UnsafeMotorServiceServer

type UnsafeMotorServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeMotorServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MotorServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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