motorv1grpc

package
v1.5.1-20250820154630-... Latest Latest
Warning

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

Go to latest
Published: unknown License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MotorService_SetPower_FullMethodName          = "/viam.component.motor.v1.MotorService/SetPower"
	MotorService_GoFor_FullMethodName             = "/viam.component.motor.v1.MotorService/GoFor"
	MotorService_GoTo_FullMethodName              = "/viam.component.motor.v1.MotorService/GoTo"
	MotorService_SetRPM_FullMethodName            = "/viam.component.motor.v1.MotorService/SetRPM"
	MotorService_ResetZeroPosition_FullMethodName = "/viam.component.motor.v1.MotorService/ResetZeroPosition"
	MotorService_GetPosition_FullMethodName       = "/viam.component.motor.v1.MotorService/GetPosition"
	MotorService_GetProperties_FullMethodName     = "/viam.component.motor.v1.MotorService/GetProperties"
	MotorService_Stop_FullMethodName              = "/viam.component.motor.v1.MotorService/Stop"
	MotorService_IsPowered_FullMethodName         = "/viam.component.motor.v1.MotorService/IsPowered"
	MotorService_IsMoving_FullMethodName          = "/viam.component.motor.v1.MotorService/IsMoving"
	MotorService_DoCommand_FullMethodName         = "/viam.component.motor.v1.MotorService/DoCommand"
	MotorService_GetGeometries_FullMethodName     = "/viam.component.motor.v1.MotorService/GetGeometries"
)

Variables

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: "SetRPM",
			Handler:    _MotorService_SetRPM_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 RegisterMotorServiceServer

func RegisterMotorServiceServer(s grpc.ServiceRegistrar, srv MotorServiceServer)

Types

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 *v1.SetPowerRequest, opts ...grpc.CallOption) (*v1.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 != 0, this will block until the number of revolutions has been completed or another operation comes in.
	// Deprecated: If revolutions is 0, this will run the motor at rpm indefinitely.
	GoFor(ctx context.Context, in *v1.GoForRequest, opts ...grpc.CallOption) (*v1.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 *v1.GoToRequest, opts ...grpc.CallOption) (*v1.GoToResponse, error)
	// SetRPM instructs the motor to move at the specified RPM indefinitely.
	SetRPM(ctx context.Context, in *v1.SetRPMRequest, opts ...grpc.CallOption) (*v1.SetRPMResponse, 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 *v1.ResetZeroPositionRequest, opts ...grpc.CallOption) (*v1.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 *v1.GetPositionRequest, opts ...grpc.CallOption) (*v1.GetPositionResponse, error)
	// GetProperties returns a message of booleans indicating which optional features the robot's motor supports
	GetProperties(ctx context.Context, in *v1.GetPropertiesRequest, opts ...grpc.CallOption) (*v1.GetPropertiesResponse, error)
	// Stop turns the robot's motor off
	Stop(ctx context.Context, in *v1.StopRequest, opts ...grpc.CallOption) (*v1.StopResponse, error)
	// IsPowered returns true if the robot's motor is on
	IsPowered(ctx context.Context, in *v1.IsPoweredRequest, opts ...grpc.CallOption) (*v1.IsPoweredResponse, error)
	// IsMoving reports if a component is in motion
	IsMoving(ctx context.Context, in *v1.IsMovingRequest, opts ...grpc.CallOption) (*v1.IsMovingResponse, error)
	// DoCommand sends/receives arbitrary commands
	DoCommand(ctx context.Context, in *v11.DoCommandRequest, opts ...grpc.CallOption) (*v11.DoCommandResponse, error)
	// GetGeometries returns the geometries of the component in their current configuration
	GetGeometries(ctx context.Context, in *v11.GetGeometriesRequest, opts ...grpc.CallOption) (*v11.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.

A MotorService maintains all motors associated with a robot

func NewMotorServiceClient

func NewMotorServiceClient(cc grpc.ClientConnInterface) MotorServiceClient

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, *v1.SetPowerRequest) (*v1.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 != 0, this will block until the number of revolutions has been completed or another operation comes in.
	// Deprecated: If revolutions is 0, this will run the motor at rpm indefinitely.
	GoFor(context.Context, *v1.GoForRequest) (*v1.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, *v1.GoToRequest) (*v1.GoToResponse, error)
	// SetRPM instructs the motor to move at the specified RPM indefinitely.
	SetRPM(context.Context, *v1.SetRPMRequest) (*v1.SetRPMResponse, 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, *v1.ResetZeroPositionRequest) (*v1.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, *v1.GetPositionRequest) (*v1.GetPositionResponse, error)
	// GetProperties returns a message of booleans indicating which optional features the robot's motor supports
	GetProperties(context.Context, *v1.GetPropertiesRequest) (*v1.GetPropertiesResponse, error)
	// Stop turns the robot's motor off
	Stop(context.Context, *v1.StopRequest) (*v1.StopResponse, error)
	// IsPowered returns true if the robot's motor is on
	IsPowered(context.Context, *v1.IsPoweredRequest) (*v1.IsPoweredResponse, error)
	// IsMoving reports if a component is in motion
	IsMoving(context.Context, *v1.IsMovingRequest) (*v1.IsMovingResponse, error)
	// DoCommand sends/receives arbitrary commands
	DoCommand(context.Context, *v11.DoCommandRequest) (*v11.DoCommandResponse, error)
	// GetGeometries returns the geometries of the component in their current configuration
	GetGeometries(context.Context, *v11.GetGeometriesRequest) (*v11.GetGeometriesResponse, error)
}

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

A MotorService maintains all motors associated with a robot

type UnimplementedMotorServiceServer

type UnimplementedMotorServiceServer struct{}

UnimplementedMotorServiceServer should be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedMotorServiceServer) DoCommand

func (UnimplementedMotorServiceServer) GetGeometries

func (UnimplementedMotorServiceServer) GetPosition

func (UnimplementedMotorServiceServer) GetProperties

func (UnimplementedMotorServiceServer) GoFor

func (UnimplementedMotorServiceServer) GoTo

func (UnimplementedMotorServiceServer) IsMoving

func (UnimplementedMotorServiceServer) IsPowered

func (UnimplementedMotorServiceServer) ResetZeroPosition

func (UnimplementedMotorServiceServer) SetPower

func (UnimplementedMotorServiceServer) SetRPM

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.

Source Files

  • motor_grpc.pb.go

Jump to

Keyboard shortcuts

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