Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterGeofenceServiceServer(s grpc.ServiceRegistrar, srv GeofenceServiceServer)
- type Circle
- func (*Circle) Descriptor() ([]byte, []int)deprecated
- func (x *Circle) GetFenceType() FenceType
- func (x *Circle) GetPoint() *Point
- func (x *Circle) GetRadius() float32
- func (*Circle) ProtoMessage()
- func (x *Circle) ProtoReflect() protoreflect.Message
- func (x *Circle) Reset()
- func (x *Circle) String() string
- type ClearGeofenceRequest
- type ClearGeofenceResponse
- func (*ClearGeofenceResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ClearGeofenceResponse) GetGeofenceResult() *GeofenceResult
- func (*ClearGeofenceResponse) ProtoMessage()
- func (x *ClearGeofenceResponse) ProtoReflect() protoreflect.Message
- func (x *ClearGeofenceResponse) Reset()
- func (x *ClearGeofenceResponse) String() string
- type FenceType
- type GeofenceData
- func (*GeofenceData) Descriptor() ([]byte, []int)deprecated
- func (x *GeofenceData) GetCircles() []*Circle
- func (x *GeofenceData) GetPolygons() []*Polygon
- func (*GeofenceData) ProtoMessage()
- func (x *GeofenceData) ProtoReflect() protoreflect.Message
- func (x *GeofenceData) Reset()
- func (x *GeofenceData) String() string
- type GeofenceResult
- func (*GeofenceResult) Descriptor() ([]byte, []int)deprecated
- func (x *GeofenceResult) GetResult() GeofenceResult_Result
- func (x *GeofenceResult) GetResultStr() string
- func (*GeofenceResult) ProtoMessage()
- func (x *GeofenceResult) ProtoReflect() protoreflect.Message
- func (x *GeofenceResult) Reset()
- func (x *GeofenceResult) String() string
- type GeofenceResult_Result
- func (GeofenceResult_Result) Descriptor() protoreflect.EnumDescriptor
- func (x GeofenceResult_Result) Enum() *GeofenceResult_Result
- func (GeofenceResult_Result) EnumDescriptor() ([]byte, []int)deprecated
- func (x GeofenceResult_Result) Number() protoreflect.EnumNumber
- func (x GeofenceResult_Result) String() string
- func (GeofenceResult_Result) Type() protoreflect.EnumType
- type GeofenceServiceClient
- type GeofenceServiceServer
- type Point
- type Polygon
- type ServiceImpl
- type UnimplementedGeofenceServiceServer
- type UnsafeGeofenceServiceServer
- type UploadGeofenceRequest
- func (*UploadGeofenceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UploadGeofenceRequest) GetGeofenceData() *GeofenceData
- func (*UploadGeofenceRequest) ProtoMessage()
- func (x *UploadGeofenceRequest) ProtoReflect() protoreflect.Message
- func (x *UploadGeofenceRequest) Reset()
- func (x *UploadGeofenceRequest) String() string
- type UploadGeofenceResponse
- func (*UploadGeofenceResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UploadGeofenceResponse) GetGeofenceResult() *GeofenceResult
- func (*UploadGeofenceResponse) ProtoMessage()
- func (x *UploadGeofenceResponse) ProtoReflect() protoreflect.Message
- func (x *UploadGeofenceResponse) Reset()
- func (x *UploadGeofenceResponse) String() string
Constants ¶
const ( GeofenceService_UploadGeofence_FullMethodName = "/mavsdk.rpc.geofence.GeofenceService/UploadGeofence" GeofenceService_ClearGeofence_FullMethodName = "/mavsdk.rpc.geofence.GeofenceService/ClearGeofence" )
Variables ¶
var ( FenceType_name = map[int32]string{ 0: "FENCE_TYPE_INCLUSION", 1: "FENCE_TYPE_EXCLUSION", } FenceType_value = map[string]int32{ "FENCE_TYPE_INCLUSION": 0, "FENCE_TYPE_EXCLUSION": 1, } )
Enum value maps for FenceType.
var ( GeofenceResult_Result_name = map[int32]string{ 0: "RESULT_UNKNOWN", 1: "RESULT_SUCCESS", 2: "RESULT_ERROR", 3: "RESULT_TOO_MANY_GEOFENCE_ITEMS", 4: "RESULT_BUSY", 5: "RESULT_TIMEOUT", 6: "RESULT_INVALID_ARGUMENT", 7: "RESULT_NO_SYSTEM", } GeofenceResult_Result_value = map[string]int32{ "RESULT_UNKNOWN": 0, "RESULT_SUCCESS": 1, "RESULT_ERROR": 2, "RESULT_TOO_MANY_GEOFENCE_ITEMS": 3, "RESULT_BUSY": 4, "RESULT_TIMEOUT": 5, "RESULT_INVALID_ARGUMENT": 6, "RESULT_NO_SYSTEM": 7, } )
Enum value maps for GeofenceResult_Result.
var File_geofence_proto protoreflect.FileDescriptor
var GeofenceService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "mavsdk.rpc.geofence.GeofenceService", HandlerType: (*GeofenceServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "UploadGeofence", Handler: _GeofenceService_UploadGeofence_Handler, }, { MethodName: "ClearGeofence", Handler: _GeofenceService_ClearGeofence_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "geofence.proto", }
GeofenceService_ServiceDesc is the grpc.ServiceDesc for GeofenceService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGeofenceServiceServer ¶
func RegisterGeofenceServiceServer(s grpc.ServiceRegistrar, srv GeofenceServiceServer)
Types ¶
type Circle ¶ added in v0.0.6
type Circle struct { Point *Point `protobuf:"bytes,1,opt,name=point,proto3" json:"point,omitempty"` // Point defining the center Radius float32 `protobuf:"fixed32,2,opt,name=radius,proto3" json:"radius,omitempty"` // Radius of the circular fence FenceType FenceType `protobuf:"varint,3,opt,name=fence_type,json=fenceType,proto3,enum=mavsdk.rpc.geofence.FenceType" json:"fence_type,omitempty"` // Fence type // contains filtered or unexported fields }
Circular type.
func (*Circle) Descriptor
deprecated
added in
v0.0.6
func (*Circle) GetFenceType ¶ added in v0.0.6
func (*Circle) ProtoMessage ¶ added in v0.0.6
func (*Circle) ProtoMessage()
func (*Circle) ProtoReflect ¶ added in v0.0.6
func (x *Circle) ProtoReflect() protoreflect.Message
type ClearGeofenceRequest ¶ added in v0.0.3
type ClearGeofenceRequest struct {
// contains filtered or unexported fields
}
func (*ClearGeofenceRequest) Descriptor
deprecated
added in
v0.0.3
func (*ClearGeofenceRequest) Descriptor() ([]byte, []int)
Deprecated: Use ClearGeofenceRequest.ProtoReflect.Descriptor instead.
func (*ClearGeofenceRequest) ProtoMessage ¶ added in v0.0.3
func (*ClearGeofenceRequest) ProtoMessage()
func (*ClearGeofenceRequest) ProtoReflect ¶ added in v0.0.3
func (x *ClearGeofenceRequest) ProtoReflect() protoreflect.Message
func (*ClearGeofenceRequest) Reset ¶ added in v0.0.3
func (x *ClearGeofenceRequest) Reset()
func (*ClearGeofenceRequest) String ¶ added in v0.0.3
func (x *ClearGeofenceRequest) String() string
type ClearGeofenceResponse ¶ added in v0.0.3
type ClearGeofenceResponse struct { GeofenceResult *GeofenceResult `protobuf:"bytes,1,opt,name=geofence_result,json=geofenceResult,proto3" json:"geofence_result,omitempty"` // contains filtered or unexported fields }
func (*ClearGeofenceResponse) Descriptor
deprecated
added in
v0.0.3
func (*ClearGeofenceResponse) Descriptor() ([]byte, []int)
Deprecated: Use ClearGeofenceResponse.ProtoReflect.Descriptor instead.
func (*ClearGeofenceResponse) GetGeofenceResult ¶ added in v0.0.3
func (x *ClearGeofenceResponse) GetGeofenceResult() *GeofenceResult
func (*ClearGeofenceResponse) ProtoMessage ¶ added in v0.0.3
func (*ClearGeofenceResponse) ProtoMessage()
func (*ClearGeofenceResponse) ProtoReflect ¶ added in v0.0.3
func (x *ClearGeofenceResponse) ProtoReflect() protoreflect.Message
func (*ClearGeofenceResponse) Reset ¶ added in v0.0.3
func (x *ClearGeofenceResponse) Reset()
func (*ClearGeofenceResponse) String ¶ added in v0.0.3
func (x *ClearGeofenceResponse) String() string
type FenceType ¶ added in v0.0.6
type FenceType int32
Geofence types.
func (FenceType) Descriptor ¶ added in v0.0.6
func (FenceType) Descriptor() protoreflect.EnumDescriptor
func (FenceType) EnumDescriptor
deprecated
added in
v0.0.6
func (FenceType) Number ¶ added in v0.0.6
func (x FenceType) Number() protoreflect.EnumNumber
func (FenceType) Type ¶ added in v0.0.6
func (FenceType) Type() protoreflect.EnumType
type GeofenceData ¶ added in v0.0.6
type GeofenceData struct { Polygons []*Polygon `protobuf:"bytes,1,rep,name=polygons,proto3" json:"polygons,omitempty"` // Polygon(s) representing the geofence(s) Circles []*Circle `protobuf:"bytes,2,rep,name=circles,proto3" json:"circles,omitempty"` // Circle(s) representing the geofence(s) // contains filtered or unexported fields }
Geofence data type.
func (*GeofenceData) Descriptor
deprecated
added in
v0.0.6
func (*GeofenceData) Descriptor() ([]byte, []int)
Deprecated: Use GeofenceData.ProtoReflect.Descriptor instead.
func (*GeofenceData) GetCircles ¶ added in v0.0.6
func (x *GeofenceData) GetCircles() []*Circle
func (*GeofenceData) GetPolygons ¶ added in v0.0.6
func (x *GeofenceData) GetPolygons() []*Polygon
func (*GeofenceData) ProtoMessage ¶ added in v0.0.6
func (*GeofenceData) ProtoMessage()
func (*GeofenceData) ProtoReflect ¶ added in v0.0.6
func (x *GeofenceData) ProtoReflect() protoreflect.Message
func (*GeofenceData) Reset ¶ added in v0.0.6
func (x *GeofenceData) Reset()
func (*GeofenceData) String ¶ added in v0.0.6
func (x *GeofenceData) String() string
type GeofenceResult ¶
type GeofenceResult struct { Result GeofenceResult_Result `protobuf:"varint,1,opt,name=result,proto3,enum=mavsdk.rpc.geofence.GeofenceResult_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 (*GeofenceResult) Descriptor
deprecated
func (*GeofenceResult) Descriptor() ([]byte, []int)
Deprecated: Use GeofenceResult.ProtoReflect.Descriptor instead.
func (*GeofenceResult) GetResult ¶
func (x *GeofenceResult) GetResult() GeofenceResult_Result
func (*GeofenceResult) GetResultStr ¶
func (x *GeofenceResult) GetResultStr() string
func (*GeofenceResult) ProtoMessage ¶
func (*GeofenceResult) ProtoMessage()
func (*GeofenceResult) ProtoReflect ¶
func (x *GeofenceResult) ProtoReflect() protoreflect.Message
func (*GeofenceResult) Reset ¶
func (x *GeofenceResult) Reset()
func (*GeofenceResult) String ¶
func (x *GeofenceResult) String() string
type GeofenceResult_Result ¶
type GeofenceResult_Result int32
Possible results returned for geofence requests.
const ( GeofenceResult_RESULT_UNKNOWN GeofenceResult_Result = 0 // Unknown result GeofenceResult_RESULT_SUCCESS GeofenceResult_Result = 1 // Request succeeded GeofenceResult_RESULT_ERROR GeofenceResult_Result = 2 // Error GeofenceResult_RESULT_TOO_MANY_GEOFENCE_ITEMS GeofenceResult_Result = 3 // Too many objects in the geofence GeofenceResult_RESULT_BUSY GeofenceResult_Result = 4 // Vehicle is busy GeofenceResult_RESULT_TIMEOUT GeofenceResult_Result = 5 // Request timed out GeofenceResult_RESULT_INVALID_ARGUMENT GeofenceResult_Result = 6 // Invalid argument GeofenceResult_RESULT_NO_SYSTEM GeofenceResult_Result = 7 // No system connected )
func (GeofenceResult_Result) Descriptor ¶
func (GeofenceResult_Result) Descriptor() protoreflect.EnumDescriptor
func (GeofenceResult_Result) Enum ¶
func (x GeofenceResult_Result) Enum() *GeofenceResult_Result
func (GeofenceResult_Result) EnumDescriptor
deprecated
func (GeofenceResult_Result) EnumDescriptor() ([]byte, []int)
Deprecated: Use GeofenceResult_Result.Descriptor instead.
func (GeofenceResult_Result) Number ¶
func (x GeofenceResult_Result) Number() protoreflect.EnumNumber
func (GeofenceResult_Result) String ¶
func (x GeofenceResult_Result) String() string
func (GeofenceResult_Result) Type ¶
func (GeofenceResult_Result) Type() protoreflect.EnumType
type GeofenceServiceClient ¶
type GeofenceServiceClient interface { // Upload geofences. // // Polygon and Circular geofences are uploaded to a drone. Once uploaded, the geofence will remain // on the drone even if a connection is lost. UploadGeofence(ctx context.Context, in *UploadGeofenceRequest, opts ...grpc.CallOption) (*UploadGeofenceResponse, error) // Clear all geofences saved on the vehicle. ClearGeofence(ctx context.Context, in *ClearGeofenceRequest, opts ...grpc.CallOption) (*ClearGeofenceResponse, error) }
GeofenceServiceClient is the client API for GeofenceService 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.
Enable setting a geofence.
func NewGeofenceServiceClient ¶
func NewGeofenceServiceClient(cc grpc.ClientConnInterface) GeofenceServiceClient
type GeofenceServiceServer ¶
type GeofenceServiceServer interface { // Upload geofences. // // Polygon and Circular geofences are uploaded to a drone. Once uploaded, the geofence will remain // on the drone even if a connection is lost. UploadGeofence(context.Context, *UploadGeofenceRequest) (*UploadGeofenceResponse, error) // Clear all geofences saved on the vehicle. ClearGeofence(context.Context, *ClearGeofenceRequest) (*ClearGeofenceResponse, error) // contains filtered or unexported methods }
GeofenceServiceServer is the server API for GeofenceService service. All implementations must embed UnimplementedGeofenceServiceServer for forward compatibility.
Enable setting a geofence.
type Point ¶
type Point struct { LatitudeDeg float64 `protobuf:"fixed64,1,opt,name=latitude_deg,json=latitudeDeg,proto3" json:"latitude_deg,omitempty"` // Latitude in degrees (range: -90 to +90) LongitudeDeg float64 `protobuf:"fixed64,2,opt,name=longitude_deg,json=longitudeDeg,proto3" json:"longitude_deg,omitempty"` // Longitude in degrees (range: -180 to +180) // contains filtered or unexported fields }
Point type.
func (*Point) Descriptor
deprecated
func (*Point) GetLatitudeDeg ¶
func (*Point) GetLongitudeDeg ¶
func (*Point) ProtoMessage ¶
func (*Point) ProtoMessage()
func (*Point) ProtoReflect ¶
func (x *Point) ProtoReflect() protoreflect.Message
type Polygon ¶
type Polygon struct { Points []*Point `protobuf:"bytes,1,rep,name=points,proto3" json:"points,omitempty"` // Points defining the polygon FenceType FenceType `protobuf:"varint,2,opt,name=fence_type,json=fenceType,proto3,enum=mavsdk.rpc.geofence.FenceType" json:"fence_type,omitempty"` // Fence type // contains filtered or unexported fields }
Polygon type.
func (*Polygon) Descriptor
deprecated
func (*Polygon) GetFenceType ¶
func (*Polygon) ProtoMessage ¶
func (*Polygon) ProtoMessage()
func (*Polygon) ProtoReflect ¶
func (x *Polygon) ProtoReflect() protoreflect.Message
type ServiceImpl ¶
type ServiceImpl struct {
Client GeofenceServiceClient
}
func (*ServiceImpl) ClearGeofence ¶ added in v0.0.3
func (s *ServiceImpl) ClearGeofence(ctx context.Context) (*ClearGeofenceResponse, error)
func (*ServiceImpl) UploadGeofence ¶
func (s *ServiceImpl) UploadGeofence(ctx context.Context, geofenceData *GeofenceData) (*UploadGeofenceResponse, error)
type UnimplementedGeofenceServiceServer ¶
type UnimplementedGeofenceServiceServer struct{}
UnimplementedGeofenceServiceServer 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 (UnimplementedGeofenceServiceServer) ClearGeofence ¶ added in v0.0.3
func (UnimplementedGeofenceServiceServer) ClearGeofence(context.Context, *ClearGeofenceRequest) (*ClearGeofenceResponse, error)
func (UnimplementedGeofenceServiceServer) UploadGeofence ¶
func (UnimplementedGeofenceServiceServer) UploadGeofence(context.Context, *UploadGeofenceRequest) (*UploadGeofenceResponse, error)
type UnsafeGeofenceServiceServer ¶ added in v0.0.3
type UnsafeGeofenceServiceServer interface {
// contains filtered or unexported methods
}
UnsafeGeofenceServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GeofenceServiceServer will result in compilation errors.
type UploadGeofenceRequest ¶
type UploadGeofenceRequest struct { GeofenceData *GeofenceData `protobuf:"bytes,1,opt,name=geofence_data,json=geofenceData,proto3" json:"geofence_data,omitempty"` // Circle(s) and/or Polygon(s) representing the geofence(s) // contains filtered or unexported fields }
func (*UploadGeofenceRequest) Descriptor
deprecated
func (*UploadGeofenceRequest) Descriptor() ([]byte, []int)
Deprecated: Use UploadGeofenceRequest.ProtoReflect.Descriptor instead.
func (*UploadGeofenceRequest) GetGeofenceData ¶ added in v0.0.6
func (x *UploadGeofenceRequest) GetGeofenceData() *GeofenceData
func (*UploadGeofenceRequest) ProtoMessage ¶
func (*UploadGeofenceRequest) ProtoMessage()
func (*UploadGeofenceRequest) ProtoReflect ¶
func (x *UploadGeofenceRequest) ProtoReflect() protoreflect.Message
func (*UploadGeofenceRequest) Reset ¶
func (x *UploadGeofenceRequest) Reset()
func (*UploadGeofenceRequest) String ¶
func (x *UploadGeofenceRequest) String() string
type UploadGeofenceResponse ¶
type UploadGeofenceResponse struct { GeofenceResult *GeofenceResult `protobuf:"bytes,1,opt,name=geofence_result,json=geofenceResult,proto3" json:"geofence_result,omitempty"` // contains filtered or unexported fields }
func (*UploadGeofenceResponse) Descriptor
deprecated
func (*UploadGeofenceResponse) Descriptor() ([]byte, []int)
Deprecated: Use UploadGeofenceResponse.ProtoReflect.Descriptor instead.
func (*UploadGeofenceResponse) GetGeofenceResult ¶
func (x *UploadGeofenceResponse) GetGeofenceResult() *GeofenceResult
func (*UploadGeofenceResponse) ProtoMessage ¶
func (*UploadGeofenceResponse) ProtoMessage()
func (*UploadGeofenceResponse) ProtoReflect ¶
func (x *UploadGeofenceResponse) ProtoReflect() protoreflect.Message
func (*UploadGeofenceResponse) Reset ¶
func (x *UploadGeofenceResponse) Reset()
func (*UploadGeofenceResponse) String ¶
func (x *UploadGeofenceResponse) String() string