ActionServer
public class ActionServer
Provide vehicle actions (as a server) such as arming, taking off, and landing.
-
Initializes a new
ActionServer
plugin.Normally never created manually, but used from the
Drone
helper class instead.Declaration
Swift
public convenience init(address: String = "localhost", port: Int32 = 50051, scheduler: SchedulerType = ConcurrentDispatchQueueScheduler(qos: .background))
Parameters
address
The address of the
MavsdkServer
instance to connect toport
The port of the
MavsdkServer
instance to connect toscheduler
The scheduler to be used by
Observable
s -
Undocumented
See moreDeclaration
Swift
public struct RuntimeActionServerError : Error
-
Undocumented
See moreDeclaration
Swift
public struct ActionServerError : Error
-
Flight modes.
For more information about flight modes, check out https://docs.px4.io/master/en/config/flight_mode.html.
See moreDeclaration
Swift
public enum FlightMode : Equatable
-
State to check if the vehicle can transition to respective flightmodes
See moreDeclaration
Swift
public struct AllowableFlightModes : Equatable
-
Arming message type
See moreDeclaration
Swift
public struct ArmDisarm : Equatable
-
Result type.
See moreDeclaration
Swift
public struct ActionServerResult : Equatable
-
Subscribe to ARM/DISARM commands
Declaration
Swift
public lazy var armDisarm: Observable<ArmDisarm> { get set }
-
Subscribe to DO_SET_MODE
Declaration
Swift
public lazy var flightModeChange: Observable<FlightMode> { get set }
-
Subscribe to takeoff command
Declaration
Swift
public lazy var takeoff: Observable<Bool> { get set }
-
Subscribe to land command
Declaration
Swift
public lazy var land: Observable<Bool> { get set }
-
Subscribe to reboot command
Declaration
Swift
public lazy var reboot: Observable<Bool> { get set }
-
Subscribe to shutdown command
Declaration
Swift
public lazy var shutdown: Observable<Bool> { get set }
-
Subscribe to terminate command
Declaration
Swift
public lazy var terminate: Observable<Bool> { get set }
-
Can the vehicle takeoff
Declaration
Swift
public func setAllowTakeoff(allowTakeoff: Bool) -> Completable
Parameters
allowTakeoff
Is takeoff allowed?
-
Can the vehicle arm when requested
Declaration
Swift
public func setArmable(armable: Bool, forceArmable: Bool) -> Completable
Parameters
armable
Is Armable now?
forceArmable
Is armable with force?
-
Can the vehicle disarm when requested
Declaration
Swift
public func setDisarmable(disarmable: Bool, forceDisarmable: Bool) -> Completable
Parameters
disarmable
Is disarmable now?
forceDisarmable
Is disarmable with force? (Kill)
-
Set which modes the vehicle can transition to (Manual always allowed)
Declaration
Swift
public func setAllowableFlightModes(flightModes: AllowableFlightModes) -> Completable
Parameters
flightModes
-
Get which modes the vehicle can transition to (Manual always allowed)
Declaration
Swift
public func getAllowableFlightModes() -> Single<AllowableFlightModes>