geofence

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: 1

Documentation

Index

Constants

View Source
const (
	GeofenceService_UploadGeofence_FullMethodName = "/mavsdk.rpc.geofence.GeofenceService/UploadGeofence"
	GeofenceService_ClearGeofence_FullMethodName  = "/mavsdk.rpc.geofence.GeofenceService/ClearGeofence"
)

Variables

View Source
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.

View Source
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.

View Source
var File_geofence_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Circle.ProtoReflect.Descriptor instead.

func (*Circle) GetFenceType added in v0.0.6

func (x *Circle) GetFenceType() FenceType

func (*Circle) GetPoint added in v0.0.6

func (x *Circle) GetPoint() *Point

func (*Circle) GetRadius added in v0.0.6

func (x *Circle) GetRadius() float32

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

func (*Circle) Reset added in v0.0.6

func (x *Circle) Reset()

func (*Circle) String added in v0.0.6

func (x *Circle) String() string

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.

const (
	FenceType_FENCE_TYPE_INCLUSION FenceType = 0 // Type representing an inclusion fence
	FenceType_FENCE_TYPE_EXCLUSION FenceType = 1 // Type representing an exclusion fence
)

func (FenceType) Descriptor added in v0.0.6

func (FenceType) Descriptor() protoreflect.EnumDescriptor

func (FenceType) Enum added in v0.0.6

func (x FenceType) Enum() *FenceType

func (FenceType) EnumDescriptor deprecated added in v0.0.6

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

Deprecated: Use FenceType.Descriptor instead.

func (FenceType) Number added in v0.0.6

func (x FenceType) Number() protoreflect.EnumNumber

func (FenceType) String added in v0.0.6

func (x FenceType) String() string

func (FenceType) Type added in v0.0.6

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) Enum

func (GeofenceResult_Result) EnumDescriptor deprecated

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

Deprecated: Use GeofenceResult_Result.Descriptor instead.

func (GeofenceResult_Result) Number

func (GeofenceResult_Result) String

func (x GeofenceResult_Result) String() string

func (GeofenceResult_Result) Type

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.

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) Descriptor() ([]byte, []int)

Deprecated: Use Point.ProtoReflect.Descriptor instead.

func (*Point) GetLatitudeDeg

func (x *Point) GetLatitudeDeg() float64

func (*Point) GetLongitudeDeg

func (x *Point) GetLongitudeDeg() float64

func (*Point) ProtoMessage

func (*Point) ProtoMessage()

func (*Point) ProtoReflect

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

func (*Point) Reset

func (x *Point) Reset()

func (*Point) String

func (x *Point) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Polygon.ProtoReflect.Descriptor instead.

func (*Polygon) GetFenceType

func (x *Polygon) GetFenceType() FenceType

func (*Polygon) GetPoints

func (x *Polygon) GetPoints() []*Point

func (*Polygon) ProtoMessage

func (*Polygon) ProtoMessage()

func (*Polygon) ProtoReflect

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

func (*Polygon) Reset

func (x *Polygon) Reset()

func (*Polygon) String

func (x *Polygon) String() string

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) UploadGeofence

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

Jump to

Keyboard shortcuts

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