Unify Framework Lib 1.7.0
unify_dotdot_attribute_store_command_callbacks_window_covering.c File Reference

Macros

#define LOG_TAG    "unify_dotdot_attribute_store_window_covering_commands_callbacks"
 
#define ATTRIBUTE(type)   DOTDOT_ATTRIBUTE_ID_WINDOW_COVERING_##type
 

Functions

static uint16_t get_installed_open_limit_lift (dotdot_unid_t unid, dotdot_endpoint_id_t endpoint)
 Finds the WindowCovering::InstalledOpenLimitLift value for a UNID/ep. More...
 
static uint16_t get_installed_closed_limit_lift (dotdot_unid_t unid, dotdot_endpoint_id_t endpoint)
 Finds the WindowCovering::InstalledClosedLimitLift value for a UNID/ep. More...
 
static uint16_t get_installed_open_limit_tilt (dotdot_unid_t unid, dotdot_endpoint_id_t endpoint)
 Finds the WindowCovering::InstalledOpenLimitTilt value for a UNID/ep. More...
 
static uint16_t get_installed_closed_limit_tilt (dotdot_unid_t unid, dotdot_endpoint_id_t endpoint)
 Finds the WindowCovering::InstalledClosedLimitTilt value for a UNID/ep. More...
 
static bool dotdot_is_supported_window_covering_lift (dotdot_unid_t unid, dotdot_endpoint_id_t endpoint, bool percent)
 Finds if WindowCovering lift feature is supported for a UNID/ep. More...
 
static bool dotdot_is_supported_window_covering_tilt (dotdot_unid_t unid, dotdot_endpoint_id_t endpoint, bool percent)
 Finds if WindowCovering tilt feature is supported for a UNID/ep. More...
 
static void on_mode_update (attribute_store_node_t node, attribute_store_change_t change)
 Process changes request to mode attribute and takes necessary action. More...
 
static sl_status_t up_or_open_command (dotdot_unid_t unid, dotdot_endpoint_id_t endpoint, uic_mqtt_dotdot_callback_call_type_t call_type)
 
static sl_status_t down_or_close_command (dotdot_unid_t unid, dotdot_endpoint_id_t endpoint, uic_mqtt_dotdot_callback_call_type_t call_type)
 
static sl_status_t stop_command (dotdot_unid_t unid, dotdot_endpoint_id_t endpoint, uic_mqtt_dotdot_callback_call_type_t call_type)
 
static sl_status_t go_to_lift_value_command (dotdot_unid_t unid, dotdot_endpoint_id_t endpoint, uic_mqtt_dotdot_callback_call_type_t call_type, uint16_t lift_value)
 
static sl_status_t go_to_lift_percentage_command (dotdot_unid_t unid, dotdot_endpoint_id_t endpoint, uic_mqtt_dotdot_callback_call_type_t call_type, uint8_t lift_percentage)
 
static sl_status_t go_to_tilt_value_command (dotdot_unid_t unid, dotdot_endpoint_id_t endpoint, uic_mqtt_dotdot_callback_call_type_t call_type, uint16_t tilt_value)
 
static sl_status_t go_to_tilt_percentage_command (dotdot_unid_t unid, dotdot_endpoint_id_t endpoint, uic_mqtt_dotdot_callback_call_type_t call_type, uint8_t tilt_percentage)
 
void window_covering_cluster_mapper_init ()
 Intitialise the WindowCovering command mapping. More...
 

Variables

const uint16_t DEFAULT_INSTALLED_OPEN_LIMIT_LIFT = 0x00
 
const uint16_t DEFAULT_INSTALLED_CLOSED_LIMIT_LIFT = 65535
 
const uint16_t DEFAULT_INSTALLED_OPEN_LIMIT_TILT = 0x00
 
const uint16_t DEFAULT_INSTALLED_CLOSED_LIMIT_TILT = 65535
 

Macro Definition Documentation

◆ ATTRIBUTE

#define ATTRIBUTE (   type)    DOTDOT_ATTRIBUTE_ID_WINDOW_COVERING_##type

◆ LOG_TAG

#define LOG_TAG    "unify_dotdot_attribute_store_window_covering_commands_callbacks"

Function Documentation

◆ dotdot_is_supported_window_covering_lift()

static bool dotdot_is_supported_window_covering_lift ( dotdot_unid_t  unid,
dotdot_endpoint_id_t  endpoint,
bool  percent 
)
static

Finds if WindowCovering lift feature is supported for a UNID/ep.

Parameters
unidUNID of the node we want to get the information for
endpointEndpoint of the node we want to get the information for
percentcheck for percentage attribute instead
Returns
bool true if supported, false if not supported

◆ dotdot_is_supported_window_covering_tilt()

static bool dotdot_is_supported_window_covering_tilt ( dotdot_unid_t  unid,
dotdot_endpoint_id_t  endpoint,
bool  percent 
)
static

Finds if WindowCovering tilt feature is supported for a UNID/ep.

Parameters
unidUNID of the node we want to get the information for
endpointEndpoint of the node we want to get the information for
percentcheck for percentage attribute instead
Returns
bool true if supported, false if not supported

◆ down_or_close_command()

static sl_status_t down_or_close_command ( dotdot_unid_t  unid,
dotdot_endpoint_id_t  endpoint,
uic_mqtt_dotdot_callback_call_type_t  call_type 
)
static

◆ get_installed_closed_limit_lift()

static uint16_t get_installed_closed_limit_lift ( dotdot_unid_t  unid,
dotdot_endpoint_id_t  endpoint 
)
static

Finds the WindowCovering::InstalledClosedLimitLift value for a UNID/ep.

Parameters
unidUNID of the node we want to get the information for
endpointEndpoint of the node we want to get the information for
Returns
uint16 Value for the, default if does not exist

◆ get_installed_closed_limit_tilt()

static uint16_t get_installed_closed_limit_tilt ( dotdot_unid_t  unid,
dotdot_endpoint_id_t  endpoint 
)
static

Finds the WindowCovering::InstalledClosedLimitTilt value for a UNID/ep.

Parameters
unidUNID of the node we want to get the information for
endpointEndpoint of the node we want to get the information for
Returns
uint16 Value for the, default if does not exist

◆ get_installed_open_limit_lift()

static uint16_t get_installed_open_limit_lift ( dotdot_unid_t  unid,
dotdot_endpoint_id_t  endpoint 
)
static

Finds the WindowCovering::InstalledOpenLimitLift value for a UNID/ep.

Parameters
unidUNID of the node we want to get the information for
endpointEndpoint of the node we want to get the information for
Returns
uint16 Value for the, default if does not exist

◆ get_installed_open_limit_tilt()

static uint16_t get_installed_open_limit_tilt ( dotdot_unid_t  unid,
dotdot_endpoint_id_t  endpoint 
)
static

Finds the WindowCovering::InstalledOpenLimitTilt value for a UNID/ep.

Parameters
unidUNID of the node we want to get the information for
endpointEndpoint of the node we want to get the information for
Returns
uint16 Value for the, default if does not exist

◆ go_to_lift_percentage_command()

static sl_status_t go_to_lift_percentage_command ( dotdot_unid_t  unid,
dotdot_endpoint_id_t  endpoint,
uic_mqtt_dotdot_callback_call_type_t  call_type,
uint8_t  lift_percentage 
)
static

◆ go_to_lift_value_command()

static sl_status_t go_to_lift_value_command ( dotdot_unid_t  unid,
dotdot_endpoint_id_t  endpoint,
uic_mqtt_dotdot_callback_call_type_t  call_type,
uint16_t  lift_value 
)
static

◆ go_to_tilt_percentage_command()

static sl_status_t go_to_tilt_percentage_command ( dotdot_unid_t  unid,
dotdot_endpoint_id_t  endpoint,
uic_mqtt_dotdot_callback_call_type_t  call_type,
uint8_t  tilt_percentage 
)
static

◆ go_to_tilt_value_command()

static sl_status_t go_to_tilt_value_command ( dotdot_unid_t  unid,
dotdot_endpoint_id_t  endpoint,
uic_mqtt_dotdot_callback_call_type_t  call_type,
uint16_t  tilt_value 
)
static

◆ on_mode_update()

static void on_mode_update ( attribute_store_node_t  node,
attribute_store_change_t  change 
)
static

Process changes request to mode attribute and takes necessary action.

Parameters
nodeattribute store node WindowCovering::Mode attribute
changetype of change

◆ stop_command()

static sl_status_t stop_command ( dotdot_unid_t  unid,
dotdot_endpoint_id_t  endpoint,
uic_mqtt_dotdot_callback_call_type_t  call_type 
)
static

◆ up_or_open_command()

static sl_status_t up_or_open_command ( dotdot_unid_t  unid,
dotdot_endpoint_id_t  endpoint,
uic_mqtt_dotdot_callback_call_type_t  call_type 
)
static

Variable Documentation

◆ DEFAULT_INSTALLED_CLOSED_LIMIT_LIFT

const uint16_t DEFAULT_INSTALLED_CLOSED_LIMIT_LIFT = 65535

◆ DEFAULT_INSTALLED_CLOSED_LIMIT_TILT

const uint16_t DEFAULT_INSTALLED_CLOSED_LIMIT_TILT = 65535

◆ DEFAULT_INSTALLED_OPEN_LIMIT_LIFT

const uint16_t DEFAULT_INSTALLED_OPEN_LIMIT_LIFT = 0x00

◆ DEFAULT_INSTALLED_OPEN_LIMIT_TILT

const uint16_t DEFAULT_INSTALLED_OPEN_LIMIT_TILT = 0x00