Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterCoreServiceServer(s grpc.ServiceRegistrar, srv CoreServiceServer)
- type ConnectionState
- type ConnectionStateResponse
- func (*ConnectionStateResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ConnectionStateResponse) GetConnectionState() *ConnectionState
- func (*ConnectionStateResponse) ProtoMessage()
- func (x *ConnectionStateResponse) ProtoReflect() protoreflect.Message
- func (x *ConnectionStateResponse) Reset()
- func (x *ConnectionStateResponse) String() string
- type CoreServiceClient
- type CoreServiceServer
- type CoreService_SubscribeConnectionStateClient
- type CoreService_SubscribeConnectionStateServer
- type ServiceImpl
- type SetMavlinkTimeoutRequest
- func (*SetMavlinkTimeoutRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetMavlinkTimeoutRequest) GetTimeoutS() float64
- func (*SetMavlinkTimeoutRequest) ProtoMessage()
- func (x *SetMavlinkTimeoutRequest) ProtoReflect() protoreflect.Message
- func (x *SetMavlinkTimeoutRequest) Reset()
- func (x *SetMavlinkTimeoutRequest) String() string
- type SetMavlinkTimeoutResponse
- type SubscribeConnectionStateRequest
- func (*SubscribeConnectionStateRequest) Descriptor() ([]byte, []int)deprecated
- func (*SubscribeConnectionStateRequest) ProtoMessage()
- func (x *SubscribeConnectionStateRequest) ProtoReflect() protoreflect.Message
- func (x *SubscribeConnectionStateRequest) Reset()
- func (x *SubscribeConnectionStateRequest) String() string
- type UnimplementedCoreServiceServer
- type UnsafeCoreServiceServer
Constants ¶
const ( CoreService_SubscribeConnectionState_FullMethodName = "/mavsdk.rpc.core.CoreService/SubscribeConnectionState" CoreService_SetMavlinkTimeout_FullMethodName = "/mavsdk.rpc.core.CoreService/SetMavlinkTimeout" )
Variables ¶
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)
var File_core_proto protoreflect.FileDescriptor
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) (grpc.ServerStreamingClient[ConnectionStateResponse], 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.
Access to the connection state and core configurations
func NewCoreServiceClient ¶
func NewCoreServiceClient(cc grpc.ClientConnInterface) CoreServiceClient
type CoreServiceServer ¶
type CoreServiceServer interface { // Subscribe to 'connection state' updates. SubscribeConnectionState(*SubscribeConnectionStateRequest, grpc.ServerStreamingServer[ConnectionStateResponse]) 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.
Access to the connection state and core configurations
type CoreService_SubscribeConnectionStateClient ¶
type CoreService_SubscribeConnectionStateClient = grpc.ServerStreamingClient[ConnectionStateResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type CoreService_SubscribeConnectionStateServer ¶
type CoreService_SubscribeConnectionStateServer = grpc.ServerStreamingServer[ConnectionStateResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type ServiceImpl ¶
type ServiceImpl struct {
Client CoreServiceClient
}
func (*ServiceImpl) ConnectionState ¶
func (a *ServiceImpl) ConnectionState(ctx context.Context) (<-chan *ConnectionState, error)
func (*ServiceImpl) SetMavlinkTimeout ¶ added in v0.0.3
func (s *ServiceImpl) SetMavlinkTimeout(ctx context.Context, timeoutS float64) (*SetMavlinkTimeoutResponse, error)
type SetMavlinkTimeoutRequest ¶ added in v0.0.3
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
added in
v0.0.3
func (*SetMavlinkTimeoutRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetMavlinkTimeoutRequest.ProtoReflect.Descriptor instead.
func (*SetMavlinkTimeoutRequest) GetTimeoutS ¶ added in v0.0.3
func (x *SetMavlinkTimeoutRequest) GetTimeoutS() float64
func (*SetMavlinkTimeoutRequest) ProtoMessage ¶ added in v0.0.3
func (*SetMavlinkTimeoutRequest) ProtoMessage()
func (*SetMavlinkTimeoutRequest) ProtoReflect ¶ added in v0.0.3
func (x *SetMavlinkTimeoutRequest) ProtoReflect() protoreflect.Message
func (*SetMavlinkTimeoutRequest) Reset ¶ added in v0.0.3
func (x *SetMavlinkTimeoutRequest) Reset()
func (*SetMavlinkTimeoutRequest) String ¶ added in v0.0.3
func (x *SetMavlinkTimeoutRequest) String() string
type SetMavlinkTimeoutResponse ¶ added in v0.0.3
type SetMavlinkTimeoutResponse struct {
// contains filtered or unexported fields
}
func (*SetMavlinkTimeoutResponse) Descriptor
deprecated
added in
v0.0.3
func (*SetMavlinkTimeoutResponse) Descriptor() ([]byte, []int)
Deprecated: Use SetMavlinkTimeoutResponse.ProtoReflect.Descriptor instead.
func (*SetMavlinkTimeoutResponse) ProtoMessage ¶ added in v0.0.3
func (*SetMavlinkTimeoutResponse) ProtoMessage()
func (*SetMavlinkTimeoutResponse) ProtoReflect ¶ added in v0.0.3
func (x *SetMavlinkTimeoutResponse) ProtoReflect() protoreflect.Message
func (*SetMavlinkTimeoutResponse) Reset ¶ added in v0.0.3
func (x *SetMavlinkTimeoutResponse) Reset()
func (*SetMavlinkTimeoutResponse) String ¶ added in v0.0.3
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 (x *SubscribeConnectionStateRequest) ProtoReflect() protoreflect.Message
func (*SubscribeConnectionStateRequest) Reset ¶
func (x *SubscribeConnectionStateRequest) Reset()
func (*SubscribeConnectionStateRequest) String ¶
func (x *SubscribeConnectionStateRequest) String() string
type UnimplementedCoreServiceServer ¶
type UnimplementedCoreServiceServer struct{}
UnimplementedCoreServiceServer 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 (UnimplementedCoreServiceServer) SetMavlinkTimeout ¶ added in v0.0.3
func (UnimplementedCoreServiceServer) SetMavlinkTimeout(context.Context, *SetMavlinkTimeoutRequest) (*SetMavlinkTimeoutResponse, error)
func (UnimplementedCoreServiceServer) SubscribeConnectionState ¶
func (UnimplementedCoreServiceServer) SubscribeConnectionState(*SubscribeConnectionStateRequest, grpc.ServerStreamingServer[ConnectionStateResponse]) error
type UnsafeCoreServiceServer ¶ added in v0.0.3
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.