class DJIBaseProduct
@interface DJIBaseProduct : NSObject
Header: DJIBaseProduct.h Inherits From: NSObject
Description:
Abstract class for all DJI Products. DJIAircraft
and DJIHandheld
objects are subclasses of DJIBaseProduct
and can be accessed from product
in DJISDKManager
. Additional components can be found in DJIAircraft
and DJIHandheld
that are unique to those products only.
Class Members:
property delegate
@property (nonatomic , weak ) id <DJIBaseProductDelegate> delegate
Description:
Used to notify user of changes in connectivity between the DJI product and the mobile device, changes in components that are part of the product, and diagnostic information from the product.
See Also:
DJIBaseProductDelegate
method getFirmwarePackageVersionWithCompletion
- (void )getFirmwarePackageVersionWithCompletion:(void (^)(NSString *_Nullable version, NSError *_Nullable error))block
Description:
Gets the product's firmware package version. Products other than Phantom 4, Phantom 4 Pro, Mavic Pro, and Inspire 2, require internet connection. The execution time for this method depends on the speed of internet connectivity.
NSString *_Nullable version The product's firmware package version. NSError *_Nullable error Error retrieving the value. void (^)(NSString *_Nullable version, NSError *_Nullable error) block Completion block to receive the asynchronous result.
method setName:withCompletion
- (void )setName:(NSString *)name withCompletion:(DJICompletionBlock)completion
Description:
Retrieves the model of the product.
NSString * name Name to be set to the aircraft. DJICompletionBlock completion Asynchronous execution result.
method getNameWithCompletion
- (void )getNameWithCompletion:(void (^)(NSString *_Nullable name, NSError *_Nullable error))completion
Description:
Retrieves the model of the product.
NSString *_Nullable name The device's name. NSError *_Nullable error Error retrieving the value. void (^)(NSString *_Nullable name, NSError *_Nullable error) completion Asynchronous execution result with name.
method isFirmwareVersion:newerThanVersion
- (BOOL )isFirmwareVersion:(NSString *)versionToTest newerThanVersion:(NSString *)otherVersion
Description:
Utility method to compare a version to the other.
NSString * versionToTest Version string to compare. NSString * otherVersion Version string to compare.
Return:
property model
@property (nonatomic , strong , readonly ) NSString *_Nullable model
Description:
Retrieves the model of the product. See DJIAircraft
and DJIHandheld
for the possible strings that can be returned.
property camera
@property (nonatomic , readonly ) DJICamera *_Nullable camera
Description:
Retrieves an instance of the device's camera.
See Also:
DJICamera
property battery
@property (nonatomic , readonly ) DJIBattery *_Nullable battery
Description:
Retrieves an instance of the product's smart battery. When using products with multiple batteries, such as the M600 or Inspire 2, use batteries
, as this method will only return a single battery.
See Also:
DJIBattery
property gimbal
@property (nonatomic , readonly ) DJIGimbal *_Nullable gimbal
Description:
Retrieves an instance of the device's gimbal.
See Also:
DJIGimbal
property airLink
@property (nonatomic , readonly ) DJIAirLink *_Nullable airLink
Description:
Retrieves an instance of the device's AirLink.
See Also:
DJIAirLink
property videoFeeder
@property (nonatomic , readonly , nullable ) DJIVideoFeeder *videoFeeder
Description:
The videoFeeder.
See Also:
DJIVideoFeeder
protocol DJIBaseProductDelegate
@protocol DJIBaseProductDelegate <NSObject >
Header: DJIBaseProduct.h Inherits From: NSObject
Description:
This protocol provides delegate methods that notify user of changes in connectivity between the DJI product and the mobile device, changes in components that are part of the product, and diagnostic information from the product.
Protocol Methods:
CompletionBlock
typedef block
typedef block DJICompletionBlock
typedef void (^_Nullable DJICompletionBlock)(NSError *_Nullable error)
Description:
Completion block for asynchronous operations. This completion block is used for methods that return at an unknown future time.
NSError *_Nullable error An error object if an error occurred during async operation, or nil
if no error occurred.