transponder

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 (
	AdsbEmitterType_name = map[int32]string{
		0:  "ADSB_EMITTER_TYPE_NO_INFO",
		1:  "ADSB_EMITTER_TYPE_LIGHT",
		2:  "ADSB_EMITTER_TYPE_SMALL",
		3:  "ADSB_EMITTER_TYPE_LARGE",
		4:  "ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE",
		5:  "ADSB_EMITTER_TYPE_HEAVY",
		6:  "ADSB_EMITTER_TYPE_HIGHLY_MANUV",
		7:  "ADSB_EMITTER_TYPE_ROTOCRAFT",
		8:  "ADSB_EMITTER_TYPE_UNASSIGNED",
		9:  "ADSB_EMITTER_TYPE_GLIDER",
		10: "ADSB_EMITTER_TYPE_LIGHTER_AIR",
		11: "ADSB_EMITTER_TYPE_PARACHUTE",
		12: "ADSB_EMITTER_TYPE_ULTRA_LIGHT",
		13: "ADSB_EMITTER_TYPE_UNASSIGNED2",
		14: "ADSB_EMITTER_TYPE_UAV",
		15: "ADSB_EMITTER_TYPE_SPACE",
		16: "ADSB_EMITTER_TYPE_UNASSGINED3",
		17: "ADSB_EMITTER_TYPE_EMERGENCY_SURFACE",
		18: "ADSB_EMITTER_TYPE_SERVICE_SURFACE",
		19: "ADSB_EMITTER_TYPE_POINT_OBSTACLE",
	}
	AdsbEmitterType_value = map[string]int32{
		"ADSB_EMITTER_TYPE_NO_INFO":           0,
		"ADSB_EMITTER_TYPE_LIGHT":             1,
		"ADSB_EMITTER_TYPE_SMALL":             2,
		"ADSB_EMITTER_TYPE_LARGE":             3,
		"ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE": 4,
		"ADSB_EMITTER_TYPE_HEAVY":             5,
		"ADSB_EMITTER_TYPE_HIGHLY_MANUV":      6,
		"ADSB_EMITTER_TYPE_ROTOCRAFT":         7,
		"ADSB_EMITTER_TYPE_UNASSIGNED":        8,
		"ADSB_EMITTER_TYPE_GLIDER":            9,
		"ADSB_EMITTER_TYPE_LIGHTER_AIR":       10,
		"ADSB_EMITTER_TYPE_PARACHUTE":         11,
		"ADSB_EMITTER_TYPE_ULTRA_LIGHT":       12,
		"ADSB_EMITTER_TYPE_UNASSIGNED2":       13,
		"ADSB_EMITTER_TYPE_UAV":               14,
		"ADSB_EMITTER_TYPE_SPACE":             15,
		"ADSB_EMITTER_TYPE_UNASSGINED3":       16,
		"ADSB_EMITTER_TYPE_EMERGENCY_SURFACE": 17,
		"ADSB_EMITTER_TYPE_SERVICE_SURFACE":   18,
		"ADSB_EMITTER_TYPE_POINT_OBSTACLE":    19,
	}
)

Enum value maps for AdsbEmitterType.

View Source
var (
	TransponderResult_Result_name = map[int32]string{
		0: "RESULT_UNKNOWN",
		1: "RESULT_SUCCESS",
		2: "RESULT_NO_SYSTEM",
		3: "RESULT_CONNECTION_ERROR",
		4: "RESULT_BUSY",
		5: "RESULT_COMMAND_DENIED",
		6: "RESULT_TIMEOUT",
	}
	TransponderResult_Result_value = map[string]int32{
		"RESULT_UNKNOWN":          0,
		"RESULT_SUCCESS":          1,
		"RESULT_NO_SYSTEM":        2,
		"RESULT_CONNECTION_ERROR": 3,
		"RESULT_BUSY":             4,
		"RESULT_COMMAND_DENIED":   5,
		"RESULT_TIMEOUT":          6,
	}
)

Enum value maps for TransponderResult_Result.

View Source
var File_transponder_proto protoreflect.FileDescriptor
View Source
var TransponderService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "mavsdk.rpc.transponder.TransponderService",
	HandlerType: (*TransponderServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SetRateTransponder",
			Handler:    _TransponderService_SetRateTransponder_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "SubscribeTransponder",
			Handler:       _TransponderService_SubscribeTransponder_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "transponder.proto",
}

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

Functions

func RegisterTransponderServiceServer

func RegisterTransponderServiceServer(s grpc.ServiceRegistrar, srv TransponderServiceServer)

Types

type AdsbEmitterType

type AdsbEmitterType int32

ADSB classification for the type of vehicle emitting the transponder signal.

const (
	AdsbEmitterType_ADSB_EMITTER_TYPE_NO_INFO           AdsbEmitterType = 0  // No emitter info.
	AdsbEmitterType_ADSB_EMITTER_TYPE_LIGHT             AdsbEmitterType = 1  // Light emitter.
	AdsbEmitterType_ADSB_EMITTER_TYPE_SMALL             AdsbEmitterType = 2  // Small emitter.
	AdsbEmitterType_ADSB_EMITTER_TYPE_LARGE             AdsbEmitterType = 3  // Large emitter.
	AdsbEmitterType_ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE AdsbEmitterType = 4  // High vortex emitter.
	AdsbEmitterType_ADSB_EMITTER_TYPE_HEAVY             AdsbEmitterType = 5  // Heavy emitter.
	AdsbEmitterType_ADSB_EMITTER_TYPE_HIGHLY_MANUV      AdsbEmitterType = 6  // Highly maneuverable emitter.
	AdsbEmitterType_ADSB_EMITTER_TYPE_ROTOCRAFT         AdsbEmitterType = 7  // Rotorcraft emitter.
	AdsbEmitterType_ADSB_EMITTER_TYPE_UNASSIGNED        AdsbEmitterType = 8  // Unassigned emitter.
	AdsbEmitterType_ADSB_EMITTER_TYPE_GLIDER            AdsbEmitterType = 9  // Glider emitter.
	AdsbEmitterType_ADSB_EMITTER_TYPE_LIGHTER_AIR       AdsbEmitterType = 10 // Lighter air emitter.
	AdsbEmitterType_ADSB_EMITTER_TYPE_PARACHUTE         AdsbEmitterType = 11 // Parachute emitter.
	AdsbEmitterType_ADSB_EMITTER_TYPE_ULTRA_LIGHT       AdsbEmitterType = 12 // Ultra light emitter.
	AdsbEmitterType_ADSB_EMITTER_TYPE_UNASSIGNED2       AdsbEmitterType = 13 // Unassigned2 emitter.
	AdsbEmitterType_ADSB_EMITTER_TYPE_UAV               AdsbEmitterType = 14 // UAV emitter.
	AdsbEmitterType_ADSB_EMITTER_TYPE_SPACE             AdsbEmitterType = 15 // Space emitter.
	AdsbEmitterType_ADSB_EMITTER_TYPE_UNASSGINED3       AdsbEmitterType = 16 // Unassigned3 emitter.
	AdsbEmitterType_ADSB_EMITTER_TYPE_EMERGENCY_SURFACE AdsbEmitterType = 17 // Emergency emitter.
	AdsbEmitterType_ADSB_EMITTER_TYPE_SERVICE_SURFACE   AdsbEmitterType = 18 // Service surface emitter.
	AdsbEmitterType_ADSB_EMITTER_TYPE_POINT_OBSTACLE    AdsbEmitterType = 19 // Point obstacle emitter.
)

func (AdsbEmitterType) Descriptor

func (AdsbEmitterType) Enum

func (x AdsbEmitterType) Enum() *AdsbEmitterType

func (AdsbEmitterType) EnumDescriptor deprecated

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

Deprecated: Use AdsbEmitterType.Descriptor instead.

func (AdsbEmitterType) Number

func (AdsbEmitterType) String

func (x AdsbEmitterType) String() string

func (AdsbEmitterType) Type

type AdsbVehicle

type AdsbVehicle struct {
	IcaoAddress          uint32  `protobuf:"varint,1,opt,name=icao_address,json=icaoAddress,proto3" json:"icao_address,omitempty"`                      // ICAO (International Civil Aviation Organization) unique worldwide identifier
	LatitudeDeg          float64 `protobuf:"fixed64,2,opt,name=latitude_deg,json=latitudeDeg,proto3" json:"latitude_deg,omitempty"`                     // Latitude in degrees (range: -90 to +90)
	LongitudeDeg         float64 `protobuf:"fixed64,3,opt,name=longitude_deg,json=longitudeDeg,proto3" json:"longitude_deg,omitempty"`                  // Longitude in degrees (range: -180 to +180).
	AbsoluteAltitudeM    float32 `protobuf:"fixed32,5,opt,name=absolute_altitude_m,json=absoluteAltitudeM,proto3" json:"absolute_altitude_m,omitempty"` // Altitude AMSL (above mean sea level) in metres
	HeadingDeg           float32 `protobuf:"fixed32,6,opt,name=heading_deg,json=headingDeg,proto3" json:"heading_deg,omitempty"`                        // Course over ground, in degrees
	HorizontalVelocityMS float32 ``                                                                                                                     // The horizontal velocity in metres/second
	/* 127-byte string literal not displayed */
	VerticalVelocityMS float32         `protobuf:"fixed32,8,opt,name=vertical_velocity_m_s,json=verticalVelocityMS,proto3" json:"vertical_velocity_m_s,omitempty"` // The vertical velocity in metres/second. Positive is up.
	Callsign           string          `protobuf:"bytes,9,opt,name=callsign,proto3" json:"callsign,omitempty"`                                                     // The callsign
	EmitterType        AdsbEmitterType ``                                                                                                                          // ADSB emitter type.
	/* 140-byte string literal not displayed */
	Squawk uint32 `protobuf:"varint,13,opt,name=squawk,proto3" json:"squawk,omitempty"`            // Squawk code.
	TslcS  uint32 `protobuf:"varint,14,opt,name=tslc_s,json=tslcS,proto3" json:"tslc_s,omitempty"` // Time Since Last Communication in seconds.
	// contains filtered or unexported fields
}

ADSB Vehicle type.

func (*AdsbVehicle) Descriptor deprecated

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

Deprecated: Use AdsbVehicle.ProtoReflect.Descriptor instead.

func (*AdsbVehicle) GetAbsoluteAltitudeM

func (x *AdsbVehicle) GetAbsoluteAltitudeM() float32

func (*AdsbVehicle) GetCallsign

func (x *AdsbVehicle) GetCallsign() string

func (*AdsbVehicle) GetEmitterType

func (x *AdsbVehicle) GetEmitterType() AdsbEmitterType

func (*AdsbVehicle) GetHeadingDeg

func (x *AdsbVehicle) GetHeadingDeg() float32

func (*AdsbVehicle) GetHorizontalVelocityMS

func (x *AdsbVehicle) GetHorizontalVelocityMS() float32

func (*AdsbVehicle) GetIcaoAddress

func (x *AdsbVehicle) GetIcaoAddress() uint32

func (*AdsbVehicle) GetLatitudeDeg

func (x *AdsbVehicle) GetLatitudeDeg() float64

func (*AdsbVehicle) GetLongitudeDeg

func (x *AdsbVehicle) GetLongitudeDeg() float64

func (*AdsbVehicle) GetSquawk

func (x *AdsbVehicle) GetSquawk() uint32

func (*AdsbVehicle) GetTslcS

func (x *AdsbVehicle) GetTslcS() uint32

func (*AdsbVehicle) GetVerticalVelocityMS

func (x *AdsbVehicle) GetVerticalVelocityMS() float32

func (*AdsbVehicle) ProtoMessage

func (*AdsbVehicle) ProtoMessage()

func (*AdsbVehicle) ProtoReflect

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

func (*AdsbVehicle) Reset

func (x *AdsbVehicle) Reset()

func (*AdsbVehicle) String

func (x *AdsbVehicle) String() string

type ServiceImpl

type ServiceImpl struct {
	Client TransponderServiceClient
}

func (*ServiceImpl) SetRateTransponder

func (s *ServiceImpl) SetRateTransponder(ctx context.Context, rateHz float64) (*SetRateTransponderResponse, error)

func (*ServiceImpl) Transponder

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

type SetRateTransponderRequest

type SetRateTransponderRequest struct {
	RateHz float64 `protobuf:"fixed64,1,opt,name=rate_hz,json=rateHz,proto3" json:"rate_hz,omitempty"` // The requested rate (in Hertz)
	// contains filtered or unexported fields
}

func (*SetRateTransponderRequest) Descriptor deprecated

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

Deprecated: Use SetRateTransponderRequest.ProtoReflect.Descriptor instead.

func (*SetRateTransponderRequest) GetRateHz

func (x *SetRateTransponderRequest) GetRateHz() float64

func (*SetRateTransponderRequest) ProtoMessage

func (*SetRateTransponderRequest) ProtoMessage()

func (*SetRateTransponderRequest) ProtoReflect

func (*SetRateTransponderRequest) Reset

func (x *SetRateTransponderRequest) Reset()

func (*SetRateTransponderRequest) String

func (x *SetRateTransponderRequest) String() string

type SetRateTransponderResponse

type SetRateTransponderResponse struct {
	TransponderResult *TransponderResult `protobuf:"bytes,1,opt,name=transponder_result,json=transponderResult,proto3" json:"transponder_result,omitempty"`
	// contains filtered or unexported fields
}

func (*SetRateTransponderResponse) Descriptor deprecated

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

Deprecated: Use SetRateTransponderResponse.ProtoReflect.Descriptor instead.

func (*SetRateTransponderResponse) GetTransponderResult

func (x *SetRateTransponderResponse) GetTransponderResult() *TransponderResult

func (*SetRateTransponderResponse) ProtoMessage

func (*SetRateTransponderResponse) ProtoMessage()

func (*SetRateTransponderResponse) ProtoReflect

func (*SetRateTransponderResponse) Reset

func (x *SetRateTransponderResponse) Reset()

func (*SetRateTransponderResponse) String

func (x *SetRateTransponderResponse) String() string

type SubscribeTransponderRequest

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

func (*SubscribeTransponderRequest) Descriptor deprecated

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

Deprecated: Use SubscribeTransponderRequest.ProtoReflect.Descriptor instead.

func (*SubscribeTransponderRequest) ProtoMessage

func (*SubscribeTransponderRequest) ProtoMessage()

func (*SubscribeTransponderRequest) ProtoReflect

func (*SubscribeTransponderRequest) Reset

func (x *SubscribeTransponderRequest) Reset()

func (*SubscribeTransponderRequest) String

func (x *SubscribeTransponderRequest) String() string

type TransponderResponse

type TransponderResponse struct {
	Transponder *AdsbVehicle `protobuf:"bytes,1,opt,name=transponder,proto3" json:"transponder,omitempty"` // The next detection
	// contains filtered or unexported fields
}

func (*TransponderResponse) Descriptor deprecated

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

Deprecated: Use TransponderResponse.ProtoReflect.Descriptor instead.

func (*TransponderResponse) GetTransponder

func (x *TransponderResponse) GetTransponder() *AdsbVehicle

func (*TransponderResponse) ProtoMessage

func (*TransponderResponse) ProtoMessage()

func (*TransponderResponse) ProtoReflect

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

func (*TransponderResponse) Reset

func (x *TransponderResponse) Reset()

func (*TransponderResponse) String

func (x *TransponderResponse) String() string

type TransponderResult

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

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

Deprecated: Use TransponderResult.ProtoReflect.Descriptor instead.

func (*TransponderResult) GetResult

func (*TransponderResult) GetResultStr

func (x *TransponderResult) GetResultStr() string

func (*TransponderResult) ProtoMessage

func (*TransponderResult) ProtoMessage()

func (*TransponderResult) ProtoReflect

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

func (*TransponderResult) Reset

func (x *TransponderResult) Reset()

func (*TransponderResult) String

func (x *TransponderResult) String() string

type TransponderResult_Result

type TransponderResult_Result int32

Possible results returned for transponder requests.

const (
	TransponderResult_RESULT_UNKNOWN          TransponderResult_Result = 0 // Unknown result
	TransponderResult_RESULT_SUCCESS          TransponderResult_Result = 1 // Success: the transponder command was accepted by the vehicle
	TransponderResult_RESULT_NO_SYSTEM        TransponderResult_Result = 2 // No system connected
	TransponderResult_RESULT_CONNECTION_ERROR TransponderResult_Result = 3 // Connection error
	TransponderResult_RESULT_BUSY             TransponderResult_Result = 4 // Vehicle is busy
	TransponderResult_RESULT_COMMAND_DENIED   TransponderResult_Result = 5 // Command refused by vehicle
	TransponderResult_RESULT_TIMEOUT          TransponderResult_Result = 6 // Request timed out
)

func (TransponderResult_Result) Descriptor

func (TransponderResult_Result) Enum

func (TransponderResult_Result) EnumDescriptor deprecated

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

Deprecated: Use TransponderResult_Result.Descriptor instead.

func (TransponderResult_Result) Number

func (TransponderResult_Result) String

func (x TransponderResult_Result) String() string

func (TransponderResult_Result) Type

type TransponderServiceClient

type TransponderServiceClient interface {
	// Subscribe to 'transponder' updates.
	SubscribeTransponder(ctx context.Context, in *SubscribeTransponderRequest, opts ...grpc.CallOption) (TransponderService_SubscribeTransponderClient, error)
	// Set rate to 'transponder' updates.
	SetRateTransponder(ctx context.Context, in *SetRateTransponderRequest, opts ...grpc.CallOption) (*SetRateTransponderResponse, error)
}

TransponderServiceClient is the client API for TransponderService 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 TransponderServiceServer

type TransponderServiceServer interface {
	// Subscribe to 'transponder' updates.
	SubscribeTransponder(*SubscribeTransponderRequest, TransponderService_SubscribeTransponderServer) error
	// Set rate to 'transponder' updates.
	SetRateTransponder(context.Context, *SetRateTransponderRequest) (*SetRateTransponderResponse, error)
	// contains filtered or unexported methods
}

TransponderServiceServer is the server API for TransponderService service. All implementations must embed UnimplementedTransponderServiceServer for forward compatibility

type TransponderService_SubscribeTransponderClient

type TransponderService_SubscribeTransponderClient interface {
	Recv() (*TransponderResponse, error)
	grpc.ClientStream
}

type TransponderService_SubscribeTransponderServer

type TransponderService_SubscribeTransponderServer interface {
	Send(*TransponderResponse) error
	grpc.ServerStream
}

type UnimplementedTransponderServiceServer

type UnimplementedTransponderServiceServer struct {
}

UnimplementedTransponderServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedTransponderServiceServer) SetRateTransponder

type UnsafeTransponderServiceServer

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

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

Jump to

Keyboard shortcuts

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