Param
public class Param
Provide raw access to get and set parameters.
-
Initializes a new
Paramplugin.Normally never created manually, but used from the
Dronehelper class instead.Declaration
Swift
public convenience init(address: String = "localhost", port: Int32 = 50051, scheduler: SchedulerType = ConcurrentDispatchQueueScheduler(qos: .background))Parameters
addressThe address of the
MavsdkServerinstance to connect toportThe port of the
MavsdkServerinstance to connect toschedulerThe scheduler to be used by
Observables -
Undocumented
See moreDeclaration
Swift
public struct RuntimeParamError : Error -
Undocumented
See moreDeclaration
Swift
public struct ParamError : Error -
Type for integer parameters.
See moreDeclaration
Swift
public struct IntParam : Equatable -
Type for float parameters.
See moreDeclaration
Swift
public struct FloatParam : Equatable -
Type for custom parameters
See moreDeclaration
Swift
public struct CustomParam : Equatable -
Type collecting all integer, float, and custom parameters.
See moreDeclaration
Swift
public struct AllParams : Equatable -
Result type.
See moreDeclaration
Swift
public struct ParamResult : Equatable -
Get an int parameter.
If the type is wrong, the result will be
WRONG_TYPE.Declaration
Swift
public func getParamInt(name: String) -> Single<Int32>Parameters
nameName of the parameter
-
Set an int parameter.
If the type is wrong, the result will be
WRONG_TYPE.Declaration
Swift
public func setParamInt(name: String, value: Int32) -> CompletableParameters
nameName of the parameter to set
valueValue the parameter should be set to
-
Get a float parameter.
If the type is wrong, the result will be
WRONG_TYPE.Declaration
Swift
public func getParamFloat(name: String) -> Single<Float>Parameters
nameName of the parameter
-
Set a float parameter.
If the type is wrong, the result will be
WRONG_TYPE.Declaration
Swift
public func setParamFloat(name: String, value: Float) -> CompletableParameters
nameName of the parameter to set
valueValue the parameter should be set to
-
Get a custom parameter.
If the type is wrong, the result will be
WRONG_TYPE.Declaration
Swift
public func getParamCustom(name: String) -> Single<String>Parameters
nameName of the parameter
-
Set a custom parameter.
If the type is wrong, the result will be
WRONG_TYPE.Declaration
Swift
public func setParamCustom(name: String, value: String) -> CompletableParameters
nameName of the parameter to set
valueValue the parameter should be set to
-
Get all parameters.
Declaration
Swift
public func getAllParams() -> Single<AllParams>
View on GitHub
Install in Dash
Param Class Reference