Documentation ¶
Index ¶
- Variables
- func RegisterFailureServiceServer(s grpc.ServiceRegistrar, srv FailureServiceServer)
- type FailureResult
- func (*FailureResult) Descriptor() ([]byte, []int)deprecated
- func (x *FailureResult) GetResult() FailureResult_Result
- func (x *FailureResult) GetResultStr() string
- func (*FailureResult) ProtoMessage()
- func (x *FailureResult) ProtoReflect() protoreflect.Message
- func (x *FailureResult) Reset()
- func (x *FailureResult) String() string
- type FailureResult_Result
- func (FailureResult_Result) Descriptor() protoreflect.EnumDescriptor
- func (x FailureResult_Result) Enum() *FailureResult_Result
- func (FailureResult_Result) EnumDescriptor() ([]byte, []int)deprecated
- func (x FailureResult_Result) Number() protoreflect.EnumNumber
- func (x FailureResult_Result) String() string
- func (FailureResult_Result) Type() protoreflect.EnumType
- type FailureServiceClient
- type FailureServiceServer
- type FailureType
- func (FailureType) Descriptor() protoreflect.EnumDescriptor
- func (x FailureType) Enum() *FailureType
- func (FailureType) EnumDescriptor() ([]byte, []int)deprecated
- func (x FailureType) Number() protoreflect.EnumNumber
- func (x FailureType) String() string
- func (FailureType) Type() protoreflect.EnumType
- type FailureUnit
- func (FailureUnit) Descriptor() protoreflect.EnumDescriptor
- func (x FailureUnit) Enum() *FailureUnit
- func (FailureUnit) EnumDescriptor() ([]byte, []int)deprecated
- func (x FailureUnit) Number() protoreflect.EnumNumber
- func (x FailureUnit) String() string
- func (FailureUnit) Type() protoreflect.EnumType
- type InjectRequest
- func (*InjectRequest) Descriptor() ([]byte, []int)deprecated
- func (x *InjectRequest) GetFailureType() FailureType
- func (x *InjectRequest) GetFailureUnit() FailureUnit
- func (x *InjectRequest) GetInstance() int32
- func (*InjectRequest) ProtoMessage()
- func (x *InjectRequest) ProtoReflect() protoreflect.Message
- func (x *InjectRequest) Reset()
- func (x *InjectRequest) String() string
- type InjectResponse
- type ServiceImpl
- type UnimplementedFailureServiceServer
- type UnsafeFailureServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( FailureUnit_name = map[int32]string{ 0: "FAILURE_UNIT_SENSOR_GYRO", 1: "FAILURE_UNIT_SENSOR_ACCEL", 2: "FAILURE_UNIT_SENSOR_MAG", 3: "FAILURE_UNIT_SENSOR_BARO", 4: "FAILURE_UNIT_SENSOR_GPS", 5: "FAILURE_UNIT_SENSOR_OPTICAL_FLOW", 6: "FAILURE_UNIT_SENSOR_VIO", 7: "FAILURE_UNIT_SENSOR_DISTANCE_SENSOR", 8: "FAILURE_UNIT_SENSOR_AIRSPEED", 100: "FAILURE_UNIT_SYSTEM_BATTERY", 101: "FAILURE_UNIT_SYSTEM_MOTOR", 102: "FAILURE_UNIT_SYSTEM_SERVO", 103: "FAILURE_UNIT_SYSTEM_AVOIDANCE", 104: "FAILURE_UNIT_SYSTEM_RC_SIGNAL", 105: "FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL", } FailureUnit_value = map[string]int32{ "FAILURE_UNIT_SENSOR_GYRO": 0, "FAILURE_UNIT_SENSOR_ACCEL": 1, "FAILURE_UNIT_SENSOR_MAG": 2, "FAILURE_UNIT_SENSOR_BARO": 3, "FAILURE_UNIT_SENSOR_GPS": 4, "FAILURE_UNIT_SENSOR_OPTICAL_FLOW": 5, "FAILURE_UNIT_SENSOR_VIO": 6, "FAILURE_UNIT_SENSOR_DISTANCE_SENSOR": 7, "FAILURE_UNIT_SENSOR_AIRSPEED": 8, "FAILURE_UNIT_SYSTEM_BATTERY": 100, "FAILURE_UNIT_SYSTEM_MOTOR": 101, "FAILURE_UNIT_SYSTEM_SERVO": 102, "FAILURE_UNIT_SYSTEM_AVOIDANCE": 103, "FAILURE_UNIT_SYSTEM_RC_SIGNAL": 104, "FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL": 105, } )
Enum value maps for FailureUnit.
var ( FailureType_name = map[int32]string{ 0: "FAILURE_TYPE_OK", 1: "FAILURE_TYPE_OFF", 2: "FAILURE_TYPE_STUCK", 3: "FAILURE_TYPE_GARBAGE", 4: "FAILURE_TYPE_WRONG", 5: "FAILURE_TYPE_SLOW", 6: "FAILURE_TYPE_DELAYED", 7: "FAILURE_TYPE_INTERMITTENT", } FailureType_value = map[string]int32{ "FAILURE_TYPE_OK": 0, "FAILURE_TYPE_OFF": 1, "FAILURE_TYPE_STUCK": 2, "FAILURE_TYPE_GARBAGE": 3, "FAILURE_TYPE_WRONG": 4, "FAILURE_TYPE_SLOW": 5, "FAILURE_TYPE_DELAYED": 6, "FAILURE_TYPE_INTERMITTENT": 7, } )
Enum value maps for FailureType.
var ( FailureResult_Result_name = map[int32]string{ 0: "RESULT_UNKNOWN", 1: "RESULT_SUCCESS", 2: "RESULT_NO_SYSTEM", 3: "RESULT_CONNECTION_ERROR", 4: "RESULT_UNSUPPORTED", 5: "RESULT_DENIED", 6: "RESULT_DISABLED", 7: "RESULT_TIMEOUT", } FailureResult_Result_value = map[string]int32{ "RESULT_UNKNOWN": 0, "RESULT_SUCCESS": 1, "RESULT_NO_SYSTEM": 2, "RESULT_CONNECTION_ERROR": 3, "RESULT_UNSUPPORTED": 4, "RESULT_DENIED": 5, "RESULT_DISABLED": 6, "RESULT_TIMEOUT": 7, } )
Enum value maps for FailureResult_Result.
var FailureService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "mavsdk.rpc.failure.FailureService", HandlerType: (*FailureServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Inject", Handler: _FailureService_Inject_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "failure.proto", }
FailureService_ServiceDesc is the grpc.ServiceDesc for FailureService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_failure_proto protoreflect.FileDescriptor
Functions ¶
func RegisterFailureServiceServer ¶
func RegisterFailureServiceServer(s grpc.ServiceRegistrar, srv FailureServiceServer)
Types ¶
type FailureResult ¶
type FailureResult struct { Result FailureResult_Result `protobuf:"varint,1,opt,name=result,proto3,enum=mavsdk.rpc.failure.FailureResult_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 }
func (*FailureResult) Descriptor
deprecated
func (*FailureResult) Descriptor() ([]byte, []int)
Deprecated: Use FailureResult.ProtoReflect.Descriptor instead.
func (*FailureResult) GetResult ¶
func (x *FailureResult) GetResult() FailureResult_Result
func (*FailureResult) GetResultStr ¶
func (x *FailureResult) GetResultStr() string
func (*FailureResult) ProtoMessage ¶
func (*FailureResult) ProtoMessage()
func (*FailureResult) ProtoReflect ¶
func (x *FailureResult) ProtoReflect() protoreflect.Message
func (*FailureResult) Reset ¶
func (x *FailureResult) Reset()
func (*FailureResult) String ¶
func (x *FailureResult) String() string
type FailureResult_Result ¶
type FailureResult_Result int32
Possible results returned for failure requests.
const ( FailureResult_RESULT_UNKNOWN FailureResult_Result = 0 // Unknown result FailureResult_RESULT_SUCCESS FailureResult_Result = 1 // Request succeeded FailureResult_RESULT_NO_SYSTEM FailureResult_Result = 2 // No system is connected FailureResult_RESULT_CONNECTION_ERROR FailureResult_Result = 3 // Connection error FailureResult_RESULT_UNSUPPORTED FailureResult_Result = 4 // Failure not supported FailureResult_RESULT_DENIED FailureResult_Result = 5 // Failure injection denied FailureResult_RESULT_DISABLED FailureResult_Result = 6 // Failure injection is disabled FailureResult_RESULT_TIMEOUT FailureResult_Result = 7 // Request timed out )
func (FailureResult_Result) Descriptor ¶
func (FailureResult_Result) Descriptor() protoreflect.EnumDescriptor
func (FailureResult_Result) Enum ¶
func (x FailureResult_Result) Enum() *FailureResult_Result
func (FailureResult_Result) EnumDescriptor
deprecated
func (FailureResult_Result) EnumDescriptor() ([]byte, []int)
Deprecated: Use FailureResult_Result.Descriptor instead.
func (FailureResult_Result) Number ¶
func (x FailureResult_Result) Number() protoreflect.EnumNumber
func (FailureResult_Result) String ¶
func (x FailureResult_Result) String() string
func (FailureResult_Result) Type ¶
func (FailureResult_Result) Type() protoreflect.EnumType
type FailureServiceClient ¶
type FailureServiceClient interface { // Injects a failure. Inject(ctx context.Context, in *InjectRequest, opts ...grpc.CallOption) (*InjectResponse, error) }
FailureServiceClient is the client API for FailureService 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.
func NewFailureServiceClient ¶
func NewFailureServiceClient(cc grpc.ClientConnInterface) FailureServiceClient
type FailureServiceServer ¶
type FailureServiceServer interface { // Injects a failure. Inject(context.Context, *InjectRequest) (*InjectResponse, error) // contains filtered or unexported methods }
FailureServiceServer is the server API for FailureService service. All implementations must embed UnimplementedFailureServiceServer for forward compatibility
type FailureType ¶
type FailureType int32
A failure type
const ( FailureType_FAILURE_TYPE_OK FailureType = 0 // No failure injected, used to reset a previous failure FailureType_FAILURE_TYPE_OFF FailureType = 1 // Sets unit off, so completely non-responsive FailureType_FAILURE_TYPE_STUCK FailureType = 2 // Unit is stuck e.g. keeps reporting the same value FailureType_FAILURE_TYPE_GARBAGE FailureType = 3 // Unit is reporting complete garbage FailureType_FAILURE_TYPE_WRONG FailureType = 4 // Unit is consistently wrong FailureType_FAILURE_TYPE_SLOW FailureType = 5 // Unit is slow, so e.g. reporting at slower than expected rate FailureType_FAILURE_TYPE_DELAYED FailureType = 6 // Data of unit is delayed in time FailureType_FAILURE_TYPE_INTERMITTENT FailureType = 7 // Unit is sometimes working, sometimes not )
func (FailureType) Descriptor ¶
func (FailureType) Descriptor() protoreflect.EnumDescriptor
func (FailureType) Enum ¶
func (x FailureType) Enum() *FailureType
func (FailureType) EnumDescriptor
deprecated
func (FailureType) EnumDescriptor() ([]byte, []int)
Deprecated: Use FailureType.Descriptor instead.
func (FailureType) Number ¶
func (x FailureType) Number() protoreflect.EnumNumber
func (FailureType) String ¶
func (x FailureType) String() string
func (FailureType) Type ¶
func (FailureType) Type() protoreflect.EnumType
type FailureUnit ¶
type FailureUnit int32
A failure unit.
const ( FailureUnit_FAILURE_UNIT_SENSOR_GYRO FailureUnit = 0 // Gyro FailureUnit_FAILURE_UNIT_SENSOR_ACCEL FailureUnit = 1 // Accelerometer FailureUnit_FAILURE_UNIT_SENSOR_MAG FailureUnit = 2 // Magnetometer FailureUnit_FAILURE_UNIT_SENSOR_BARO FailureUnit = 3 // Barometer FailureUnit_FAILURE_UNIT_SENSOR_GPS FailureUnit = 4 // GPS FailureUnit_FAILURE_UNIT_SENSOR_OPTICAL_FLOW FailureUnit = 5 // Optical flow FailureUnit_FAILURE_UNIT_SENSOR_VIO FailureUnit = 6 // Visual inertial odometry FailureUnit_FAILURE_UNIT_SENSOR_DISTANCE_SENSOR FailureUnit = 7 // Distance sensor FailureUnit_FAILURE_UNIT_SENSOR_AIRSPEED FailureUnit = 8 // Airspeed FailureUnit_FAILURE_UNIT_SYSTEM_BATTERY FailureUnit = 100 // Battery FailureUnit_FAILURE_UNIT_SYSTEM_MOTOR FailureUnit = 101 // Motor FailureUnit_FAILURE_UNIT_SYSTEM_SERVO FailureUnit = 102 // Servo FailureUnit_FAILURE_UNIT_SYSTEM_AVOIDANCE FailureUnit = 103 // Avoidance FailureUnit_FAILURE_UNIT_SYSTEM_RC_SIGNAL FailureUnit = 104 // RC signal FailureUnit_FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL FailureUnit = 105 // MAVLink signal )
func (FailureUnit) Descriptor ¶
func (FailureUnit) Descriptor() protoreflect.EnumDescriptor
func (FailureUnit) Enum ¶
func (x FailureUnit) Enum() *FailureUnit
func (FailureUnit) EnumDescriptor
deprecated
func (FailureUnit) EnumDescriptor() ([]byte, []int)
Deprecated: Use FailureUnit.Descriptor instead.
func (FailureUnit) Number ¶
func (x FailureUnit) Number() protoreflect.EnumNumber
func (FailureUnit) String ¶
func (x FailureUnit) String() string
func (FailureUnit) Type ¶
func (FailureUnit) Type() protoreflect.EnumType
type InjectRequest ¶
type InjectRequest struct { FailureUnit FailureUnit `` // The failure unit to send /* 131-byte string literal not displayed */ FailureType FailureType `` // The failure type to send /* 131-byte string literal not displayed */ Instance int32 `protobuf:"varint,3,opt,name=instance,proto3" json:"instance,omitempty"` // Instance to affect (0 for all) // contains filtered or unexported fields }
func (*InjectRequest) Descriptor
deprecated
func (*InjectRequest) Descriptor() ([]byte, []int)
Deprecated: Use InjectRequest.ProtoReflect.Descriptor instead.
func (*InjectRequest) GetFailureType ¶
func (x *InjectRequest) GetFailureType() FailureType
func (*InjectRequest) GetFailureUnit ¶
func (x *InjectRequest) GetFailureUnit() FailureUnit
func (*InjectRequest) GetInstance ¶
func (x *InjectRequest) GetInstance() int32
func (*InjectRequest) ProtoMessage ¶
func (*InjectRequest) ProtoMessage()
func (*InjectRequest) ProtoReflect ¶
func (x *InjectRequest) ProtoReflect() protoreflect.Message
func (*InjectRequest) Reset ¶
func (x *InjectRequest) Reset()
func (*InjectRequest) String ¶
func (x *InjectRequest) String() string
type InjectResponse ¶
type InjectResponse struct { FailureResult *FailureResult `protobuf:"bytes,1,opt,name=failure_result,json=failureResult,proto3" json:"failure_result,omitempty"` // contains filtered or unexported fields }
func (*InjectResponse) Descriptor
deprecated
func (*InjectResponse) Descriptor() ([]byte, []int)
Deprecated: Use InjectResponse.ProtoReflect.Descriptor instead.
func (*InjectResponse) GetFailureResult ¶
func (x *InjectResponse) GetFailureResult() *FailureResult
func (*InjectResponse) ProtoMessage ¶
func (*InjectResponse) ProtoMessage()
func (*InjectResponse) ProtoReflect ¶
func (x *InjectResponse) ProtoReflect() protoreflect.Message
func (*InjectResponse) Reset ¶
func (x *InjectResponse) Reset()
func (*InjectResponse) String ¶
func (x *InjectResponse) String() string
type ServiceImpl ¶
type ServiceImpl struct {
Client FailureServiceClient
}
func (*ServiceImpl) Inject ¶
func (s *ServiceImpl) Inject(ctx context.Context, failureUnit *FailureUnit, failureType *FailureType, instance int32) (*InjectResponse, error)
type UnimplementedFailureServiceServer ¶
type UnimplementedFailureServiceServer struct { }
UnimplementedFailureServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedFailureServiceServer) Inject ¶
func (UnimplementedFailureServiceServer) Inject(context.Context, *InjectRequest) (*InjectResponse, error)
type UnsafeFailureServiceServer ¶
type UnsafeFailureServiceServer interface {
// contains filtered or unexported methods
}
UnsafeFailureServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FailureServiceServer will result in compilation errors.