MS_light_ctl_api.h 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727
  1. /**
  2. * \file MS_light_ctl_api.h
  3. *
  4. * \brief This file defines the Mesh Light Ctl Model Application Interface
  5. * - includes Data Structures and Methods for both Server and Client.
  6. */
  7. /*
  8. * Copyright (C) 2017. Mindtree Ltd.
  9. * All rights reserved.
  10. */
  11. #ifndef _H_MS_LIGHT_CTL_API_
  12. #define _H_MS_LIGHT_CTL_API_
  13. /* --------------------------------------------- Header File Inclusion */
  14. #include "MS_access_api.h"
  15. /* --------------------------------------------- Global Definitions */
  16. /**
  17. * \defgroup light_ctl_module LIGHT_CTL (Mesh Light Ctl Model)
  18. * \{
  19. * This section describes the interfaces & APIs offered by the EtherMind
  20. * Mesh Generic OnOff Model (ONOFF) module to the Application.
  21. */
  22. /* --------------------------------------------- Data Types/ Structures */
  23. /**
  24. * \defgroup light_ctl_cb Application Callback
  25. * \{
  26. * This Section Describes the module Notification Callback interface offered
  27. * to the application
  28. */
  29. /**
  30. * Light Ctl Server application Asynchronous Notification Callback.
  31. *
  32. * Light Ctl Server calls the registered callback to indicate events occurred to the
  33. * application.
  34. *
  35. * \param [in] ctx Context of the message received for a specific model instance.
  36. * \param [in] msg_raw Uninterpreted/raw received message.
  37. * \param [in] req_type Requested message type.
  38. * \param [in] state_params Model specific state parameters.
  39. * \param [in] ext_params Additional parameters.
  40. */
  41. typedef API_RESULT (* MS_LIGHT_CTL_SERVER_CB)
  42. (
  43. MS_ACCESS_MODEL_REQ_MSG_CONTEXT * ctx,
  44. MS_ACCESS_MODEL_REQ_MSG_RAW * msg_raw,
  45. MS_ACCESS_MODEL_REQ_MSG_T * req_type,
  46. MS_ACCESS_MODEL_STATE_PARAMS * state_params,
  47. MS_ACCESS_MODEL_EXT_PARAMS * ext_params
  48. ) DECL_REENTRANT;
  49. /**
  50. * Light Ctl Temperature Server application Asynchronous Notification Callback.
  51. *
  52. * Light Ctl Temperature Server calls the registered callback to indicate events occurred to the
  53. * application.
  54. *
  55. * \param [in] ctx Context of the message received for a specific model instance.
  56. * \param [in] msg_raw Uninterpreted/raw received message.
  57. * \param [in] req_type Requested message type.
  58. * \param [in] state_params Model specific state parameters.
  59. * \param [in] ext_params Additional parameters.
  60. */
  61. typedef API_RESULT (* MS_LIGHT_CTL_TEMPERATURE_SERVER_CB)
  62. (
  63. MS_ACCESS_MODEL_REQ_MSG_CONTEXT * ctx,
  64. MS_ACCESS_MODEL_REQ_MSG_RAW * msg_raw,
  65. MS_ACCESS_MODEL_REQ_MSG_T * req_type,
  66. MS_ACCESS_MODEL_STATE_PARAMS * state_params,
  67. MS_ACCESS_MODEL_EXT_PARAMS * ext_params
  68. ) DECL_REENTRANT;
  69. /**
  70. * Light Ctl Client application Asynchronous Notification Callback.
  71. *
  72. * Light Ctl Client calls the registered callback to indicate events occurred to the
  73. * application.
  74. *
  75. * \param handle Model Handle.
  76. * \param opcode Opcode.
  77. * \param data_param Data associated with the event if any or NULL.
  78. * \param data_len Size of the event data. 0 if event data is NULL.
  79. */
  80. typedef API_RESULT (* MS_LIGHT_CTL_CLIENT_CB)
  81. (
  82. MS_ACCESS_MODEL_HANDLE * handle,
  83. UINT32 opcode,
  84. UCHAR * data_param,
  85. UINT16 data_len
  86. ) DECL_REENTRANT;
  87. /** \} */
  88. /**
  89. * \defgroup light_ctl_structures Structures
  90. * \{
  91. */
  92. /**
  93. * Light CTL Set message parameters.
  94. */
  95. typedef struct MS_light_ctl_set_struct
  96. {
  97. /** The target value of the Light CTL Lightness state. */
  98. UINT16 ctl_lightness;
  99. /** The target value of the Light CTL Temperature state. */
  100. UINT16 ctl_temperature;
  101. /** The target value of the Light CTL Delta UV state. */
  102. UINT16 ctl_delta_uv;
  103. /** Transaction Identifier */
  104. UCHAR tid;
  105. /**
  106. * Transition Time is a 1-octet value that consists of two fields:
  107. * - a 2-bit bit field representing the step resolution
  108. * - a 6-bit bit field representing the number of transition steps.
  109. *
  110. * Field | Size (bits) | Description
  111. * ---------------------------|-------------|----------------
  112. * Transition Number of Steps | 6 | The number of Steps
  113. * Transition Step Resolution | 2 | The resolution of the Default Transition
  114. * | Number of Steps field
  115. */
  116. UCHAR transition_time;
  117. /** Message execution delay in 5 milliseconds steps */
  118. UCHAR delay;
  119. /** Flag: To represent if optional Transaction time and Delay fields are valid */
  120. UCHAR optional_fields_present;
  121. } MS_LIGHT_CTL_SET_STRUCT;
  122. /**
  123. * Light CTL Status message parameters.
  124. */
  125. typedef struct MS_light_ctl_status_struct
  126. {
  127. /** The present value of the Light CTL Lightness state */
  128. UINT16 present_ctl_lightness;
  129. /** The present value of the Light CTL Temperature state */
  130. UINT16 present_ctl_temperature;
  131. /** The target value of the Light CTL Lightness state (Optional) */
  132. UINT16 target_ctl_lightness;
  133. /** The target value of the Light CTL Temperature state */
  134. UINT16 target_ctl_temperature;
  135. /**
  136. * Remaining Time is a 1-octet value that consists of two fields:
  137. * - a 2-bit bit field representing the step resolution
  138. * - a 6-bit bit field representing the number of transition steps.
  139. *
  140. * Field | Size (bits) | Description
  141. * ---------------------------|-------------|----------------
  142. * Transition Number of Steps | 6 | The number of Steps
  143. * Transition Step Resolution | 2 | The resolution of the Default Transition
  144. * | Number of Steps field
  145. */
  146. UCHAR remaining_time;
  147. /** Flag: To represent if optional fields Target CTL Lightness and Temperature are valid */
  148. UCHAR optional_fields_present;
  149. } MS_LIGHT_CTL_STATUS_STRUCT;
  150. /**
  151. * Light CTL Temperature Set message parameters.
  152. */
  153. typedef struct MS_light_ctl_temperature_set_struct
  154. {
  155. /** The target value of the Light CTL Temperature state. */
  156. UINT16 ctl_temperature;
  157. /** The target value of the Light CTL Delta UV state. */
  158. UINT16 ctl_delta_uv;
  159. /** Transaction Identifier */
  160. UCHAR tid;
  161. /**
  162. * Transition Time is a 1-octet value that consists of two fields:
  163. * - a 2-bit bit field representing the step resolution
  164. * - a 6-bit bit field representing the number of transition steps.
  165. *
  166. * Field | Size (bits) | Description
  167. * ---------------------------|-------------|----------------
  168. * Transition Number of Steps | 6 | The number of Steps
  169. * Transition Step Resolution | 2 | The resolution of the Default Transition
  170. * | Number of Steps field
  171. */
  172. UCHAR transition_time;
  173. /** Message execution delay in 5 milliseconds steps */
  174. UCHAR delay;
  175. /** Flag: To represent if optional Transaction time and Delay fields are valid */
  176. UCHAR optional_fields_present;
  177. } MS_LIGHT_CTL_TEMPERATURE_SET_STRUCT;
  178. /**
  179. * Light CTL Temperature Status message parameters.
  180. */
  181. typedef struct MS_light_ctl_temperature_status_struct
  182. {
  183. /** The present value of the Light CTL Temperature state. */
  184. UINT16 present_ctl_temperature;
  185. /** The present value of the Light CTL Delta UV state */
  186. UINT16 present_ctl_delta_uv;
  187. /** The target value of the Light CTL Temperature state (Optional) */
  188. UINT16 target_ctl_temperature;
  189. /** The target value of the Light CTL Delta UV state */
  190. UINT16 target_ctl_delta_uv;
  191. /**
  192. * Remaining Time is a 1-octet value that consists of two fields:
  193. * - a 2-bit bit field representing the step resolution
  194. * - a 6-bit bit field representing the number of transition steps.
  195. *
  196. * Field | Size (bits) | Description
  197. * ---------------------------|-------------|----------------
  198. * Transition Number of Steps | 6 | The number of Steps
  199. * Transition Step Resolution | 2 | The resolution of the Default Transition
  200. * | Number of Steps field
  201. */
  202. UCHAR remaining_time;
  203. /** Flag: To represent if optional fields Target CTL Temperature, Delta UV and Remaining Time are valid */
  204. UCHAR optional_fields_present;
  205. } MS_LIGHT_CTL_TEMPERATURE_STATUS_STRUCT;
  206. /**
  207. * Light CTL Default Set message parameters.
  208. */
  209. typedef struct MS_light_ctl_default_set_struct
  210. {
  211. /** The value of the Light Lightness Default state. */
  212. UINT16 lightness;
  213. /** The value of the Light CTL Temperature Default state. */
  214. UINT16 temperature;
  215. /** The value of the Light CTL Delta UV Default state. */
  216. UINT16 delta_uv;
  217. } MS_LIGHT_CTL_DEFAULT_SET_STRUCT;
  218. /**
  219. * Light CTL Default Status message parameters.
  220. */
  221. typedef struct MS_light_ctl_default_status_struct
  222. {
  223. /** The value of the Light Lightness Default state */
  224. UINT16 lightness;
  225. /** The value of the Light CTL Temperature Default state */
  226. UINT16 temperature;
  227. /** The value of the Light CTL Delta UV Default state */
  228. UINT16 delta_uv;
  229. } MS_LIGHT_CTL_DEFAULT_STATUS_STRUCT;
  230. /**
  231. * Light CTL Temperature Range Set message parameters.
  232. */
  233. typedef struct MS_light_ctl_temperature_range_set_struct
  234. {
  235. /** The value of the Temperature Range Min field of the Light CTL Temperature Range state */
  236. UINT16 range_min;
  237. /** The value of the Temperature Range Max field of the Light CTL Temperature Range state */
  238. UINT16 range_max;
  239. } MS_LIGHT_CTL_TEMPERATURE_RANGE_SET_STRUCT;
  240. /**
  241. * Light CTL Temperature Range Status message parameters.
  242. */
  243. typedef struct MS_light_ctl_temperature_range_status_struct
  244. {
  245. /** Status Code for the requesting message. */
  246. UCHAR status_code;
  247. /** The value of the Temperature Range Min field of the Light CTL Temperature Range state */
  248. UINT16 range_min;
  249. /** The value of the Temperature Range Max field of the Light CTL Temperature Range state */
  250. UINT16 range_max;
  251. } MS_LIGHT_CTL_TEMPERATURE_RANGE_STATUS_STRUCT;
  252. /** \} */
  253. /* --------------------------------------------- Function */
  254. /**
  255. * \defgroup light_ctl_api_defs API Definitions
  256. * \{
  257. * This section describes the EtherMind Mesh Light Ctl Model APIs.
  258. */
  259. /**
  260. * \defgroup light_ctl_ser_api_defs Light Ctl Server API Definitions
  261. * \{
  262. * This section describes the Light Ctl Server APIs.
  263. */
  264. /**
  265. * \brief API to initialize Light_Ctl Server model
  266. *
  267. * \par Description
  268. * This is to initialize Light_Ctl Server model and to register with Acess layer.
  269. *
  270. * \param [in] element_handle
  271. * Element identifier to be associated with the model instance.
  272. *
  273. * \param [in, out] ctl_model_handle
  274. * Model identifier associated with the Light CTL model instance on successful initialization.
  275. * After power cycle of an already provisioned node, the model handle will have
  276. * valid value and the same will be reused for registration.
  277. *
  278. * \param [in, out] ctl_setup_model_handle
  279. * Model identifier associated with the Light CTL Setup model instance on successful initialization.
  280. * After power cycle of an already provisioned node, the model handle will have
  281. * valid value and the same will be reused for registration.
  282. *
  283. * \param [in] appl_cb Application Callback to be used by the Light_Ctl Server.
  284. *
  285. * \return API_SUCCESS or an error code indicating reason for failure
  286. */
  287. API_RESULT MS_light_ctl_server_init
  288. (
  289. /* IN */ MS_ACCESS_ELEMENT_HANDLE element_handle,
  290. /* INOUT */ MS_ACCESS_MODEL_HANDLE * ctl_model_handle,
  291. /* INOUT */ MS_ACCESS_MODEL_HANDLE * ctl_setup_model_handle,
  292. /* IN */ MS_LIGHT_CTL_SERVER_CB appl_cb
  293. );
  294. /**
  295. * \brief API to initialize Light_Ctl_Temperature Server model
  296. *
  297. * \par Description
  298. * This is to initialize Light_Ctl_Temperature Server model and to register with Acess layer.
  299. *
  300. * \param [in] element_handle
  301. * Element identifier to be associated with the model instance.
  302. *
  303. * \param [in, out] model_handle
  304. * Model identifier associated with the model instance on successful initialization.
  305. * After power cycle of an already provisioned node, the model handle will have
  306. * valid value and the same will be reused for registration.
  307. *
  308. * \param [in] appl_cb Application Callback to be used by the Light_Ctl_Temperature Server.
  309. *
  310. * \return API_SUCCESS or an error code indicating reason for failure
  311. */
  312. API_RESULT MS_light_ctl_temperature_server_init
  313. (
  314. /* IN */ MS_ACCESS_ELEMENT_HANDLE element_handle,
  315. /* INOUT */ MS_ACCESS_MODEL_HANDLE * model_handle,
  316. /* IN */ MS_LIGHT_CTL_TEMPERATURE_SERVER_CB appl_cb
  317. );
  318. /**
  319. * \brief API to send reply or to update state change
  320. *
  321. * \par Description
  322. * This is to send reply for a request or to inform change in state.
  323. *
  324. * \param [in] ctx Context of the message.
  325. * \param [in] current_state_params Model specific current state parameters.
  326. * \param [in] target_state_params Model specific target state parameters (NULL: to be ignored).
  327. * \param [in] remaining_time Time from current state to target state (0: to be ignored).
  328. * \param [in] ext_params Additional parameters (NULL: to be ignored).
  329. *
  330. * \return API_SUCCESS or an error code indicating reason for failure
  331. */
  332. API_RESULT MS_light_ctl_server_state_update
  333. (
  334. /* IN */ MS_ACCESS_MODEL_REQ_MSG_CONTEXT * ctx,
  335. /* IN */ MS_ACCESS_MODEL_STATE_PARAMS * current_state_params,
  336. /* IN */ MS_ACCESS_MODEL_STATE_PARAMS * target_state_params,
  337. /* IN */ UINT16 remaining_time,
  338. /* IN */ MS_ACCESS_MODEL_EXT_PARAMS * ext_params
  339. );
  340. /**
  341. * \brief API to send reply or to update state change
  342. *
  343. * \par Description
  344. * This is to send reply for a request or to inform change in state.
  345. *
  346. * \param [in] ctx Context of the message.
  347. * \param [in] current_state_params Model specific current state parameters.
  348. * \param [in] target_state_params Model specific target state parameters (NULL: to be ignored).
  349. * \param [in] remaining_time Time from current state to target state (0: to be ignored).
  350. * \param [in] ext_params Additional parameters (NULL: to be ignored).
  351. *
  352. * \return API_SUCCESS or an error code indicating reason for failure
  353. */
  354. API_RESULT MS_light_ctl_temperature_server_state_update
  355. (
  356. /* IN */ MS_ACCESS_MODEL_REQ_MSG_CONTEXT * ctx,
  357. /* IN */ MS_ACCESS_MODEL_STATE_PARAMS * current_state_params,
  358. /* IN */ MS_ACCESS_MODEL_STATE_PARAMS * target_state_params,
  359. /* IN */ UINT16 remaining_time,
  360. /* IN */ MS_ACCESS_MODEL_EXT_PARAMS * ext_params
  361. );
  362. /** \} */
  363. /**
  364. * \defgroup light_ctl_cli_api_defs Light Ctl Client API Definitions
  365. * \{
  366. * This section describes the Light Ctl Client APIs.
  367. */
  368. /**
  369. * \brief API to initialize Light_Ctl Client model
  370. *
  371. * \par Description
  372. * This is to initialize Light_Ctl Client model and to register with Acess layer.
  373. *
  374. * \param [in] element_handle
  375. * Element identifier to be associated with the model instance.
  376. *
  377. * \param [in, out] model_handle
  378. * Model identifier associated with the model instance on successful initialization.
  379. * After power cycle of an already provisioned node, the model handle will have
  380. * valid value and the same will be reused for registration.
  381. *
  382. * \param [in] appl_cb Application Callback to be used by the Light_Ctl Client.
  383. *
  384. * \return API_SUCCESS or an error code indicating reason for failure
  385. */
  386. API_RESULT MS_light_ctl_client_init
  387. (
  388. /* IN */ MS_ACCESS_ELEMENT_HANDLE element_handle,
  389. /* INOUT */ MS_ACCESS_MODEL_HANDLE * model_handle,
  390. /* IN */ MS_LIGHT_CTL_CLIENT_CB appl_cb
  391. );
  392. /**
  393. * \brief API to get Light_Ctl client model handle
  394. *
  395. * \par Description
  396. * This is to get the handle of Light_Ctl client model.
  397. *
  398. * \param [out] model_handle Address of model handle to be filled/returned.
  399. *
  400. * \return API_SUCCESS or an error code indicating reason for failure
  401. */
  402. API_RESULT MS_light_ctl_client_get_model_handle
  403. (
  404. /* OUT */ MS_ACCESS_MODEL_HANDLE * model_handle
  405. );
  406. /**
  407. * \brief API to send acknowledged commands
  408. *
  409. * \par Description
  410. * This is to initialize sending acknowledged commands.
  411. *
  412. * \param [in] req_opcode Request Opcode.
  413. * \param [in] param Parameter associated with Request Opcode.
  414. * \param [in] rsp_opcode Response Opcode.
  415. *
  416. * \return API_SUCCESS or an error code indicating reason for failure
  417. */
  418. API_RESULT MS_light_ctl_client_send_reliable_pdu
  419. (
  420. /* IN */ UINT32 req_opcode,
  421. /* IN */ void * param,
  422. /* IN */ UINT32 rsp_opcode
  423. );
  424. /**
  425. * \brief API to get the Light CTL state of an element.
  426. *
  427. * \par Description
  428. * Light CTL Get is an acknowledged message used to get the Light CTL state of an element.
  429. * The response to the Light CTL Get message is a Light CTL Status message.
  430. * There are no parameters for this message.
  431. *
  432. * \return API_SUCCESS or an error code indicating reason for failure
  433. */
  434. #define MS_light_ctl_get() \
  435. MS_light_ctl_client_send_reliable_pdu \
  436. (\
  437. MS_ACCESS_LIGHT_CTL_GET_OPCODE,\
  438. NULL,\
  439. MS_ACCESS_LIGHT_CTL_STATUS_OPCODE\
  440. )
  441. /**
  442. * \brief API to set the Light CTL Lightness state, Light CTL Temperature state, and the Light CTL Delta UV state of an element.
  443. *
  444. * \par Description
  445. * Light CTL Set is an acknowledged message used to set the Light CTL Lightness state, Light CTL Temperature state,
  446. * and the Light CTL Delta UV state of an element.
  447. * The response to the Light CTL Set message is a Light CTL Status message.
  448. *
  449. * \param [in] param Light CTL Set message
  450. *
  451. * \return API_SUCCESS or an error code indicating reason for failure
  452. */
  453. #define MS_light_ctl_set(param) \
  454. MS_light_ctl_client_send_reliable_pdu \
  455. (\
  456. MS_ACCESS_LIGHT_CTL_SET_OPCODE,\
  457. param,\
  458. MS_ACCESS_LIGHT_CTL_STATUS_OPCODE\
  459. )
  460. /**
  461. * \brief API to set the Light CTL Lightness state, Light CTL Temperature state, and the Light CTL Delta UV state of an element.
  462. *
  463. * \par Description
  464. * Light CTL Set Unacknowledged is an unacknowledged message used to set the Light CTL Lightness state, Light CTL Temperature state,
  465. * and the Light CTL Delta UV state of an element
  466. *
  467. * \param [in] param Light CTL Set message
  468. *
  469. * \return API_SUCCESS or an error code indicating reason for failure
  470. */
  471. #define MS_light_ctl_set_unacknowledged(param) \
  472. MS_light_ctl_client_send_reliable_pdu \
  473. (\
  474. MS_ACCESS_LIGHT_CTL_SET_UNACKNOWLEDGED_OPCODE,\
  475. param,\
  476. 0xFFFFFFFF\
  477. )
  478. /**
  479. * \brief API to get the Light CTL Temperature state of an element.
  480. *
  481. * \par Description
  482. * Light CTL Temperature Get is an acknowledged message used to get the Light CTL Temperature state of an element.
  483. * The response to the Light CTL Temperature Get message is a Light CTL Temperature Status message.
  484. * There are no parameters for this message.
  485. *
  486. * \return API_SUCCESS or an error code indicating reason for failure
  487. */
  488. #define MS_light_ctl_temperature_get() \
  489. MS_light_ctl_client_send_reliable_pdu \
  490. (\
  491. MS_ACCESS_LIGHT_CTL_TEMPERATURE_GET_OPCODE,\
  492. NULL,\
  493. MS_ACCESS_LIGHT_CTL_TEMPERATURE_STATUS_OPCODE\
  494. )
  495. /**
  496. * \brief API to set the Light CTL Temperature state and the Light CTL Delta UV state of an element.
  497. *
  498. * \par Description
  499. * The Light CTL Temperature Set is an acknowledged message used to set the Light CTL Temperature state
  500. * and the Light CTL Delta UV state of an element.
  501. * The response to the Light CTL Temperature Set message is a Light CTL Temperature Status message.
  502. *
  503. * \param [in] param Light CTL Temperature Set message
  504. *
  505. * \return API_SUCCESS or an error code indicating reason for failure
  506. */
  507. #define MS_light_ctl_temperature_set(param) \
  508. MS_light_ctl_client_send_reliable_pdu \
  509. (\
  510. MS_ACCESS_LIGHT_CTL_TEMPERATURE_SET_OPCODE,\
  511. param,\
  512. MS_ACCESS_LIGHT_CTL_TEMPERATURE_STATUS_OPCODE\
  513. )
  514. /**
  515. * \brief API to set the Light CTL Temperature state and the Light CTL Delta UV state of an element.
  516. *
  517. * \par Description
  518. * The Light CTL Temperature Set Unacknowledged is an unacknowledged message used to set the Light CTL Temperature state
  519. * and the Light CTL Delta UV state of an element
  520. *
  521. * \param [in] param Light CTL Temperature Set message
  522. *
  523. * \return API_SUCCESS or an error code indicating reason for failure
  524. */
  525. #define MS_light_ctl_temperature_set_unacknowledged(param) \
  526. MS_light_ctl_client_send_reliable_pdu \
  527. (\
  528. MS_ACCESS_LIGHT_CTL_TEMPERATURE_SET_UNACKNOWLEDGED_OPCODE,\
  529. param,\
  530. 0xFFFFFFFF\
  531. )
  532. /**
  533. * \brief API to get the Light CTL Temperature Default and Light CTL Delta UV Default states of an element.
  534. *
  535. * \par Description
  536. * Light CTL Default Get is an acknowledged message used to get the Light CTL Temperature Default and Light CTL Delta UV Default states of an element.
  537. * The response to the Light CTL Default Get message is a Light CTL Default Status message.
  538. * There are no parameters for this message.
  539. *
  540. * \return API_SUCCESS or an error code indicating reason for failure
  541. */
  542. #define MS_light_ctl_default_get() \
  543. MS_light_ctl_client_send_reliable_pdu \
  544. (\
  545. MS_ACCESS_LIGHT_CTL_DEFAULT_GET_OPCODE,\
  546. NULL,\
  547. MS_ACCESS_LIGHT_CTL_DEFAULT_STATUS_OPCODE\
  548. )
  549. /**
  550. * \brief API to set the Light CTL Temperature Default state and the Light CTL Delta UV Default state of an element.
  551. *
  552. * \par Description
  553. * The Light CTL Default Set is an acknowledged message used to set the Light CTL Temperature Default state
  554. * and the Light CTL Delta UV Default state of an element.
  555. * The response to the Light CTL Set message is a Light CTL Status message.
  556. *
  557. * \param [in] param Light CTL Default Set message
  558. *
  559. * \return API_SUCCESS or an error code indicating reason for failure
  560. */
  561. #define MS_light_ctl_default_set(param) \
  562. MS_light_ctl_client_send_reliable_pdu \
  563. (\
  564. MS_ACCESS_LIGHT_CTL_DEFAULT_SET_OPCODE,\
  565. param,\
  566. MS_ACCESS_LIGHT_CTL_DEFAULT_STATUS_OPCODE\
  567. )
  568. /**
  569. * \brief API to set the Light CTL Temperature Default state and the Light CTL Delta UV Default state of an element.
  570. *
  571. * \par Description
  572. * The Light CTL Default Set Unacknowledged is an unacknowledged message used to set the Light CTL Temperature
  573. * Default state and the Light CTL Delta UV Default state of an element.
  574. *
  575. * \param [in] param Light CTL Default Set message
  576. *
  577. * \return API_SUCCESS or an error code indicating reason for failure
  578. */
  579. #define MS_light_ctl_default_set_unacknowledged(param) \
  580. MS_light_ctl_client_send_reliable_pdu \
  581. (\
  582. MS_ACCESS_LIGHT_CTL_DEFAULT_SET_UNACKNOWLEDGED_OPCODE,\
  583. param,\
  584. 0xFFFFFFFF\
  585. )
  586. /**
  587. * \brief API to get the Light CTL Temperature Range state of an element.
  588. *
  589. * \par Description
  590. * The Light CTL Temperature Range Get is an acknowledged message used to get the Light CTL Temperature Range state of an element.
  591. * The response to the Light CTL Temperature Range Get message is a Light CTL Temperature Range Status message.
  592. * There are no parameters for this message.
  593. *
  594. * \return API_SUCCESS or an error code indicating reason for failure
  595. */
  596. #define MS_light_ctl_temperature_range_get() \
  597. MS_light_ctl_client_send_reliable_pdu \
  598. (\
  599. MS_ACCESS_LIGHT_CTL_TEMPERATURE_RANGE_GET_OPCODE,\
  600. NULL,\
  601. MS_ACCESS_LIGHT_CTL_TEMPERATURE_RANGE_STATUS_OPCODE\
  602. )
  603. /**
  604. * \brief API to set the Light CTL Temperature Range state of an element.
  605. *
  606. * \par Description
  607. * Light CTL Temperature Range Set Unacknowledged is an unacknowledged message used to set
  608. * the Light CTL Temperature Range state of an element.
  609. *
  610. * \param [in] param Light CTL Temperature Range Set message
  611. *
  612. * \return API_SUCCESS or an error code indicating reason for failure
  613. */
  614. #define MS_light_ctl_temperature_range_set(param) \
  615. MS_light_ctl_client_send_reliable_pdu \
  616. (\
  617. MS_ACCESS_LIGHT_CTL_TEMPERATURE_RANGE_SET_OPCODE,\
  618. param,\
  619. MS_ACCESS_LIGHT_CTL_TEMPERATURE_RANGE_STATUS_OPCODE\
  620. )
  621. /**
  622. * \brief API to set the Light CTL Temperature Range state of an element.
  623. *
  624. * \par Description
  625. * Light CTL Temperature Range Set is an acknowledged message used to set the Light CTL Temperature Range state of an element.
  626. * The response to the Light CTL Temperature Range Get message is a Light CTL Temperature Range Status message.
  627. *
  628. * \param [in] param Light CTL Temperature Range Set message
  629. *
  630. * \return API_SUCCESS or an error code indicating reason for failure
  631. */
  632. #define MS_light_ctl_temperature_range_set_unacknowledged(param) \
  633. MS_light_ctl_client_send_reliable_pdu \
  634. (\
  635. MS_ACCESS_LIGHT_CTL_TEMPERATURE_RANGE_SET_UNACKNOWLEDGED_OPCODE,\
  636. param,\
  637. 0xFFFFFFFF\
  638. )
  639. /** \} */
  640. /** \} */
  641. /** \} */
  642. #endif /*_H_MS_LIGHT_CTL_API_ */