DJI Windows SDK Documentation

class AccessoryHandler

sealed class AccessoryHandler
Declaration:DJI.WindowsSDK.Components
Description:

This class contains methods to get instances of its sub-components, which contains the actual methods of specific accessories.

Class Members:
property
property ProductIndex
uint ProductIndex { get; }
Declaration:DJI.WindowsSDK.Components
Description:

The index of the product to which this component handler belongs. The default product index is 0.

property ComponentIndex
uint ComponentIndex { get; }
Declaration:DJI.WindowsSDK.Components
Description:

The index of the component. It is unique for a type of components inside a product. It is useful when a product has multiple handlers of the same kind. If the product only has one handler of this kind, the index is 0. AccessoryHandler contains some sub-component of accessories.

method GetBeaconHandler
BeaconHandler GetBeaconHandler(uint subComponentIndex)
Declaration:DJI.WindowsSDK.Components
Description:

Gets the instance of BeaconHandler.

Input Parameters:
uint subComponentIndexThe sub-component index of the sub-component handler. It is used when the product supports multiple sub-components of the same kind.
Return:
BeaconHandlerThe handler. It is accessible even the component is not connected.
method GetSpeakerHandler
SpeakerHandler GetSpeakerHandler(uint subComponentIndex)
Declaration:DJI.WindowsSDK.Components
Description:

Gets the instance of SpeakerHandler.

Input Parameters:
uint subComponentIndexThe sub-component index of the sub-component handler. It is used when the product supports multiple sub-components of the same kind.
Return:
SpeakerHandlerThe handler. It is accessible even the component is not connected.
method GetSpotLightHandler
SpotLightHandler GetSpotLightHandler(uint subComponentIndex)
Declaration:DJI.WindowsSDK.Components
Description:

Gets the instance of SpotLightHandler.

Input Parameters:
uint subComponentIndexThe sub-component index of the sub-component handler. It is used when the product supports multiple sub-components of the same kind.
Return:
SpotLightHandlerThe handler. It is accessible even the component is not connected.
method ~AccessoryHandler
~AccessoryHandler()
Declaration:DJI.WindowsSDK.Components
Description:

The destructor. It should not be called explicitly.

event ConnectionChanged
event BoolMsgChangedEventHandler ConnectionChanged
Declaration:DJI.WindowsSDK.Components
Description:

Subscribe the event to receive a component's connection change.

event IsSupportedChanged
event BoolMsgChangedEventHandler IsSupportedChanged
Declaration:DJI.WindowsSDK.Components
Description:

Is accssories supported by the aircraft.

event SerialNumberChanged
event StringMsgChangedEventHandler SerialNumberChanged
Declaration:DJI.WindowsSDK.Components
Description:

Subscribe the event to receive changes of the serial number of the component.

Methods
method
method GetConnectionAsync
async Task<ResultValue<BoolMsg?>> GetConnectionAsync()
Declaration:DJI.WindowsSDK.Components
Description:

Determines if a component is connected or not.

Return:
async Task<ResultValue<BoolMsg?>>A Task<ResultValue<Value_BoolMsg?>> object.
method GetIsSupportedAsync
async Task<ResultValue<BoolMsg?>> GetIsSupportedAsync()
Declaration:DJI.WindowsSDK.Components
Description:

Gets is the accssories supported.

Return:
async Task<ResultValue<BoolMsg?>>A Task<ResultValue<Value_BoolMsg?>> object.
method GetSerialNumberAsync
async Task<ResultValue<StringMsg?>> GetSerialNumberAsync()
Declaration:DJI.WindowsSDK.Components
Description:

Gets the serial number of the component.

Return:
async Task<ResultValue<StringMsg?>>A Task<ResultValue<Value_StringMsg?>> object.