gripper

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GripperService_Grab_FullMethodName    = "/mavsdk.rpc.gripper.GripperService/Grab"
	GripperService_Release_FullMethodName = "/mavsdk.rpc.gripper.GripperService/Release"
)

Variables

View Source
var (
	GripperAction_name = map[int32]string{
		0: "GRIPPER_ACTION_RELEASE",
		1: "GRIPPER_ACTION_GRAB",
	}
	GripperAction_value = map[string]int32{
		"GRIPPER_ACTION_RELEASE": 0,
		"GRIPPER_ACTION_GRAB":    1,
	}
)

Enum value maps for GripperAction.

View Source
var (
	GripperResult_Result_name = map[int32]string{
		0: "RESULT_UNKNOWN",
		1: "RESULT_SUCCESS",
		2: "RESULT_NO_SYSTEM",
		3: "RESULT_BUSY",
		4: "RESULT_TIMEOUT",
		5: "RESULT_UNSUPPORTED",
		6: "RESULT_FAILED",
	}
	GripperResult_Result_value = map[string]int32{
		"RESULT_UNKNOWN":     0,
		"RESULT_SUCCESS":     1,
		"RESULT_NO_SYSTEM":   2,
		"RESULT_BUSY":        3,
		"RESULT_TIMEOUT":     4,
		"RESULT_UNSUPPORTED": 5,
		"RESULT_FAILED":      6,
	}
)

Enum value maps for GripperResult_Result.

View Source
var File_gripper_proto protoreflect.FileDescriptor
View Source
var GripperService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "mavsdk.rpc.gripper.GripperService",
	HandlerType: (*GripperServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Grab",
			Handler:    _GripperService_Grab_Handler,
		},
		{
			MethodName: "Release",
			Handler:    _GripperService_Release_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "gripper.proto",
}

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

Functions

func RegisterGripperServiceServer

func RegisterGripperServiceServer(s grpc.ServiceRegistrar, srv GripperServiceServer)

Types

type GrabRequest

type GrabRequest struct {
	Instance uint32 `protobuf:"varint,1,opt,name=instance,proto3" json:"instance,omitempty"`
	// contains filtered or unexported fields
}

func (*GrabRequest) Descriptor deprecated

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

Deprecated: Use GrabRequest.ProtoReflect.Descriptor instead.

func (*GrabRequest) GetInstance

func (x *GrabRequest) GetInstance() uint32

func (*GrabRequest) ProtoMessage

func (*GrabRequest) ProtoMessage()

func (*GrabRequest) ProtoReflect

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

func (*GrabRequest) Reset

func (x *GrabRequest) Reset()

func (*GrabRequest) String

func (x *GrabRequest) String() string

type GrabResponse

type GrabResponse struct {
	GripperResult *GripperResult `protobuf:"bytes,1,opt,name=gripper_result,json=gripperResult,proto3" json:"gripper_result,omitempty"`
	// contains filtered or unexported fields
}

func (*GrabResponse) Descriptor deprecated

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

Deprecated: Use GrabResponse.ProtoReflect.Descriptor instead.

func (*GrabResponse) GetGripperResult

func (x *GrabResponse) GetGripperResult() *GripperResult

func (*GrabResponse) ProtoMessage

func (*GrabResponse) ProtoMessage()

func (*GrabResponse) ProtoReflect

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

func (*GrabResponse) Reset

func (x *GrabResponse) Reset()

func (*GrabResponse) String

func (x *GrabResponse) String() string

type GripperAction

type GripperAction int32

Gripper Actions.

Available gripper actions are defined in mavlink under https://mavlink.io/en/messages/common.html#GRIPPER_ACTIONS

const (
	GripperAction_GRIPPER_ACTION_RELEASE GripperAction = 0 // Open the gripper to release the cargo
	GripperAction_GRIPPER_ACTION_GRAB    GripperAction = 1 // Close the gripper and grab onto cargo
)

func (GripperAction) Descriptor

func (GripperAction) Enum

func (x GripperAction) Enum() *GripperAction

func (GripperAction) EnumDescriptor deprecated

func (GripperAction) EnumDescriptor() ([]byte, []int)

Deprecated: Use GripperAction.Descriptor instead.

func (GripperAction) Number

func (GripperAction) String

func (x GripperAction) String() string

func (GripperAction) Type

type GripperResult

type GripperResult struct {
	Result    GripperResult_Result `protobuf:"varint,1,opt,name=result,proto3,enum=mavsdk.rpc.gripper.GripperResult_Result" json:"result,omitempty"` // Result enum value
	ResultStr string               `protobuf:"bytes,2,opt,name=result_str,json=resultStr,proto3" json:"result_str,omitempty"`                        // Human-readable English string describing the result
	// contains filtered or unexported fields
}

Result type.

func (*GripperResult) Descriptor deprecated

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

Deprecated: Use GripperResult.ProtoReflect.Descriptor instead.

func (*GripperResult) GetResult

func (x *GripperResult) GetResult() GripperResult_Result

func (*GripperResult) GetResultStr

func (x *GripperResult) GetResultStr() string

func (*GripperResult) ProtoMessage

func (*GripperResult) ProtoMessage()

func (*GripperResult) ProtoReflect

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

func (*GripperResult) Reset

func (x *GripperResult) Reset()

func (*GripperResult) String

func (x *GripperResult) String() string

type GripperResult_Result

type GripperResult_Result int32

Possible results returned for gripper action requests.

const (
	GripperResult_RESULT_UNKNOWN     GripperResult_Result = 0 // Unknown result
	GripperResult_RESULT_SUCCESS     GripperResult_Result = 1 // Request was successful
	GripperResult_RESULT_NO_SYSTEM   GripperResult_Result = 2 // No system is connected
	GripperResult_RESULT_BUSY        GripperResult_Result = 3 // Temporarily rejected
	GripperResult_RESULT_TIMEOUT     GripperResult_Result = 4 // Request timed out
	GripperResult_RESULT_UNSUPPORTED GripperResult_Result = 5 // Action not supported
	GripperResult_RESULT_FAILED      GripperResult_Result = 6 // Action failed
)

func (GripperResult_Result) Descriptor

func (GripperResult_Result) Enum

func (GripperResult_Result) EnumDescriptor deprecated

func (GripperResult_Result) EnumDescriptor() ([]byte, []int)

Deprecated: Use GripperResult_Result.Descriptor instead.

func (GripperResult_Result) Number

func (GripperResult_Result) String

func (x GripperResult_Result) String() string

func (GripperResult_Result) Type

type GripperServiceClient

type GripperServiceClient interface {
	// Gripper grab cargo.
	Grab(ctx context.Context, in *GrabRequest, opts ...grpc.CallOption) (*GrabResponse, error)
	// Gripper release cargo.
	Release(ctx context.Context, in *ReleaseRequest, opts ...grpc.CallOption) (*ReleaseResponse, error)
}

GripperServiceClient is the client API for GripperService 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.

Allows users to send gripper actions.

type GripperServiceServer

type GripperServiceServer interface {
	// Gripper grab cargo.
	Grab(context.Context, *GrabRequest) (*GrabResponse, error)
	// Gripper release cargo.
	Release(context.Context, *ReleaseRequest) (*ReleaseResponse, error)
	// contains filtered or unexported methods
}

GripperServiceServer is the server API for GripperService service. All implementations must embed UnimplementedGripperServiceServer for forward compatibility.

Allows users to send gripper actions.

type ReleaseRequest

type ReleaseRequest struct {
	Instance uint32 `protobuf:"varint,1,opt,name=instance,proto3" json:"instance,omitempty"`
	// contains filtered or unexported fields
}

func (*ReleaseRequest) Descriptor deprecated

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

Deprecated: Use ReleaseRequest.ProtoReflect.Descriptor instead.

func (*ReleaseRequest) GetInstance

func (x *ReleaseRequest) GetInstance() uint32

func (*ReleaseRequest) ProtoMessage

func (*ReleaseRequest) ProtoMessage()

func (*ReleaseRequest) ProtoReflect

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

func (*ReleaseRequest) Reset

func (x *ReleaseRequest) Reset()

func (*ReleaseRequest) String

func (x *ReleaseRequest) String() string

type ReleaseResponse

type ReleaseResponse struct {
	GripperResult *GripperResult `protobuf:"bytes,1,opt,name=gripper_result,json=gripperResult,proto3" json:"gripper_result,omitempty"`
	// contains filtered or unexported fields
}

func (*ReleaseResponse) Descriptor deprecated

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

Deprecated: Use ReleaseResponse.ProtoReflect.Descriptor instead.

func (*ReleaseResponse) GetGripperResult

func (x *ReleaseResponse) GetGripperResult() *GripperResult

func (*ReleaseResponse) ProtoMessage

func (*ReleaseResponse) ProtoMessage()

func (*ReleaseResponse) ProtoReflect

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

func (*ReleaseResponse) Reset

func (x *ReleaseResponse) Reset()

func (*ReleaseResponse) String

func (x *ReleaseResponse) String() string

type ServiceImpl

type ServiceImpl struct {
	Client GripperServiceClient
}

func (*ServiceImpl) Grab

func (s *ServiceImpl) Grab(ctx context.Context, instance uint32) (*GrabResponse, error)

func (*ServiceImpl) Release

func (s *ServiceImpl) Release(ctx context.Context, instance uint32) (*ReleaseResponse, error)

type UnimplementedGripperServiceServer

type UnimplementedGripperServiceServer struct{}

UnimplementedGripperServiceServer must 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 (UnimplementedGripperServiceServer) Grab

func (UnimplementedGripperServiceServer) Release

type UnsafeGripperServiceServer

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

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

Jump to

Keyboard shortcuts

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