shell

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2025 License: BSD-3-Clause Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ShellService_Send_FullMethodName             = "/mavsdk.rpc.shell.ShellService/Send"
	ShellService_SubscribeReceive_FullMethodName = "/mavsdk.rpc.shell.ShellService/SubscribeReceive"
)

Variables

View Source
var (
	ShellResult_Result_name = map[int32]string{
		0: "RESULT_UNKNOWN",
		1: "RESULT_SUCCESS",
		2: "RESULT_NO_SYSTEM",
		3: "RESULT_CONNECTION_ERROR",
		4: "RESULT_NO_RESPONSE",
		5: "RESULT_BUSY",
	}
	ShellResult_Result_value = map[string]int32{
		"RESULT_UNKNOWN":          0,
		"RESULT_SUCCESS":          1,
		"RESULT_NO_SYSTEM":        2,
		"RESULT_CONNECTION_ERROR": 3,
		"RESULT_NO_RESPONSE":      4,
		"RESULT_BUSY":             5,
	}
)

Enum value maps for ShellResult_Result.

View Source
var File_shell_proto protoreflect.FileDescriptor
View Source
var ShellService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "mavsdk.rpc.shell.ShellService",
	HandlerType: (*ShellServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Send",
			Handler:    _ShellService_Send_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "SubscribeReceive",
			Handler:       _ShellService_SubscribeReceive_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "shell.proto",
}

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

Functions

func RegisterShellServiceServer

func RegisterShellServiceServer(s grpc.ServiceRegistrar, srv ShellServiceServer)

Types

type ReceiveResponse

type ReceiveResponse struct {
	Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // Received data.
	// contains filtered or unexported fields
}

func (*ReceiveResponse) Descriptor deprecated

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

Deprecated: Use ReceiveResponse.ProtoReflect.Descriptor instead.

func (*ReceiveResponse) GetData

func (x *ReceiveResponse) GetData() string

func (*ReceiveResponse) ProtoMessage

func (*ReceiveResponse) ProtoMessage()

func (*ReceiveResponse) ProtoReflect

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

func (*ReceiveResponse) Reset

func (x *ReceiveResponse) Reset()

func (*ReceiveResponse) String

func (x *ReceiveResponse) String() string

type SendRequest

type SendRequest struct {
	Command string `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"` // The command line to send
	// contains filtered or unexported fields
}

func (*SendRequest) Descriptor deprecated

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

Deprecated: Use SendRequest.ProtoReflect.Descriptor instead.

func (*SendRequest) GetCommand

func (x *SendRequest) GetCommand() string

func (*SendRequest) ProtoMessage

func (*SendRequest) ProtoMessage()

func (*SendRequest) ProtoReflect

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

func (*SendRequest) Reset

func (x *SendRequest) Reset()

func (*SendRequest) String

func (x *SendRequest) String() string

type SendResponse

type SendResponse struct {
	ShellResult *ShellResult `protobuf:"bytes,1,opt,name=shell_result,json=shellResult,proto3" json:"shell_result,omitempty"`
	// contains filtered or unexported fields
}

func (*SendResponse) Descriptor deprecated

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

Deprecated: Use SendResponse.ProtoReflect.Descriptor instead.

func (*SendResponse) GetShellResult

func (x *SendResponse) GetShellResult() *ShellResult

func (*SendResponse) ProtoMessage

func (*SendResponse) ProtoMessage()

func (*SendResponse) ProtoReflect

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

func (*SendResponse) Reset

func (x *SendResponse) Reset()

func (*SendResponse) String

func (x *SendResponse) String() string

type ServiceImpl

type ServiceImpl struct {
	Client ShellServiceClient
}

func (*ServiceImpl) Receive

func (a *ServiceImpl) Receive(
	ctx context.Context,

) (<-chan string, error)

Receive Receive feedback from a sent command line.

This subscription needs to be made before a command line is sent, otherwise, no response will be sent.

func (*ServiceImpl) Send

func (s *ServiceImpl) Send(
	ctx context.Context,
	command string,

) (*SendResponse, error)

Send Send a command line.

type ShellResult

type ShellResult struct {
	Result    ShellResult_Result `protobuf:"varint,1,opt,name=result,proto3,enum=mavsdk.rpc.shell.ShellResult_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 (*ShellResult) Descriptor deprecated

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

Deprecated: Use ShellResult.ProtoReflect.Descriptor instead.

func (*ShellResult) GetResult

func (x *ShellResult) GetResult() ShellResult_Result

func (*ShellResult) GetResultStr

func (x *ShellResult) GetResultStr() string

func (*ShellResult) ProtoMessage

func (*ShellResult) ProtoMessage()

func (*ShellResult) ProtoReflect

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

func (*ShellResult) Reset

func (x *ShellResult) Reset()

func (*ShellResult) String

func (x *ShellResult) String() string

type ShellResult_Result

type ShellResult_Result int32

Possible results returned for shell requests

const (
	ShellResult_RESULT_UNKNOWN          ShellResult_Result = 0 // Unknown result
	ShellResult_RESULT_SUCCESS          ShellResult_Result = 1 // Request succeeded
	ShellResult_RESULT_NO_SYSTEM        ShellResult_Result = 2 // No system is connected
	ShellResult_RESULT_CONNECTION_ERROR ShellResult_Result = 3 // Connection error
	ShellResult_RESULT_NO_RESPONSE      ShellResult_Result = 4 // Response was not received
	ShellResult_RESULT_BUSY             ShellResult_Result = 5 // Shell busy (transfer in progress)
)

func (ShellResult_Result) Descriptor

func (ShellResult_Result) Enum

func (ShellResult_Result) EnumDescriptor deprecated

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

Deprecated: Use ShellResult_Result.Descriptor instead.

func (ShellResult_Result) Number

func (ShellResult_Result) String

func (x ShellResult_Result) String() string

func (ShellResult_Result) Type

type ShellServiceClient

type ShellServiceClient interface {
	// Send a command line.
	Send(ctx context.Context, in *SendRequest, opts ...grpc.CallOption) (*SendResponse, error)
	// Receive feedback from a sent command line.
	//
	// This subscription needs to be made before a command line is sent, otherwise, no response will be sent.
	SubscribeReceive(ctx context.Context, in *SubscribeReceiveRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ReceiveResponse], error)
}

ShellServiceClient is the client API for ShellService 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.

Allow to communicate with the vehicle's system shell.

type ShellServiceServer

type ShellServiceServer interface {
	// Send a command line.
	Send(context.Context, *SendRequest) (*SendResponse, error)
	// Receive feedback from a sent command line.
	//
	// This subscription needs to be made before a command line is sent, otherwise, no response will be sent.
	SubscribeReceive(*SubscribeReceiveRequest, grpc.ServerStreamingServer[ReceiveResponse]) error
	// contains filtered or unexported methods
}

ShellServiceServer is the server API for ShellService service. All implementations must embed UnimplementedShellServiceServer for forward compatibility.

Allow to communicate with the vehicle's system shell.

type ShellService_SubscribeReceiveClient

type ShellService_SubscribeReceiveClient = grpc.ServerStreamingClient[ReceiveResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type ShellService_SubscribeReceiveServer

type ShellService_SubscribeReceiveServer = grpc.ServerStreamingServer[ReceiveResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type SubscribeReceiveRequest

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

func (*SubscribeReceiveRequest) Descriptor deprecated

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

Deprecated: Use SubscribeReceiveRequest.ProtoReflect.Descriptor instead.

func (*SubscribeReceiveRequest) ProtoMessage

func (*SubscribeReceiveRequest) ProtoMessage()

func (*SubscribeReceiveRequest) ProtoReflect

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

func (*SubscribeReceiveRequest) Reset

func (x *SubscribeReceiveRequest) Reset()

func (*SubscribeReceiveRequest) String

func (x *SubscribeReceiveRequest) String() string

type UnimplementedShellServiceServer

type UnimplementedShellServiceServer struct{}

UnimplementedShellServiceServer 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 (UnimplementedShellServiceServer) Send

type UnsafeShellServiceServer

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

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

Jump to

Keyboard shortcuts

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