core

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CoreService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "mavsdk.rpc.core.CoreService",
	HandlerType: (*CoreServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SetMavlinkTimeout",
			Handler:    _CoreService_SetMavlinkTimeout_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "SubscribeConnectionState",
			Handler:       _CoreService_SubscribeConnectionState_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "core.proto",
}

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

Functions

func RegisterCoreServiceServer

func RegisterCoreServiceServer(s grpc.ServiceRegistrar, srv CoreServiceServer)

Types

type ConnectionState

type ConnectionState struct {
	IsConnected bool `protobuf:"varint,2,opt,name=is_connected,json=isConnected,proto3" json:"is_connected,omitempty"` // Whether the vehicle got connected or disconnected
	// contains filtered or unexported fields
}

Connection state type.

func (*ConnectionState) Descriptor deprecated

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

Deprecated: Use ConnectionState.ProtoReflect.Descriptor instead.

func (*ConnectionState) GetIsConnected

func (x *ConnectionState) GetIsConnected() bool

func (*ConnectionState) ProtoMessage

func (*ConnectionState) ProtoMessage()

func (*ConnectionState) ProtoReflect

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

func (*ConnectionState) Reset

func (x *ConnectionState) Reset()

func (*ConnectionState) String

func (x *ConnectionState) String() string

type ConnectionStateResponse

type ConnectionStateResponse struct {
	ConnectionState *ConnectionState `protobuf:"bytes,1,opt,name=connection_state,json=connectionState,proto3" json:"connection_state,omitempty"` // Connection state
	// contains filtered or unexported fields
}

func (*ConnectionStateResponse) Descriptor deprecated

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

Deprecated: Use ConnectionStateResponse.ProtoReflect.Descriptor instead.

func (*ConnectionStateResponse) GetConnectionState

func (x *ConnectionStateResponse) GetConnectionState() *ConnectionState

func (*ConnectionStateResponse) ProtoMessage

func (*ConnectionStateResponse) ProtoMessage()

func (*ConnectionStateResponse) ProtoReflect

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

func (*ConnectionStateResponse) Reset

func (x *ConnectionStateResponse) Reset()

func (*ConnectionStateResponse) String

func (x *ConnectionStateResponse) String() string

type CoreServiceClient

type CoreServiceClient interface {
	// Subscribe to 'connection state' updates.
	SubscribeConnectionState(ctx context.Context, in *SubscribeConnectionStateRequest, opts ...grpc.CallOption) (CoreService_SubscribeConnectionStateClient, error)
	// Set timeout of MAVLink transfers.
	//
	// The default timeout used is generally (0.5 seconds) seconds.
	// If MAVSDK is used on the same host this timeout can be reduced, while
	// if MAVSDK has to communicate over links with high latency it might
	// need to be increased to prevent timeouts.
	SetMavlinkTimeout(ctx context.Context, in *SetMavlinkTimeoutRequest, opts ...grpc.CallOption) (*SetMavlinkTimeoutResponse, error)
}

CoreServiceClient is the client API for CoreService 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 CoreServiceServer

type CoreServiceServer interface {
	// Subscribe to 'connection state' updates.
	SubscribeConnectionState(*SubscribeConnectionStateRequest, CoreService_SubscribeConnectionStateServer) error
	// Set timeout of MAVLink transfers.
	//
	// The default timeout used is generally (0.5 seconds) seconds.
	// If MAVSDK is used on the same host this timeout can be reduced, while
	// if MAVSDK has to communicate over links with high latency it might
	// need to be increased to prevent timeouts.
	SetMavlinkTimeout(context.Context, *SetMavlinkTimeoutRequest) (*SetMavlinkTimeoutResponse, error)
	// contains filtered or unexported methods
}

CoreServiceServer is the server API for CoreService service. All implementations must embed UnimplementedCoreServiceServer for forward compatibility

type CoreService_SubscribeConnectionStateClient

type CoreService_SubscribeConnectionStateClient interface {
	Recv() (*ConnectionStateResponse, error)
	grpc.ClientStream
}

type CoreService_SubscribeConnectionStateServer

type CoreService_SubscribeConnectionStateServer interface {
	Send(*ConnectionStateResponse) error
	grpc.ServerStream
}

type ServiceImpl

type ServiceImpl struct {
	Client CoreServiceClient
}

func (*ServiceImpl) ConnectionState

func (a *ServiceImpl) ConnectionState(ctx context.Context) (<-chan *ConnectionState, error)

func (*ServiceImpl) SetMavlinkTimeout

func (s *ServiceImpl) SetMavlinkTimeout(ctx context.Context, timeoutS float64) (*SetMavlinkTimeoutResponse, error)

type SetMavlinkTimeoutRequest

type SetMavlinkTimeoutRequest struct {
	TimeoutS float64 `protobuf:"fixed64,1,opt,name=timeout_s,json=timeoutS,proto3" json:"timeout_s,omitempty"` // Timeout in seconds
	// contains filtered or unexported fields
}

func (*SetMavlinkTimeoutRequest) Descriptor deprecated

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

Deprecated: Use SetMavlinkTimeoutRequest.ProtoReflect.Descriptor instead.

func (*SetMavlinkTimeoutRequest) GetTimeoutS

func (x *SetMavlinkTimeoutRequest) GetTimeoutS() float64

func (*SetMavlinkTimeoutRequest) ProtoMessage

func (*SetMavlinkTimeoutRequest) ProtoMessage()

func (*SetMavlinkTimeoutRequest) ProtoReflect

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

func (*SetMavlinkTimeoutRequest) Reset

func (x *SetMavlinkTimeoutRequest) Reset()

func (*SetMavlinkTimeoutRequest) String

func (x *SetMavlinkTimeoutRequest) String() string

type SetMavlinkTimeoutResponse

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

func (*SetMavlinkTimeoutResponse) Descriptor deprecated

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

Deprecated: Use SetMavlinkTimeoutResponse.ProtoReflect.Descriptor instead.

func (*SetMavlinkTimeoutResponse) ProtoMessage

func (*SetMavlinkTimeoutResponse) ProtoMessage()

func (*SetMavlinkTimeoutResponse) ProtoReflect

func (*SetMavlinkTimeoutResponse) Reset

func (x *SetMavlinkTimeoutResponse) Reset()

func (*SetMavlinkTimeoutResponse) String

func (x *SetMavlinkTimeoutResponse) String() string

type SubscribeConnectionStateRequest

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

func (*SubscribeConnectionStateRequest) Descriptor deprecated

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

Deprecated: Use SubscribeConnectionStateRequest.ProtoReflect.Descriptor instead.

func (*SubscribeConnectionStateRequest) ProtoMessage

func (*SubscribeConnectionStateRequest) ProtoMessage()

func (*SubscribeConnectionStateRequest) ProtoReflect

func (*SubscribeConnectionStateRequest) Reset

func (*SubscribeConnectionStateRequest) String

type UnimplementedCoreServiceServer

type UnimplementedCoreServiceServer struct {
}

UnimplementedCoreServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedCoreServiceServer) SetMavlinkTimeout

type UnsafeCoreServiceServer

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

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

Jump to

Keyboard shortcuts

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