Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterGripperServiceServer(s grpc.ServiceRegistrar, srv GripperServiceServer)
- type GrabRequest
- type GrabResponse
- type GripperAction
- func (GripperAction) Descriptor() protoreflect.EnumDescriptor
- func (x GripperAction) Enum() *GripperAction
- func (GripperAction) EnumDescriptor() ([]byte, []int)deprecated
- func (x GripperAction) Number() protoreflect.EnumNumber
- func (x GripperAction) String() string
- func (GripperAction) Type() protoreflect.EnumType
- type GripperResult
- func (*GripperResult) Descriptor() ([]byte, []int)deprecated
- func (x *GripperResult) GetResult() GripperResult_Result
- func (x *GripperResult) GetResultStr() string
- func (*GripperResult) ProtoMessage()
- func (x *GripperResult) ProtoReflect() protoreflect.Message
- func (x *GripperResult) Reset()
- func (x *GripperResult) String() string
- type GripperResult_Result
- func (GripperResult_Result) Descriptor() protoreflect.EnumDescriptor
- func (x GripperResult_Result) Enum() *GripperResult_Result
- func (GripperResult_Result) EnumDescriptor() ([]byte, []int)deprecated
- func (x GripperResult_Result) Number() protoreflect.EnumNumber
- func (x GripperResult_Result) String() string
- func (GripperResult_Result) Type() protoreflect.EnumType
- type GripperServiceClient
- type GripperServiceServer
- type ReleaseRequest
- type ReleaseResponse
- type ServiceImpl
- type UnimplementedGripperServiceServer
- type UnsafeGripperServiceServer
Constants ¶
const ( GripperService_Grab_FullMethodName = "/mavsdk.rpc.gripper.GripperService/Grab" GripperService_Release_FullMethodName = "/mavsdk.rpc.gripper.GripperService/Release" )
Variables ¶
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.
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.
var File_gripper_proto protoreflect.FileDescriptor
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) Descriptor() protoreflect.EnumDescriptor
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 (x GripperAction) Number() protoreflect.EnumNumber
func (GripperAction) String ¶
func (x GripperAction) String() string
func (GripperAction) Type ¶
func (GripperAction) Type() protoreflect.EnumType
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) Descriptor() protoreflect.EnumDescriptor
func (GripperResult_Result) Enum ¶
func (x GripperResult_Result) Enum() *GripperResult_Result
func (GripperResult_Result) EnumDescriptor
deprecated
func (GripperResult_Result) EnumDescriptor() ([]byte, []int)
Deprecated: Use GripperResult_Result.Descriptor instead.
func (GripperResult_Result) Number ¶
func (x GripperResult_Result) Number() protoreflect.EnumNumber
func (GripperResult_Result) String ¶
func (x GripperResult_Result) String() string
func (GripperResult_Result) Type ¶
func (GripperResult_Result) Type() protoreflect.EnumType
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.
func NewGripperServiceClient ¶
func NewGripperServiceClient(cc grpc.ClientConnInterface) GripperServiceClient
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) Grab(context.Context, *GrabRequest) (*GrabResponse, error)
func (UnimplementedGripperServiceServer) Release ¶
func (UnimplementedGripperServiceServer) Release(context.Context, *ReleaseRequest) (*ReleaseResponse, error)
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.