class DJIRTKNetworkServiceProvider
@interface DJIRTKNetworkServiceProvider : NSObject
Header: DJIRTKNetworkServiceProvider.h Inherits From: NSObject
Description:
This class is used to control the RTK network service. The DJIRTKNetworkServiceProvider can initiate the communication to a third-party RTK network server. The information from the server can be streamed to the RTK airsystem. SDK will not cache the settings to the disk. The provider should be configured in each life cycle of SDK. The life cycle of the network service provider is independent from the aircraft. Therefore, it can be configured before connecting to DJI aircrafts. It is only support Phantom 4 RTK.
Class Members:
Set Network Service Settings
method
method setNetworkServiceSettings
- (void )setNetworkServiceSettings:(DJIRTKNetworkServiceSettings *)settings
Header: DJIRTKNetworkServiceProvider.h
Description:
Sets the configuration for the network service that provides network reference stations. The network service should use NTRIP (Networked Transport of RTCM via Internet Protocol).
method networkServiceSettings
- (DJIRTKNetworkServiceSettings *_Nullable)networkServiceSettings
Header: DJIRTKNetworkServiceProvider.h
Description:
Gets the configuration for the network service that provides network reference stations. The network service should use NTRIP(Networked Transport of RTCM via Internet Protocol).
Return:
Start Network Service
method
method startNetworkServiceWithCompletion
- (void )startNetworkServiceWithCompletion:(DJICompletionBlock)completion
Header: DJIRTKNetworkServiceProvider.h
Description:
Starts the network service as the reference station. This should be called after setting the network service (setNetworkServiceSettings
).
Stop Network Service
method
method stopNetworkServiceWithCompletion
- (void )stopNetworkServiceWithCompletion:(DJICompletionBlock)completion
Header: DJIRTKNetworkServiceProvider.h
Description:
Stops the network service.
property currentState
@property (nonatomic , readonly ) DJIRTKNetworkServiceState *currentState
Header: DJIRTKNetworkServiceProvider.h
Description:
The current network service state.
See Also:
DJIRTKNetworkServiceState
Add Network Service State Listener
method
method addNetworkServiceStateListener:queue:block
- (void )addNetworkServiceStateListener:(id )listener
queue:(nullable dispatch_queue_t )queue
block:(DJIRTKNetworkServiceStateBlock)block
Header: DJIRTKNetworkServiceProvider.h
Description:
Adds a listener to receive the latest network service state.
id listener Listener to receive network service state. It is used to distinguish different listener and the listener will be retained. nullable dispatch_queue_t queue The dispatch queue to process state. The main queue is used if it is nil
. DJIRTKNetworkServiceStateBlock block The block that process the latest state.
Remove Network Service State Listener
method
method removeNetworkServiceStateListener
- (void )removeNetworkServiceStateListener:(id )listener
Header: DJIRTKNetworkServiceProvider.h
Description:
Removes a listener that is added by passing to addNetworkServiceStateListener:queue:block
.
id listener The listener to remove.
enum DJIRTKNetworkServiceChannelState
typedef NS_ENUM (uint8_t, DJIRTKNetworkServiceChannelState)
Header: DJIRTKServcieBaseTypes.h
Description:
All the possible state of DJIRTKNetworkServiceChannelState
.
Enum Members:
DJIRTKNetworkServiceChannelStateDisabledThe network service is not started. DJIRTKNetworkServiceChannelStateNetworkNotReachableThe network is not reachable from the mobile device. DJIRTKNetworkServiceChannelStateAircraftDisconnectedThe aircraft is not connected. DJIRTKNetworkServiceChannelStateLoginFailureSDK cannot login with the provided username and password. Check error
. DJIRTKNetworkServiceChannelStateReadyThe channel from the server to the aircraft is built up. It is ready for transmission. DJIRTKNetworkServiceChannelStateTransmittingData is transmitting through the channel. DJIRTKNetworkServiceChannelStateDisconnectedThe channel is disconnected and the server is not reachable now. Check error
. DJIRTKNetworkServiceChannelStateUnknownUnknown.
typedef block DJIRTKNetworkServiceStateBlock
typedef void (^_Nullable DJIRTKNetworkServiceStateBlock) (DJIRTKNetworkServiceState *state)
Header: DJIRTKNetworkServiceProvider.h
Description:
Block that receive the network service state.