nRF5 SDK for Mesh v5.0.0
Modules | Data Structures | Macros | Enumerations
Light LC models

This model implements the message based interface required to set the LC Setup server states. More...

Modules

 Light LC client model interface
 
 Persistence module for the Light LC Setup Server model related states
 This module provides APIs for handling persistence of the Light LC Setup Server model related states.
 
 Light LC Server property constants
 All the information about the format, units and allowed values of the properties can be found in Section 4.1.3 of Bluetooth mesh device properties, Bluetooth mesh device properties XML and Bluetooth mesh characteristics XML.
 
 Light LC (Lightness Control) Setup Server model interface
 This model extends Light LC server, Light Lightness server, Generic Level server, Generic PowerOnOff Setup server, Generic PowerOnOff server, Generic OnOff server, and Generic Default Transition Time server.
 

Data Structures

struct  light_lc_mode_set_params_t
 Unpacked message structure typedefs are used for API interfaces and for implementing model code. More...
 
struct  light_lc_occupancy_mode_set_params_t
 Message format for the Light LC Occupancy Mode set message. More...
 
struct  light_lc_light_onoff_set_params_t
 Message format for the Light LC Light OnOff set message. More...
 
struct  light_lc_property_set_params_t
 Message format for the Light LC Property set message. More...
 
struct  light_lc_property_get_params_t
 Message format for the Light LC Property get message. More...
 
struct  light_lc_mode_status_params_t
 Parameters for the Light LC Mode Status message. More...
 
struct  light_lc_occupancy_mode_status_params_t
 Parameters for the Light LC Occupancy Mode Status message. More...
 
struct  light_lc_light_onoff_status_params_t
 Parameters for the Light LC Light OnOff Status message. More...
 
struct  light_lc_property_status_params_t
 Parameters for the Light LC Property Status message. More...
 

Macros

#define LIGHT_LC_SERVER_COMPANY_ID   (0xFFFF)
 Model Company ID.
 
#define LIGHT_LC_PROPERTY_BUF_SIZE   (4)
 Property size definitions. More...
 
#define LIGHT_LC_MODE_OFF   (0)
 Defines for LC Mode Off value. More...
 
#define LIGHT_LC_DEFAULT_MODE   (0x0)
 Defines default value for the Light LC Mode state. More...
 
#define LIGHT_LC_DEFAULT_OCC_MODE   (0x0)
 Defines default value for the Light LC Occupancy Mode state. More...
 
#define LIGHT_LC_DEFAULT_LIGHT_ONOFF   (0x0)
 Defines default value for the Light LC Light OnOff state.
 
#define LIGHT_LC_DEFAULT_PR_LUXLEVEL_ON   (75000)
 Defines default value for the Light Control Ambient LuxLevel On Property representing the Ambient LuxLevel that determines if the controller transitions from the Standby to Run states. More...
 
#define LIGHT_LC_DEFAULT_PR_LUXLEVEL_PROLONG   (20000)
 Defines default value for the Light Control Ambient LuxLevel Prolong Property representing the Ambient LuxLevel in the Prolong state. More...
 
#define LIGHT_LC_DEFAULT_PR_LUXLEVEL_STANDBY   (7000)
 Defines default value for the Light Control Ambient LuxLevel Standby Property representing the lowest Ambient LuxLevel at the Standby state. More...
 
#define LIGHT_LC_DEFAULT_PR_LIGHTNESS_ON   (0xAFFF)
 Defines default value for the Light Control Lightness On Property representing the minimum value for lightness in the Run and Occupancy states. More...
 
#define LIGHT_LC_DEFAULT_PR_LIGHTNESS_PROLONG   (0x3FFF)
 Defines default value for the Light Control Lightness Prolong Property representing the minimum value for lightness in the Prolong state. More...
 
#define LIGHT_LC_DEFAULT_PR_LIGHTNESS_STANDBY   (0x1000)
 Defines default value for the Light Control Lightness Standby Property representing the minimum light level for lightness in the Standby state. More...
 
#define LIGHT_LC_DEFAULT_PR_REGULATOR_ACCURACY   (4)
 Defines default value for the Light Control Regulator Accuracy Property representing the percentage accuracy of the Light LC PI Feedback Regulator. More...
 
#define LIGHT_LC_DEFAULT_PR_REGULATOR_KIU   (250.0)
 Defines default value for the Light Control Regulator Kiu Property representing the integral coefficient that determines the integral part of the equation defining the output of the Light LC PI Feedback Regulator, when Light LC Ambient LuxLevel is less than LuxLevel Out. More...
 
#define LIGHT_LC_DEFAULT_PR_REGULATOR_KID   (25.0)
 Defines default value for the Light Control Regulator Kid Property representing the integral coefficient that determines the integral part of the equation defining the output of the Light LC PI Feedback Regulator, when Light LC Ambient LuxLevel is greater than or equal to the value of the LuxLevel Out state. More...
 
#define LIGHT_LC_DEFAULT_PR_REGULATOR_KPU   (80.0)
 Defines default value for the Light Control Regulator Kpu Property representing the proportional coefficient that determines the proportional part of the equation defining the output of the Light LC PI Feedback Regulator, when Light LC Ambient LuxLevel is less than the value of the LuxLevel Out state. More...
 
#define LIGHT_LC_DEFAULT_PR_REGULATOR_KPD   (80.0)
 Defines default value for the Light Control Regulator Kpd Property representing the proportional coefficient that determines the proportional part of the equation defining the output of the Light LC PI Feedback Regulator, when Light LC Ambient LuxLevel is greater than or equal to the value of the LuxLevel Out state. More...
 
#define LIGHT_LC_DEFAULT_PR_TIME_FADE_MS   (4500)
 Defines default value for the Light Control Time Fade Property that represents the time in milliseconds a light takes to transition from the Run state to the Prolong state. More...
 
#define LIGHT_LC_DEFAULT_PR_TIME_FADE_ON_MS   (2000)
 Defines default value for the Light Control Time Fade On Property that represents the time in milliseconds a light takes to transition from the Standby state to the Run state. More...
 
#define LIGHT_LC_DEFAULT_PR_TIME_FADE_STANDBY_AUTO_MS   (3500)
 Defines default value for the Light Control Time Fade Standby Property that represents the time in milliseconds a light transition from the Prolong state to the Standby state when the transition is automatic (such as when triggered by an occupancy or light sensor). More...
 
#define LIGHT_LC_DEFAULT_PR_TIME_FADE_STANDBY_MANUAL_MS   (3500)
 Defines default value for the Light Control Time Fade Standby Manual Property that represents the time in milliseconds a light take to transition from the Prolong state to the Standby state when the transition is triggered by a manual operation (for example by a user operating a light switch). More...
 
#define LIGHT_LC_DEFAULT_PR_TIME_PROLONG_MS   (7000)
 Defines default value for the Light Control Time Prolong Property that represents the duration of the Prolong state which is the state of a device between its run state and its standby state. More...
 
#define LIGHT_LC_DEFAULT_PR_TIME_RUN_ON_MS   (10000)
 Defines default value for the Light Control Time Run On Property that represents the duration in milliseconds of the Run state after last occupancy was detected (the occupancy input stopped detecting active occupancy information). More...
 
#define LIGHT_LC_DEFAULT_PR_TIME_OCCUPANCY_DELAY_MS   (0)
 Defines default value for the Light Control Occupancy Delay Property that represents the time delay in milliseconds between receiving a signal from an occupancy sensor (Sensor Status message) and a light controller executing a state change as a result of the signal. More...
 
#define LIGHT_LC_LIGHT_PI_SUMMATION_INTERVAL_MS   (100)
 Product-specific value for the summation interval used by the Light LC PI Feedback Regulator. More...
 
#define LIGHT_LC_LIGHT_PI_SUMMATION_INTERVAL_MIN_MS   (10)
 Defines minimum value for the summation interval used by the Light LC Pi Feedback Regulator.
 
#define LIGHT_LC_LIGHT_PI_SUMMATION_INTERVAL_MAX_MS   (100)
 Defines maximum value for the summation interval used by the Light LC Pi Feedback Regulator.
 
#define LIGHT_LC_LIGHT_PI_CONVERSION_DIVISOR   (50)
 Conversion divisor from a lux level to a linear lightness level. More...
 

Enumerations

enum  light_lc_state_t {
  LIGHT_LC_STATE_NULL_ENTRY, LIGHT_LC_STATE_LIGHT_LC_MODE, LIGHT_LC_STATE_LIGHT_LC_OCC_MODE, LIGHT_LC_STATE_LIGHT_LC_LIGHT_ONOFF,
  LIGHT_LC_STATE_AMBIENT_LUXLEVEL_ON, LIGHT_LC_STATE_AMBIENT_LUXLEVEL_PROLONG, LIGHT_LC_STATE_AMBIENT_LUXLEVEL_STANDBY, LIGHT_LC_STATE_LIGHTNESS_ON,
  LIGHT_LC_STATE_LIGHTNESS_PROLONG, LIGHT_LC_STATE_LIGHTNESS_STANDBY, LIGHT_LC_STATE_REGULATOR_ACCURACY, LIGHT_LC_STATE_REGULATOR_KID,
  LIGHT_LC_STATE_REGULATOR_KIU, LIGHT_LC_STATE_REGULATOR_KPD, LIGHT_LC_STATE_REGULATOR_KPU, LIGHT_LC_STATE_TIME_FADE,
  LIGHT_LC_STATE_TIME_FADE_ON, LIGHT_LC_STATE_TIME_FADE_STANDBY_AUTO, LIGHT_LC_STATE_TIME_FADE_STANDBY_MANUAL, LIGHT_LC_STATE_TIME_OCCUPANCY_DELAY,
  LIGHT_LC_STATE_TIME_PROLONG, LIGHT_LC_STATE_TIME_RUN_ON
}
 Enum for to determine which state data variable is being set/gotten.
 

Detailed Description

This model implements the message based interface required to set the LC Setup server states.

The model sends its state information to the mid app to be stored in flash (to be read at boot time) and use it appropriately. The Light Lightness Setup server model must be used along with this model for the complete LC Setup server model functionality. Refer to Light LC Setup Server behaviour to see how this can be done.

Macro Definition Documentation

◆ LIGHT_LC_PROPERTY_BUF_SIZE

#define LIGHT_LC_PROPERTY_BUF_SIZE   (4)

Property size definitions.

Although the property value field is a variable size, it is never bigger than 4 bytes. So we set 4 bytes to be used as buffer size.

Definition at line 64 of file light_lc_common.h.

◆ LIGHT_LC_MODE_OFF

#define LIGHT_LC_MODE_OFF   (0)

Defines for LC Mode Off value.

Definition at line 67 of file light_lc_common.h.

◆ LIGHT_LC_DEFAULT_MODE

#define LIGHT_LC_DEFAULT_MODE   (0x0)

Defines default value for the Light LC Mode state.

The default value is defined in Bluetooth Mesh Model Specification (MshMDLv1.0.1) section 6.2.3.1.

Definition at line 75 of file light_lc_common.h.

◆ LIGHT_LC_DEFAULT_OCC_MODE

#define LIGHT_LC_DEFAULT_OCC_MODE   (0x0)

Defines default value for the Light LC Occupancy Mode state.

The default value is defined in Bluetooth Mesh Model Specification (MshMDLv1.0.1) section 6.2.3.2.

Definition at line 84 of file light_lc_common.h.

◆ LIGHT_LC_DEFAULT_PR_LUXLEVEL_ON

#define LIGHT_LC_DEFAULT_PR_LUXLEVEL_ON   (75000)

Defines default value for the Light Control Ambient LuxLevel On Property representing the Ambient LuxLevel that determines if the controller transitions from the Standby to Run states.

See Bluetooth mesh device properties XML about the data format of the characteristic referenced by this property.

Definition at line 99 of file light_lc_common.h.

◆ LIGHT_LC_DEFAULT_PR_LUXLEVEL_PROLONG

#define LIGHT_LC_DEFAULT_PR_LUXLEVEL_PROLONG   (20000)

Defines default value for the Light Control Ambient LuxLevel Prolong Property representing the Ambient LuxLevel in the Prolong state.

See Bluetooth mesh device properties XML about the data format of the characteristic referenced by this property.

Definition at line 109 of file light_lc_common.h.

◆ LIGHT_LC_DEFAULT_PR_LUXLEVEL_STANDBY

#define LIGHT_LC_DEFAULT_PR_LUXLEVEL_STANDBY   (7000)

Defines default value for the Light Control Ambient LuxLevel Standby Property representing the lowest Ambient LuxLevel at the Standby state.

See Bluetooth mesh device properties XML about the data format of the characteristic referenced by this property.

Definition at line 119 of file light_lc_common.h.

◆ LIGHT_LC_DEFAULT_PR_LIGHTNESS_ON

#define LIGHT_LC_DEFAULT_PR_LIGHTNESS_ON   (0xAFFF)

Defines default value for the Light Control Lightness On Property representing the minimum value for lightness in the Run and Occupancy states.

See Bluetooth mesh device properties XML about the data format of the characteristic referenced by this property.

Definition at line 129 of file light_lc_common.h.

◆ LIGHT_LC_DEFAULT_PR_LIGHTNESS_PROLONG

#define LIGHT_LC_DEFAULT_PR_LIGHTNESS_PROLONG   (0x3FFF)

Defines default value for the Light Control Lightness Prolong Property representing the minimum value for lightness in the Prolong state.

See Bluetooth mesh device properties XML about the data format of the characteristic referenced by this property.

Definition at line 139 of file light_lc_common.h.

◆ LIGHT_LC_DEFAULT_PR_LIGHTNESS_STANDBY

#define LIGHT_LC_DEFAULT_PR_LIGHTNESS_STANDBY   (0x1000)

Defines default value for the Light Control Lightness Standby Property representing the minimum light level for lightness in the Standby state.

See Bluetooth mesh device properties XML about the data format of the characteristic referenced by this property.

Definition at line 149 of file light_lc_common.h.

◆ LIGHT_LC_DEFAULT_PR_REGULATOR_ACCURACY

#define LIGHT_LC_DEFAULT_PR_REGULATOR_ACCURACY   (4)

Defines default value for the Light Control Regulator Accuracy Property representing the percentage accuracy of the Light LC PI Feedback Regulator.

See Bluetooth mesh device properties XML about the data format of the characteristic referenced by this property.

Definition at line 159 of file light_lc_common.h.

◆ LIGHT_LC_DEFAULT_PR_REGULATOR_KIU

#define LIGHT_LC_DEFAULT_PR_REGULATOR_KIU   (250.0)

Defines default value for the Light Control Regulator Kiu Property representing the integral coefficient that determines the integral part of the equation defining the output of the Light LC PI Feedback Regulator, when Light LC Ambient LuxLevel is less than LuxLevel Out.

The default value is defined in Bluetooth Mesh Model Specification (MshMDLv1.0.1) section 6.2.4.14.

See Bluetooth mesh device properties XML about the data format of the characteristic referenced by this property.

Definition at line 173 of file light_lc_common.h.

◆ LIGHT_LC_DEFAULT_PR_REGULATOR_KID

#define LIGHT_LC_DEFAULT_PR_REGULATOR_KID   (25.0)

Defines default value for the Light Control Regulator Kid Property representing the integral coefficient that determines the integral part of the equation defining the output of the Light LC PI Feedback Regulator, when Light LC Ambient LuxLevel is greater than or equal to the value of the LuxLevel Out state.

The default value is defined in Bluetooth Mesh Model Specification (MshMDLv1.0.1) section 6.2.4.15.

See Bluetooth mesh device properties XML about the data format of the characteristic referenced by this property.

Definition at line 187 of file light_lc_common.h.

◆ LIGHT_LC_DEFAULT_PR_REGULATOR_KPU

#define LIGHT_LC_DEFAULT_PR_REGULATOR_KPU   (80.0)

Defines default value for the Light Control Regulator Kpu Property representing the proportional coefficient that determines the proportional part of the equation defining the output of the Light LC PI Feedback Regulator, when Light LC Ambient LuxLevel is less than the value of the LuxLevel Out state.

The default value is defined in Bluetooth Mesh Model Specification (MshMDLv1.0.1) section 6.2.4.16.

See Bluetooth mesh device properties XML about the data format of the characteristic referenced by this property.

Definition at line 201 of file light_lc_common.h.

◆ LIGHT_LC_DEFAULT_PR_REGULATOR_KPD

#define LIGHT_LC_DEFAULT_PR_REGULATOR_KPD   (80.0)

Defines default value for the Light Control Regulator Kpd Property representing the proportional coefficient that determines the proportional part of the equation defining the output of the Light LC PI Feedback Regulator, when Light LC Ambient LuxLevel is greater than or equal to the value of the LuxLevel Out state.

The default value is defined in Bluetooth Mesh Model Specification (MshMDLv1.0.1) section 6.2.4.17.

See Bluetooth mesh device properties XML about the data format of the characteristic referenced by this property.

Definition at line 215 of file light_lc_common.h.

◆ LIGHT_LC_DEFAULT_PR_TIME_FADE_MS

#define LIGHT_LC_DEFAULT_PR_TIME_FADE_MS   (4500)

Defines default value for the Light Control Time Fade Property that represents the time in milliseconds a light takes to transition from the Run state to the Prolong state.

See Bluetooth mesh device properties XML about the data format of the characteristic referenced by this property.

Definition at line 225 of file light_lc_common.h.

◆ LIGHT_LC_DEFAULT_PR_TIME_FADE_ON_MS

#define LIGHT_LC_DEFAULT_PR_TIME_FADE_ON_MS   (2000)

Defines default value for the Light Control Time Fade On Property that represents the time in milliseconds a light takes to transition from the Standby state to the Run state.

See Bluetooth mesh device properties XML about the data format of the characteristic referenced by this property.

Definition at line 235 of file light_lc_common.h.

◆ LIGHT_LC_DEFAULT_PR_TIME_FADE_STANDBY_AUTO_MS

#define LIGHT_LC_DEFAULT_PR_TIME_FADE_STANDBY_AUTO_MS   (3500)

Defines default value for the Light Control Time Fade Standby Property that represents the time in milliseconds a light transition from the Prolong state to the Standby state when the transition is automatic (such as when triggered by an occupancy or light sensor).

See Bluetooth mesh device properties XML about the data format of the characteristic referenced by this property.

Definition at line 246 of file light_lc_common.h.

◆ LIGHT_LC_DEFAULT_PR_TIME_FADE_STANDBY_MANUAL_MS

#define LIGHT_LC_DEFAULT_PR_TIME_FADE_STANDBY_MANUAL_MS   (3500)

Defines default value for the Light Control Time Fade Standby Manual Property that represents the time in milliseconds a light take to transition from the Prolong state to the Standby state when the transition is triggered by a manual operation (for example by a user operating a light switch).

See Bluetooth mesh device properties XML about the data format of the characteristic referenced by this property.

Definition at line 257 of file light_lc_common.h.

◆ LIGHT_LC_DEFAULT_PR_TIME_PROLONG_MS

#define LIGHT_LC_DEFAULT_PR_TIME_PROLONG_MS   (7000)

Defines default value for the Light Control Time Prolong Property that represents the duration of the Prolong state which is the state of a device between its run state and its standby state.

See Bluetooth mesh device properties XML about the data format of the characteristic referenced by this property.

Definition at line 268 of file light_lc_common.h.

◆ LIGHT_LC_DEFAULT_PR_TIME_RUN_ON_MS

#define LIGHT_LC_DEFAULT_PR_TIME_RUN_ON_MS   (10000)

Defines default value for the Light Control Time Run On Property that represents the duration in milliseconds of the Run state after last occupancy was detected (the occupancy input stopped detecting active occupancy information).

See Bluetooth mesh device properties XML about the data format of the characteristic referenced by this property.

Definition at line 279 of file light_lc_common.h.

◆ LIGHT_LC_DEFAULT_PR_TIME_OCCUPANCY_DELAY_MS

#define LIGHT_LC_DEFAULT_PR_TIME_OCCUPANCY_DELAY_MS   (0)

Defines default value for the Light Control Occupancy Delay Property that represents the time delay in milliseconds between receiving a signal from an occupancy sensor (Sensor Status message) and a light controller executing a state change as a result of the signal.

See Bluetooth mesh device properties XML about the data format of the characteristic referenced by this property.

Definition at line 290 of file light_lc_common.h.

◆ LIGHT_LC_LIGHT_PI_SUMMATION_INTERVAL_MS

#define LIGHT_LC_LIGHT_PI_SUMMATION_INTERVAL_MS   (100)

Product-specific value for the summation interval used by the Light LC PI Feedback Regulator.

Shall be within [LIGHT_LC_LIGHT_PI_SUMMATION_INTERVAL_MIN_MS, LIGHT_LC_LIGHT_PI_SUMMATION_INTERVAL_MAX_MS] range.

Definition at line 299 of file light_lc_common.h.

◆ LIGHT_LC_LIGHT_PI_CONVERSION_DIVISOR

#define LIGHT_LC_LIGHT_PI_CONVERSION_DIVISOR   (50)

Conversion divisor from a lux level to a linear lightness level.

This conversion divisor is a tuning feature that allows the vendor to specify a divisor instead of a conversion function. The divisor changes based on the sensitivity and the general distance of the light sensor from the light, and the angle at which the light hits the sensor.

Note
This variable is not defined in the mesh model specification and there is no definition of a conversion function to the lightness level.

Definition at line 319 of file light_lc_common.h.


Documentation feedback | Developer Zone | Subscribe | Updated