DJI Windows SDK Documentation

class SpotLightHandler

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

This class represents the spotlight accessory mounted on the aircraft. It provides methods to control the spotlight and get the related states. It is a sub-component and managed by AccessoryHandler.

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 AccessoryHandler to which this component belongs to. The default product index is 0.

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

The sub 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.

method ~SpotLightHandler
~SpotLightHandler()
Declaration:DJI.WindowsSDK.Components
Description:

The destructor. It should not be called explicitly.

method SetBrightnessAsync
async Task<SDKError> SetBrightnessAsync(IntMsg value)
Declaration:DJI.WindowsSDK.Components
Description:

Sets the brightness of the spotlight. The valid range is [1, 100]. 100 means the brightest.

Input Parameters:
IntMsg valueA parameter object of type IntMsg.
Return:
async Task<SDKError>A Task<SDKErrorCode> object.
event BrightnessChanged
event IntMsgChangedEventHandler BrightnessChanged
Declaration:DJI.WindowsSDK.Components
Description:

Subscribe the event to receive changes of brightness of SpotLight. The valid range is [1, 100]. 100 means the brightest.

event BrightnessRangeChanged
event IntMinMaxChangedEventHandler BrightnessRangeChanged
Declaration:DJI.WindowsSDK.Components
Description:

Subscribe the event to receive changes of brightness range of SpotLight.

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

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

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

Subscribe the event to receive changes of whether

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

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

event TemperatureChanged
event DoubleMsgChangedEventHandler TemperatureChanged
Declaration:DJI.WindowsSDK.Components
Description:

Subscribe the event to receive changes of temperature of SpotLight.

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

Gets the brightness.

Return:
async Task<ResultValue<IntMsg?>>A Task<ResultValue<Value_IntMsg?>> object.
method GetBrightnessRangeAsync
async Task<ResultValue<IntMinMax?>> GetBrightnessRangeAsync()
Declaration:DJI.WindowsSDK.Components
Description:

Gets the brightness range. The valid range is [1, 100]. 100 means the brightest.

Return:
async Task<ResultValue<IntMinMax?>>A Task<ResultValue<Value_IntMinMax?>> object.
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 GetIsSpotLightOpenedAsync
async Task<ResultValue<BoolMsg?>> GetIsSpotLightOpenedAsync()
Declaration:DJI.WindowsSDK.Components
Description:

Gets if the SpotLight opened.

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.
method GetTemperatureAsync
async Task<ResultValue<DoubleMsg?>> GetTemperatureAsync()
Declaration:DJI.WindowsSDK.Components
Description:

Gets the temperature of the SpotLight.

Return:
async Task<ResultValue<DoubleMsg?>>A Task<ResultValue<Value_DoubleMsg?>> object.
method SetIsSpotLightOpenedAsync
async Task<SDKError> SetIsSpotLightOpenedAsync(BoolMsg value)
Declaration:DJI.WindowsSDK.Components
Description:

Sets whether the SpotLight opened.

Input Parameters:
BoolMsg valueA parameter object of type BoolMsg.
Return:
async Task<SDKError>A Task<SDKErrorCode> object.