geofence

package
v0.0.0-...-4a7e8af Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2023 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Polygon_FenceType_name = map[int32]string{
		0: "FENCE_TYPE_INCLUSION",
		1: "FENCE_TYPE_EXCLUSION",
	}
	Polygon_FenceType_value = map[string]int32{
		"FENCE_TYPE_INCLUSION": 0,
		"FENCE_TYPE_EXCLUSION": 1,
	}
)

Enum value maps for Polygon_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 ClearGeofenceRequest

type ClearGeofenceRequest struct {
	// contains filtered or unexported fields
}

func (*ClearGeofenceRequest) Descriptor deprecated

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

Deprecated: Use ClearGeofenceRequest.ProtoReflect.Descriptor instead.

func (*ClearGeofenceRequest) ProtoMessage

func (*ClearGeofenceRequest) ProtoMessage()

func (*ClearGeofenceRequest) ProtoReflect

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

func (*ClearGeofenceRequest) Reset

func (x *ClearGeofenceRequest) Reset()

func (*ClearGeofenceRequest) String

func (x *ClearGeofenceRequest) String() string

type ClearGeofenceResponse

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

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

Deprecated: Use ClearGeofenceResponse.ProtoReflect.Descriptor instead.

func (*ClearGeofenceResponse) GetGeofenceResult

func (x *ClearGeofenceResponse) GetGeofenceResult() *GeofenceResult

func (*ClearGeofenceResponse) ProtoMessage

func (*ClearGeofenceResponse) ProtoMessage()

func (*ClearGeofenceResponse) ProtoReflect

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

func (*ClearGeofenceResponse) Reset

func (x *ClearGeofenceResponse) Reset()

func (*ClearGeofenceResponse) String

func (x *ClearGeofenceResponse) 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 Polygon 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 a geofence.
	//
	// Polygons 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.

type GeofenceServiceServer

type GeofenceServiceServer interface {
	// Upload a geofence.
	//
	// Polygons 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

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 Polygon_FenceType ``                                                                  // Fence type
	/* 132-byte string literal not displayed */
	// 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() Polygon_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 Polygon_FenceType

type Polygon_FenceType int32

Geofence polygon types.

const (
	Polygon_FENCE_TYPE_INCLUSION Polygon_FenceType = 0 // Type representing an inclusion fence
	Polygon_FENCE_TYPE_EXCLUSION Polygon_FenceType = 1 // Type representing an exclusion fence
)

func (Polygon_FenceType) Descriptor

func (Polygon_FenceType) Enum

func (Polygon_FenceType) EnumDescriptor deprecated

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

Deprecated: Use Polygon_FenceType.Descriptor instead.

func (Polygon_FenceType) Number

func (Polygon_FenceType) String

func (x Polygon_FenceType) String() string

func (Polygon_FenceType) Type

type ServiceImpl

type ServiceImpl struct {
	Client GeofenceServiceClient
}

func (*ServiceImpl) ClearGeofence

func (s *ServiceImpl) ClearGeofence(ctx context.Context) (*ClearGeofenceResponse, error)

func (*ServiceImpl) UploadGeofence

func (s *ServiceImpl) UploadGeofence(ctx context.Context, polygons []*Polygon) (*UploadGeofenceResponse, error)

type UnimplementedGeofenceServiceServer

type UnimplementedGeofenceServiceServer struct {
}

UnimplementedGeofenceServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedGeofenceServiceServer) ClearGeofence

func (UnimplementedGeofenceServiceServer) UploadGeofence

type UnsafeGeofenceServiceServer

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 {
	Polygons []*Polygon `protobuf:"bytes,1,rep,name=polygons,proto3" json:"polygons,omitempty"` // 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) GetPolygons

func (x *UploadGeofenceRequest) GetPolygons() []*Polygon

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