param

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: BSD-3-Clause Imports: 8 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

This section is empty.

Variables

View Source
var (
	ParamResult_Result_name = map[int32]string{
		0: "RESULT_UNKNOWN",
		1: "RESULT_SUCCESS",
		2: "RESULT_TIMEOUT",
		3: "RESULT_CONNECTION_ERROR",
		4: "RESULT_WRONG_TYPE",
		5: "RESULT_PARAM_NAME_TOO_LONG",
		6: "RESULT_NO_SYSTEM",
	}
	ParamResult_Result_value = map[string]int32{
		"RESULT_UNKNOWN":             0,
		"RESULT_SUCCESS":             1,
		"RESULT_TIMEOUT":             2,
		"RESULT_CONNECTION_ERROR":    3,
		"RESULT_WRONG_TYPE":          4,
		"RESULT_PARAM_NAME_TOO_LONG": 5,
		"RESULT_NO_SYSTEM":           6,
	}
)

Enum value maps for ParamResult_Result.

View Source
var File_param_proto protoreflect.FileDescriptor
View Source
var ParamService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "mavsdk.rpc.param.ParamService",
	HandlerType: (*ParamServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetParamInt",
			Handler:    _ParamService_GetParamInt_Handler,
		},
		{
			MethodName: "SetParamInt",
			Handler:    _ParamService_SetParamInt_Handler,
		},
		{
			MethodName: "GetParamFloat",
			Handler:    _ParamService_GetParamFloat_Handler,
		},
		{
			MethodName: "SetParamFloat",
			Handler:    _ParamService_SetParamFloat_Handler,
		},
		{
			MethodName: "GetAllParams",
			Handler:    _ParamService_GetAllParams_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "param.proto",
}

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

Functions

func RegisterParamServiceServer

func RegisterParamServiceServer(s grpc.ServiceRegistrar, srv ParamServiceServer)

Types

type AllParams

type AllParams struct {
	IntParams   []*IntParam   `protobuf:"bytes,1,rep,name=int_params,json=intParams,proto3" json:"int_params,omitempty"`       // Collection of all parameter names and values of type int
	FloatParams []*FloatParam `protobuf:"bytes,2,rep,name=float_params,json=floatParams,proto3" json:"float_params,omitempty"` // Collection of all parameter names and values of type float
	// contains filtered or unexported fields
}

Type collecting all integer and float parameters.

func (*AllParams) Descriptor deprecated

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

Deprecated: Use AllParams.ProtoReflect.Descriptor instead.

func (*AllParams) GetFloatParams

func (x *AllParams) GetFloatParams() []*FloatParam

func (*AllParams) GetIntParams

func (x *AllParams) GetIntParams() []*IntParam

func (*AllParams) ProtoMessage

func (*AllParams) ProtoMessage()

func (*AllParams) ProtoReflect

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

func (*AllParams) Reset

func (x *AllParams) Reset()

func (*AllParams) String

func (x *AllParams) String() string

type FloatParam

type FloatParam struct {
	Name  string  `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`     // Name of the parameter
	Value float32 `protobuf:"fixed32,2,opt,name=value,proto3" json:"value,omitempty"` // Value of the parameter
	// contains filtered or unexported fields
}

Type for float parameters.

func (*FloatParam) Descriptor deprecated

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

Deprecated: Use FloatParam.ProtoReflect.Descriptor instead.

func (*FloatParam) GetName

func (x *FloatParam) GetName() string

func (*FloatParam) GetValue

func (x *FloatParam) GetValue() float32

func (*FloatParam) ProtoMessage

func (*FloatParam) ProtoMessage()

func (*FloatParam) ProtoReflect

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

func (*FloatParam) Reset

func (x *FloatParam) Reset()

func (*FloatParam) String

func (x *FloatParam) String() string

type GetAllParamsRequest

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

func (*GetAllParamsRequest) Descriptor deprecated

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

Deprecated: Use GetAllParamsRequest.ProtoReflect.Descriptor instead.

func (*GetAllParamsRequest) ProtoMessage

func (*GetAllParamsRequest) ProtoMessage()

func (*GetAllParamsRequest) ProtoReflect

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

func (*GetAllParamsRequest) Reset

func (x *GetAllParamsRequest) Reset()

func (*GetAllParamsRequest) String

func (x *GetAllParamsRequest) String() string

type GetAllParamsResponse

type GetAllParamsResponse struct {
	Params *AllParams `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` // Collection of all parameters
	// contains filtered or unexported fields
}

func (*GetAllParamsResponse) Descriptor deprecated

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

Deprecated: Use GetAllParamsResponse.ProtoReflect.Descriptor instead.

func (*GetAllParamsResponse) GetParams

func (x *GetAllParamsResponse) GetParams() *AllParams

func (*GetAllParamsResponse) ProtoMessage

func (*GetAllParamsResponse) ProtoMessage()

func (*GetAllParamsResponse) ProtoReflect

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

func (*GetAllParamsResponse) Reset

func (x *GetAllParamsResponse) Reset()

func (*GetAllParamsResponse) String

func (x *GetAllParamsResponse) String() string

type GetParamFloatRequest

type GetParamFloatRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Name of the parameter
	// contains filtered or unexported fields
}

func (*GetParamFloatRequest) Descriptor deprecated

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

Deprecated: Use GetParamFloatRequest.ProtoReflect.Descriptor instead.

func (*GetParamFloatRequest) GetName

func (x *GetParamFloatRequest) GetName() string

func (*GetParamFloatRequest) ProtoMessage

func (*GetParamFloatRequest) ProtoMessage()

func (*GetParamFloatRequest) ProtoReflect

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

func (*GetParamFloatRequest) Reset

func (x *GetParamFloatRequest) Reset()

func (*GetParamFloatRequest) String

func (x *GetParamFloatRequest) String() string

type GetParamFloatResponse

type GetParamFloatResponse struct {
	ParamResult *ParamResult `protobuf:"bytes,1,opt,name=param_result,json=paramResult,proto3" json:"param_result,omitempty"`
	Value       float32      `protobuf:"fixed32,2,opt,name=value,proto3" json:"value,omitempty"` // Value of the requested parameter
	// contains filtered or unexported fields
}

func (*GetParamFloatResponse) Descriptor deprecated

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

Deprecated: Use GetParamFloatResponse.ProtoReflect.Descriptor instead.

func (*GetParamFloatResponse) GetParamResult

func (x *GetParamFloatResponse) GetParamResult() *ParamResult

func (*GetParamFloatResponse) GetValue

func (x *GetParamFloatResponse) GetValue() float32

func (*GetParamFloatResponse) ProtoMessage

func (*GetParamFloatResponse) ProtoMessage()

func (*GetParamFloatResponse) ProtoReflect

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

func (*GetParamFloatResponse) Reset

func (x *GetParamFloatResponse) Reset()

func (*GetParamFloatResponse) String

func (x *GetParamFloatResponse) String() string

type GetParamIntRequest

type GetParamIntRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Name of the parameter
	// contains filtered or unexported fields
}

func (*GetParamIntRequest) Descriptor deprecated

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

Deprecated: Use GetParamIntRequest.ProtoReflect.Descriptor instead.

func (*GetParamIntRequest) GetName

func (x *GetParamIntRequest) GetName() string

func (*GetParamIntRequest) ProtoMessage

func (*GetParamIntRequest) ProtoMessage()

func (*GetParamIntRequest) ProtoReflect

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

func (*GetParamIntRequest) Reset

func (x *GetParamIntRequest) Reset()

func (*GetParamIntRequest) String

func (x *GetParamIntRequest) String() string

type GetParamIntResponse

type GetParamIntResponse struct {
	ParamResult *ParamResult `protobuf:"bytes,1,opt,name=param_result,json=paramResult,proto3" json:"param_result,omitempty"`
	Value       int32        `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` // Value of the requested parameter
	// contains filtered or unexported fields
}

func (*GetParamIntResponse) Descriptor deprecated

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

Deprecated: Use GetParamIntResponse.ProtoReflect.Descriptor instead.

func (*GetParamIntResponse) GetParamResult

func (x *GetParamIntResponse) GetParamResult() *ParamResult

func (*GetParamIntResponse) GetValue

func (x *GetParamIntResponse) GetValue() int32

func (*GetParamIntResponse) ProtoMessage

func (*GetParamIntResponse) ProtoMessage()

func (*GetParamIntResponse) ProtoReflect

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

func (*GetParamIntResponse) Reset

func (x *GetParamIntResponse) Reset()

func (*GetParamIntResponse) String

func (x *GetParamIntResponse) String() string

type IntParam

type IntParam struct {
	Name  string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`    // Name of the parameter
	Value int32  `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` // Value of the parameter
	// contains filtered or unexported fields
}

Type for integer parameters.

func (*IntParam) Descriptor deprecated

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

Deprecated: Use IntParam.ProtoReflect.Descriptor instead.

func (*IntParam) GetName

func (x *IntParam) GetName() string

func (*IntParam) GetValue

func (x *IntParam) GetValue() int32

func (*IntParam) ProtoMessage

func (*IntParam) ProtoMessage()

func (*IntParam) ProtoReflect

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

func (*IntParam) Reset

func (x *IntParam) Reset()

func (*IntParam) String

func (x *IntParam) String() string

type ParamResult

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

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

Deprecated: Use ParamResult.ProtoReflect.Descriptor instead.

func (*ParamResult) GetResult

func (x *ParamResult) GetResult() ParamResult_Result

func (*ParamResult) GetResultStr

func (x *ParamResult) GetResultStr() string

func (*ParamResult) ProtoMessage

func (*ParamResult) ProtoMessage()

func (*ParamResult) ProtoReflect

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

func (*ParamResult) Reset

func (x *ParamResult) Reset()

func (*ParamResult) String

func (x *ParamResult) String() string

type ParamResult_Result

type ParamResult_Result int32

Possible results returned for param requests.

const (
	ParamResult_RESULT_UNKNOWN             ParamResult_Result = 0 // Unknown result
	ParamResult_RESULT_SUCCESS             ParamResult_Result = 1 // Request succeeded
	ParamResult_RESULT_TIMEOUT             ParamResult_Result = 2 // Request timed out
	ParamResult_RESULT_CONNECTION_ERROR    ParamResult_Result = 3 // Connection error
	ParamResult_RESULT_WRONG_TYPE          ParamResult_Result = 4 // Wrong type
	ParamResult_RESULT_PARAM_NAME_TOO_LONG ParamResult_Result = 5 // Parameter name too long (> 16)
	ParamResult_RESULT_NO_SYSTEM           ParamResult_Result = 6 // No system connected
)

func (ParamResult_Result) Descriptor

func (ParamResult_Result) Enum

func (ParamResult_Result) EnumDescriptor deprecated

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

Deprecated: Use ParamResult_Result.Descriptor instead.

func (ParamResult_Result) Number

func (ParamResult_Result) String

func (x ParamResult_Result) String() string

func (ParamResult_Result) Type

type ParamServiceClient

type ParamServiceClient interface {
	//
	// Get an int parameter.
	//
	// If the type is wrong, the result will be `WRONG_TYPE`.
	GetParamInt(ctx context.Context, in *GetParamIntRequest, opts ...grpc.CallOption) (*GetParamIntResponse, error)
	//
	// Set an int parameter.
	//
	// If the type is wrong, the result will be `WRONG_TYPE`.
	SetParamInt(ctx context.Context, in *SetParamIntRequest, opts ...grpc.CallOption) (*SetParamIntResponse, error)
	//
	// Get a float parameter.
	//
	// If the type is wrong, the result will be `WRONG_TYPE`.
	GetParamFloat(ctx context.Context, in *GetParamFloatRequest, opts ...grpc.CallOption) (*GetParamFloatResponse, error)
	//
	// Set a float parameter.
	//
	// If the type is wrong, the result will be `WRONG_TYPE`.
	SetParamFloat(ctx context.Context, in *SetParamFloatRequest, opts ...grpc.CallOption) (*SetParamFloatResponse, error)
	//
	// Get all parameters.
	GetAllParams(ctx context.Context, in *GetAllParamsRequest, opts ...grpc.CallOption) (*GetAllParamsResponse, error)
}

ParamServiceClient is the client API for ParamService 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 ParamServiceServer

type ParamServiceServer interface {
	//
	// Get an int parameter.
	//
	// If the type is wrong, the result will be `WRONG_TYPE`.
	GetParamInt(context.Context, *GetParamIntRequest) (*GetParamIntResponse, error)
	//
	// Set an int parameter.
	//
	// If the type is wrong, the result will be `WRONG_TYPE`.
	SetParamInt(context.Context, *SetParamIntRequest) (*SetParamIntResponse, error)
	//
	// Get a float parameter.
	//
	// If the type is wrong, the result will be `WRONG_TYPE`.
	GetParamFloat(context.Context, *GetParamFloatRequest) (*GetParamFloatResponse, error)
	//
	// Set a float parameter.
	//
	// If the type is wrong, the result will be `WRONG_TYPE`.
	SetParamFloat(context.Context, *SetParamFloatRequest) (*SetParamFloatResponse, error)
	//
	// Get all parameters.
	GetAllParams(context.Context, *GetAllParamsRequest) (*GetAllParamsResponse, error)
	// contains filtered or unexported methods
}

ParamServiceServer is the server API for ParamService service. All implementations must embed UnimplementedParamServiceServer for forward compatibility

type ServiceImpl

type ServiceImpl struct {
	Client ParamServiceClient
}

func (*ServiceImpl) GetAllParams

func (s *ServiceImpl) GetAllParams() (*GetAllParamsResponse, error)

func (*ServiceImpl) GetParamFloat

func (s *ServiceImpl) GetParamFloat(name string) (*GetParamFloatResponse, error)

func (*ServiceImpl) GetParamInt

func (s *ServiceImpl) GetParamInt(name string) (*GetParamIntResponse, error)

func (*ServiceImpl) SetParamFloat

func (s *ServiceImpl) SetParamFloat(name string, value float32) (*SetParamFloatResponse, error)

func (*ServiceImpl) SetParamInt

func (s *ServiceImpl) SetParamInt(name string, value int32) (*SetParamIntResponse, error)

type SetParamFloatRequest

type SetParamFloatRequest struct {
	Name  string  `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`     // Name of the parameter to set
	Value float32 `protobuf:"fixed32,2,opt,name=value,proto3" json:"value,omitempty"` // Value the parameter should be set to
	// contains filtered or unexported fields
}

func (*SetParamFloatRequest) Descriptor deprecated

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

Deprecated: Use SetParamFloatRequest.ProtoReflect.Descriptor instead.

func (*SetParamFloatRequest) GetName

func (x *SetParamFloatRequest) GetName() string

func (*SetParamFloatRequest) GetValue

func (x *SetParamFloatRequest) GetValue() float32

func (*SetParamFloatRequest) ProtoMessage

func (*SetParamFloatRequest) ProtoMessage()

func (*SetParamFloatRequest) ProtoReflect

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

func (*SetParamFloatRequest) Reset

func (x *SetParamFloatRequest) Reset()

func (*SetParamFloatRequest) String

func (x *SetParamFloatRequest) String() string

type SetParamFloatResponse

type SetParamFloatResponse struct {
	ParamResult *ParamResult `protobuf:"bytes,1,opt,name=param_result,json=paramResult,proto3" json:"param_result,omitempty"`
	// contains filtered or unexported fields
}

func (*SetParamFloatResponse) Descriptor deprecated

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

Deprecated: Use SetParamFloatResponse.ProtoReflect.Descriptor instead.

func (*SetParamFloatResponse) GetParamResult

func (x *SetParamFloatResponse) GetParamResult() *ParamResult

func (*SetParamFloatResponse) ProtoMessage

func (*SetParamFloatResponse) ProtoMessage()

func (*SetParamFloatResponse) ProtoReflect

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

func (*SetParamFloatResponse) Reset

func (x *SetParamFloatResponse) Reset()

func (*SetParamFloatResponse) String

func (x *SetParamFloatResponse) String() string

type SetParamIntRequest

type SetParamIntRequest struct {
	Name  string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`    // Name of the parameter to set
	Value int32  `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` // Value the parameter should be set to
	// contains filtered or unexported fields
}

func (*SetParamIntRequest) Descriptor deprecated

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

Deprecated: Use SetParamIntRequest.ProtoReflect.Descriptor instead.

func (*SetParamIntRequest) GetName

func (x *SetParamIntRequest) GetName() string

func (*SetParamIntRequest) GetValue

func (x *SetParamIntRequest) GetValue() int32

func (*SetParamIntRequest) ProtoMessage

func (*SetParamIntRequest) ProtoMessage()

func (*SetParamIntRequest) ProtoReflect

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

func (*SetParamIntRequest) Reset

func (x *SetParamIntRequest) Reset()

func (*SetParamIntRequest) String

func (x *SetParamIntRequest) String() string

type SetParamIntResponse

type SetParamIntResponse struct {
	ParamResult *ParamResult `protobuf:"bytes,1,opt,name=param_result,json=paramResult,proto3" json:"param_result,omitempty"`
	// contains filtered or unexported fields
}

func (*SetParamIntResponse) Descriptor deprecated

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

Deprecated: Use SetParamIntResponse.ProtoReflect.Descriptor instead.

func (*SetParamIntResponse) GetParamResult

func (x *SetParamIntResponse) GetParamResult() *ParamResult

func (*SetParamIntResponse) ProtoMessage

func (*SetParamIntResponse) ProtoMessage()

func (*SetParamIntResponse) ProtoReflect

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

func (*SetParamIntResponse) Reset

func (x *SetParamIntResponse) Reset()

func (*SetParamIntResponse) String

func (x *SetParamIntResponse) String() string

type UnimplementedParamServiceServer

type UnimplementedParamServiceServer struct {
}

UnimplementedParamServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedParamServiceServer) GetAllParams

func (UnimplementedParamServiceServer) GetParamFloat

func (UnimplementedParamServiceServer) GetParamInt

func (UnimplementedParamServiceServer) SetParamFloat

func (UnimplementedParamServiceServer) SetParamInt

type UnsafeParamServiceServer

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

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

Jump to

Keyboard shortcuts

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