Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
Documentation
SDLLightState

SDLLightState Class Reference

Section Contents

Overview

Current light control state

@since RPC 5.0

-initWithId:status:

Constructs a newly allocated SDLLightState object with given parameters

Objective-C

- (nonnull instancetype)initWithId:(nonnull SDLLightName)id
                            status:(nonnull SDLLightStatus)status;

Swift

init(id: SDLLightName, status: SDLLightStatus)

Parameters

id

The name of a light or a group of lights

status

Reflects the status of Light.

Return Value

An instance of the SDLLightState class

-initWithId:status:density:color:

Constructs a newly allocated SDLLightState object with given parameters

Objective-C

- (nonnull instancetype)initWithId:(nonnull SDLLightName)id
                            status:(nonnull SDLLightStatus)status
                           density:(double)density
                             color:(nonnull SDLRGBColor *)color;

Swift

init(id: SDLLightName, status: SDLLightStatus, density: Double, color: SDLRGBColor)

Parameters

id

The name of a light or a group of lights

status

Reflects the status of Light.

density

Reflects the density of Light.

color

Reflects the color of Light.

Return Value

An instance of the SDLLightState class

-initWithId:lightStatus:lightDensity:lightColor:

Constructs a newly allocated SDLLightState object with given parameters

Objective-C

- (nonnull instancetype)initWithId:(nonnull SDLLightName)id
                       lightStatus:(nonnull SDLLightStatus)lightStatus
                      lightDensity:(double)lightDensity
                        lightColor:(nonnull UIColor *)lightColor;

Swift

init(id: SDLLightName, lightStatus: SDLLightStatus, lightDensity: Double, lightColor: UIColor)

Parameters

id

The name of a light or a group of lights

lightStatus

Reflects the status of Light.

lightDensity

Reflects the density of Light.

lightColor

Reflects the color of Light.

Return Value

An instance of the SDLLightState class

id

@abstract The name of a light or a group of lights

Required, SDLLightName

Objective-C

@property (nonatomic, strong) SDLLightName _Nonnull id;

Swift

var id: SDLLightName { get set }

status

@abstract Reflects the status of Light.

Required, SDLLightStatus

Objective-C

@property (nonatomic, strong) SDLLightStatus _Nonnull status;

Swift

var status: SDLLightStatus { get set }

density

@abstract Reflects the density of Light.

Optional, Float type with minValue: 0 maxValue:1

Objective-C

@property (nonatomic, copy, nullable) NSNumber<SDLFloat> *density;

Swift

@NSCopying var density: (NSNumber & SDLFloat)? { get set }

color

@abstract Reflects the color of Light.

Optional, SDLLightStatus

Objective-C

@property (nonatomic, strong, nullable) SDLRGBColor *color;

Swift

var color: SDLRGBColor? { get set }
View on GitHub.com
Previous Section Next Section