MS_light_lightness_api.h 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718
  1. /**
  2. * \file MS_light_lightness_api.h
  3. *
  4. * \brief This file defines the Mesh Light Lightness 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_LIGHTNESS_API_
  12. #define _H_MS_LIGHT_LIGHTNESS_API_
  13. /* --------------------------------------------- Header File Inclusion */
  14. #include "MS_access_api.h"
  15. /* --------------------------------------------- Global Definitions */
  16. /**
  17. * \defgroup light_lightness_module LIGHT_LIGHTNESS (Mesh Light Lightness 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_lightness_cb Application Callback
  25. * \{
  26. * This Section Describes the module Notification Callback interface offered
  27. * to the application
  28. */
  29. /**
  30. * Light Lightness Server application Asynchronous Notification Callback.
  31. *
  32. * Light Lightness 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_LIGHTNESS_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 Lightness Setup Server application Asynchronous Notification Callback.
  51. *
  52. * Light Lightness Setup 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_LIGHTNESS_SETUP_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 Lightness Client application Asynchronous Notification Callback.
  71. *
  72. * Light Lightness 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_LIGHTNESS_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_lightness_structures Structures
  90. * \{
  91. */
  92. /**
  93. * Light Lightness Set message parameters.
  94. */
  95. typedef struct MS_light_lightness_set_struct
  96. {
  97. /** The target value of the Light Lightness Actual state. */
  98. UINT16 lightness;
  99. /** Transaction Identifier */
  100. UCHAR tid;
  101. /**
  102. * Transition Time is a 1-octet value that consists of two fields:
  103. * - a 2-bit bit field representing the step resolution
  104. * - a 6-bit bit field representing the number of transition steps.
  105. *
  106. * Field | Size (bits) | Description
  107. * ---------------------------|-------------|----------------
  108. * Transition Number of Steps | 6 | The number of Steps
  109. * Transition Step Resolution | 2 | The resolution of the Default Transition
  110. * | Number of Steps field
  111. */
  112. UCHAR transition_time;
  113. /** Message execution delay in 5 milliseconds steps */
  114. UCHAR delay;
  115. /** Flag: To represent if optional Transaction time and Delay fields are valid */
  116. UCHAR optional_fields_present;
  117. } MS_LIGHT_LIGHTNESS_SET_STRUCT;
  118. /**
  119. * Light Lightness Status message parameters.
  120. */
  121. typedef struct MS_light_lightness_status_struct
  122. {
  123. /** The present value of the Light Lightness Actual state. */
  124. UINT16 present_lightness;
  125. /** The target value of the Light Lightness Actual state. (Optional) */
  126. UINT16 target_lightness;
  127. /**
  128. * Remaining Time is a 1-octet value that consists of two fields:
  129. * - a 2-bit bit field representing the step resolution
  130. * - a 6-bit bit field representing the number of transition steps.
  131. *
  132. * Field | Size (bits) | Description
  133. * ---------------------------|-------------|----------------
  134. * Transition Number of Steps | 6 | The number of Steps
  135. * Transition Step Resolution | 2 | The resolution of the Default Transition
  136. * | Number of Steps field
  137. */
  138. UCHAR remaining_time;
  139. /** Flag: To represent if optional fields Target Light Lightness Actual and Remaining Time are valid */
  140. UCHAR optional_fields_present;
  141. } MS_LIGHT_LIGHTNESS_STATUS_STRUCT;
  142. /**
  143. * Light Lightness Linear Set message parameters.
  144. */
  145. typedef struct MS_light_lightness_linear_set_struct
  146. {
  147. /** The target value of the Light Lightness Linear state. */
  148. UINT16 lightness;
  149. /** Transaction Identifier */
  150. UCHAR tid;
  151. /**
  152. * Transition Time is a 1-octet value that consists of two fields:
  153. * - a 2-bit bit field representing the step resolution
  154. * - a 6-bit bit field representing the number of transition steps.
  155. *
  156. * Field | Size (bits) | Description
  157. * ---------------------------|-------------|----------------
  158. * Transition Number of Steps | 6 | The number of Steps
  159. * Transition Step Resolution | 2 | The resolution of the Default Transition
  160. * | Number of Steps field
  161. */
  162. UCHAR transition_time;
  163. /** Message execution delay in 5 milliseconds steps */
  164. UCHAR delay;
  165. /** Flag: To represent if optional Transaction time and Delay fields are valid */
  166. UCHAR optional_fields_present;
  167. } MS_LIGHT_LIGHTNESS_LINEAR_SET_STRUCT;
  168. /**
  169. * Light Lightness Linear Status message parameters.
  170. */
  171. typedef struct MS_light_lightness_linear_status_struct
  172. {
  173. /** The present value of the Light Lightness Linear state */
  174. UINT16 present_lightness;
  175. /** The target value of the Light Lightness Linear state (Optional) */
  176. UINT16 target_lightness;
  177. /**
  178. * Remaining Time is a 1-octet value that consists of two fields:
  179. * - a 2-bit bit field representing the step resolution
  180. * - a 6-bit bit field representing the number of transition steps.
  181. *
  182. * Field | Size (bits) | Description
  183. * ---------------------------|-------------|----------------
  184. * Transition Number of Steps | 6 | The number of Steps
  185. * Transition Step Resolution | 2 | The resolution of the Default Transition
  186. * | Number of Steps field
  187. */
  188. UCHAR remaining_time;
  189. /** Flag: To represent if optional fields Target Light Lightness Linear and Remaining Time are valid */
  190. UCHAR optional_fields_present;
  191. } MS_LIGHT_LIGHTNESS_LINEAR_STATUS_STRUCT;
  192. /**
  193. * Light Lightness Last Status message parameters.
  194. */
  195. typedef struct MS_light_lightness_last_status_struct
  196. {
  197. /** The value of the Light Lightness Last */
  198. UINT16 lightness;
  199. } MS_LIGHT_LIGHTNESS_LAST_STATUS_STRUCT;
  200. /**
  201. * Light Lightness Default Set message parameters.
  202. */
  203. typedef struct MS_light_lightness_default_set_struct
  204. {
  205. /** The value of the Light Lightness Default state */
  206. UINT16 lightness;
  207. } MS_LIGHT_LIGHTNESS_DEFAULT_SET_STRUCT;
  208. /**
  209. * Light Lightness Range Set message parameters.
  210. */
  211. typedef struct MS_light_lightness_range_set_struct
  212. {
  213. /** The value of the Lightness Range Min field of the Light Lightness Range state */
  214. UINT16 range_min;
  215. /** The value of the Lightness Range Max field of the Light Lightness Range state */
  216. UINT16 range_max;
  217. } MS_LIGHT_LIGHTNESS_RANGE_SET_STRUCT;
  218. /**
  219. * Light Lightness Range Status message parameters.
  220. */
  221. typedef struct MS_light_lightness_range_status_struct
  222. {
  223. /** Status Code for the requesting message. */
  224. UCHAR status_code;
  225. /** The value of the Lightness Range Min field of the Light Lightness Range state */
  226. UINT16 range_min;
  227. /** The value of the Lightness Range Max field of the Light Lightness Range state */
  228. UINT16 range_max;
  229. } MS_LIGHT_LIGHTNESS_RANGE_STATUS_STRUCT;
  230. /**
  231. * Light Lightness Default Status message parameters.
  232. */
  233. typedef struct MS_light_lightness_default_status_struct
  234. {
  235. /** The value of the Light Lightness Default state */
  236. UINT16 lightness;
  237. } MS_LIGHT_LIGHTNESS_DEFAULT_STATUS_STRUCT;
  238. typedef struct MS_light_lightness_last_or_default_status_struct
  239. {
  240. UINT16 lightness;
  241. } MS_LIGHT_LIGHTNESS_LAST_OR_DEFAULT_STATUS_STRUCT;
  242. /** \} */
  243. /* --------------------------------------------- Function */
  244. /**
  245. * \defgroup light_lightness_api_defs API Definitions
  246. * \{
  247. * This section describes the EtherMind Mesh Light Lightness Model APIs.
  248. */
  249. /**
  250. * \defgroup light_lightness_ser_api_defs Light Lightness Server API Definitions
  251. * \{
  252. * This section describes the Light Lightness Server APIs.
  253. */
  254. /**
  255. * \brief API to initialize Light_Lightness Server model
  256. *
  257. * \par Description
  258. * This is to initialize Light_Lightness Server model and to register with Acess layer.
  259. *
  260. * \param [in] element_handle
  261. * Element identifier to be associated with the model instance.
  262. *
  263. * \param [in, out] model_handle
  264. * Model identifier associated with the model instance on successful initialization.
  265. * After power cycle of an already provisioned node, the model handle will have
  266. * valid value and the same will be reused for registration.
  267. *
  268. * \param [in] appl_cb Application Callback to be used by the Light_Lightness Server.
  269. *
  270. * \return API_SUCCESS or an error code indicating reason for failure
  271. */
  272. API_RESULT MS_light_lightness_server_init
  273. (
  274. /* IN */ MS_ACCESS_ELEMENT_HANDLE element_handle,
  275. /* INOUT */ MS_ACCESS_MODEL_HANDLE * model_handle,
  276. /* IN */ MS_LIGHT_LIGHTNESS_SERVER_CB appl_cb
  277. );
  278. /**
  279. * \brief API to initialize Light_Lightness_Setup Server model
  280. *
  281. * \par Description
  282. * This is to initialize Light_Lightness_Setup Server model and to register with Acess layer.
  283. *
  284. * \param [in] element_handle
  285. * Element identifier to be associated with the model instance.
  286. *
  287. * \param [in, out] model_handle
  288. * Model identifier associated with the model instance on successful initialization.
  289. * After power cycle of an already provisioned node, the model handle will have
  290. * valid value and the same will be reused for registration.
  291. *
  292. * \param [in] appl_cb Application Callback to be used by the Light_Lightness_Setup Server.
  293. *
  294. * \return API_SUCCESS or an error code indicating reason for failure
  295. */
  296. API_RESULT MS_light_lightness_setup_server_init
  297. (
  298. /* IN */ MS_ACCESS_ELEMENT_HANDLE element_handle,
  299. /* INOUT */ MS_ACCESS_MODEL_HANDLE * model_handle,
  300. /* IN */ MS_LIGHT_LIGHTNESS_SETUP_SERVER_CB appl_cb
  301. );
  302. /**
  303. * \brief API to send reply or to update state change
  304. *
  305. * \par Description
  306. * This is to send reply for a request or to inform change in state.
  307. *
  308. * \param [in] ctx Context of the message.
  309. * \param [in] current_state_params Model specific current state parameters.
  310. * \param [in] target_state_params Model specific target state parameters (NULL: to be ignored).
  311. * \param [in] remaining_time Time from current state to target state (0: to be ignored).
  312. * \param [in] ext_params Additional parameters (NULL: to be ignored).
  313. *
  314. * \return API_SUCCESS or an error code indicating reason for failure
  315. */
  316. API_RESULT MS_light_lightness_server_state_update
  317. (
  318. /* IN */ MS_ACCESS_MODEL_REQ_MSG_CONTEXT * ctx,
  319. /* IN */ MS_ACCESS_MODEL_STATE_PARAMS * current_state_params,
  320. /* IN */ MS_ACCESS_MODEL_STATE_PARAMS * target_state_params,
  321. /* IN */ UINT16 remaining_time,
  322. /* IN */ MS_ACCESS_MODEL_EXT_PARAMS * ext_params
  323. );
  324. /**
  325. * \brief API to send reply or to update state change
  326. *
  327. * \par Description
  328. * This is to send reply for a request or to inform change in state.
  329. *
  330. * \param [in] ctx Context of the message.
  331. * \param [in] current_state_params Model specific current state parameters.
  332. * \param [in] target_state_params Model specific target state parameters (NULL: to be ignored).
  333. * \param [in] remaining_time Time from current state to target state (0: to be ignored).
  334. * \param [in] ext_params Additional parameters (NULL: to be ignored).
  335. *
  336. * \return API_SUCCESS or an error code indicating reason for failure
  337. */
  338. API_RESULT MS_light_lightness_setup_server_state_update
  339. (
  340. /* IN */ MS_ACCESS_MODEL_REQ_MSG_CONTEXT * ctx,
  341. /* IN */ MS_ACCESS_MODEL_STATE_PARAMS * current_state_params,
  342. /* IN */ MS_ACCESS_MODEL_STATE_PARAMS * target_state_params,
  343. /* IN */ UINT16 remaining_time,
  344. /* IN */ MS_ACCESS_MODEL_EXT_PARAMS * ext_params
  345. );
  346. /** \} */
  347. /**
  348. * \defgroup light_lightness_cli_api_defs Light Lightness Client API Definitions
  349. * \{
  350. * This section describes the Light Lightness Client APIs.
  351. */
  352. /**
  353. * \brief API to initialize Light_Lightness Client model
  354. *
  355. * \par Description
  356. * This is to initialize Light_Lightness Client model and to register with Acess layer.
  357. *
  358. * \param [in] element_handle
  359. * Element identifier to be associated with the model instance.
  360. *
  361. * \param [in, out] model_handle
  362. * Model identifier associated with the model instance on successful initialization.
  363. * After power cycle of an already provisioned node, the model handle will have
  364. * valid value and the same will be reused for registration.
  365. *
  366. * \param [in] appl_cb Application Callback to be used by the Light_Lightness Client.
  367. *
  368. * \return API_SUCCESS or an error code indicating reason for failure
  369. */
  370. API_RESULT MS_light_lightness_client_init
  371. (
  372. /* IN */ MS_ACCESS_ELEMENT_HANDLE element_handle,
  373. /* INOUT */ MS_ACCESS_MODEL_HANDLE * model_handle,
  374. /* IN */ MS_LIGHT_LIGHTNESS_CLIENT_CB appl_cb
  375. );
  376. /**
  377. * \brief API to get Light_Lightness client model handle
  378. *
  379. * \par Description
  380. * This is to get the handle of Light_Lightness client model.
  381. *
  382. * \param [out] model_handle Address of model handle to be filled/returned.
  383. *
  384. * \return API_SUCCESS or an error code indicating reason for failure
  385. */
  386. API_RESULT MS_light_lightness_client_get_model_handle
  387. (
  388. /* OUT */ MS_ACCESS_MODEL_HANDLE * model_handle
  389. );
  390. /**
  391. * \brief API to send acknowledged commands
  392. *
  393. * \par Description
  394. * This is to initialize sending acknowledged commands.
  395. *
  396. * \param [in] req_opcode Request Opcode.
  397. * \param [in] param Parameter associated with Request Opcode.
  398. * \param [in] rsp_opcode Response Opcode.
  399. *
  400. * \return API_SUCCESS or an error code indicating reason for failure
  401. */
  402. API_RESULT MS_light_lightness_client_send_reliable_pdu
  403. (
  404. /* IN */ UINT32 req_opcode,
  405. /* IN */ void * param,
  406. /* IN */ UINT32 rsp_opcode
  407. );
  408. /**
  409. * \brief API to get the Light Lightness Actual state of an element.
  410. *
  411. * \par Description
  412. * Light Lightness Get is an acknowledged message used to get the Light Lightness Actual state of an element.
  413. * The response to the Light Lightness Get message is a Light Lightness Status message.
  414. * There are no parameters for this message.
  415. *
  416. * \return API_SUCCESS or an error code indicating reason for failure
  417. */
  418. #define MS_light_lightness_get() \
  419. MS_light_lightness_client_send_reliable_pdu \
  420. (\
  421. MS_ACCESS_LIGHT_LIGHTNESS_GET_OPCODE,\
  422. NULL,\
  423. MS_ACCESS_LIGHT_LIGHTNESS_STATUS_OPCODE\
  424. )
  425. /**
  426. * \brief API to set the Light Lightness Actual state of an element.
  427. *
  428. * \par Description
  429. * The Light Lightness Set is an acknowledged message used to set the Light Lightness Actual state of an element.
  430. * The response to the Light Lightness Set message is a Light Lightness Status message.
  431. *
  432. * \param [in] param Light Lightness Set message
  433. *
  434. * \return API_SUCCESS or an error code indicating reason for failure
  435. */
  436. #define MS_light_lightness_set(param) \
  437. MS_light_lightness_client_send_reliable_pdu \
  438. (\
  439. MS_ACCESS_LIGHT_LIGHTNESS_SET_OPCODE,\
  440. param,\
  441. MS_ACCESS_LIGHT_LIGHTNESS_STATUS_OPCODE\
  442. )
  443. /**
  444. * \brief API to set the Light Lightness Actual state of an element.
  445. *
  446. * \par Description
  447. * The Light Lightness Set Unacknowledged is an unacknowledged message used to
  448. * set the Light Lightness Actual state of an element.
  449. *
  450. * \param [in] param Light Lightness Set message
  451. *
  452. * \return API_SUCCESS or an error code indicating reason for failure
  453. */
  454. #define MS_light_lightness_set_unacknowledged(param) \
  455. MS_light_lightness_client_send_reliable_pdu \
  456. (\
  457. MS_ACCESS_LIGHT_LIGHTNESS_SET_UNACKNOWLEDGED_OPCODE,\
  458. param,\
  459. 0xFFFFFFFF\
  460. )
  461. /**
  462. * \brief API to get the Light Lightness Linear state of an element.
  463. *
  464. * \par Description
  465. * Light Lightness Linear Get is an acknowledged message used to get the Light Lightness Linear state of an element.
  466. * The response to the Light Lightness Linear Get message is a Light Lightness Linear Status message.
  467. * There are no parameters for this message.
  468. *
  469. * \return API_SUCCESS or an error code indicating reason for failure
  470. */
  471. #define MS_light_lightness_linear_get() \
  472. MS_light_lightness_client_send_reliable_pdu \
  473. (\
  474. MS_ACCESS_LIGHT_LIGHTNESS_LINEAR_GET_OPCODE,\
  475. NULL,\
  476. MS_ACCESS_LIGHT_LIGHTNESS_LINEAR_STATUS_OPCODE\
  477. )
  478. /**
  479. * \brief API to set the Light Lightness Linear state of an element.
  480. *
  481. * \par Description
  482. * The Light Lightness Linear Set is an acknowledged message used to set the Light Lightness Linear state of an element.
  483. * The response to the Light Lightness Linear Set message is a Light Lightness Linear Status message.
  484. *
  485. * \param [in] param Light Lightness Linear Set message
  486. *
  487. * \return API_SUCCESS or an error code indicating reason for failure
  488. */
  489. #define MS_light_lightness_linear_set(param) \
  490. MS_light_lightness_client_send_reliable_pdu \
  491. (\
  492. MS_ACCESS_LIGHT_LIGHTNESS_LINEAR_SET_OPCODE,\
  493. param,\
  494. MS_ACCESS_LIGHT_LIGHTNESS_LINEAR_STATUS_OPCODE\
  495. )
  496. /**
  497. * \brief API to set the Light Lightness Linear state of an element.
  498. *
  499. * \par Description
  500. * The Light Lightness Linear Set Unacknowledged is an unacknowledged message
  501. * used to set the Light Lightness Linear state of an element.
  502. *
  503. * \param [in] param Light Lightness Linear Set message
  504. *
  505. * \return API_SUCCESS or an error code indicating reason for failure
  506. */
  507. #define MS_light_lightness_linear_set_unacknowledged(param) \
  508. MS_light_lightness_client_send_reliable_pdu \
  509. (\
  510. MS_ACCESS_LIGHT_LIGHTNESS_LINEAR_SET_UNACKNOWLEDGED_OPCODE,\
  511. param,\
  512. 0xFFFFFFFF\
  513. )
  514. /**
  515. * \brief API to get the Light Lightness Last state of an element.
  516. *
  517. * \par Description
  518. * Light Lightness Last Get is an acknowledged message used to get the Light Lightness Last state of an element.
  519. * The response to the Light Lightness Last Get message is a Light Lightness Last Status message.
  520. * There are no parameters for this message.
  521. *
  522. * \return API_SUCCESS or an error code indicating reason for failure
  523. */
  524. #define MS_light_lightness_last_get() \
  525. MS_light_lightness_client_send_reliable_pdu \
  526. (\
  527. MS_ACCESS_LIGHT_LIGHTNESS_LAST_GET_OPCODE,\
  528. NULL,\
  529. MS_ACCESS_LIGHT_LIGHTNESS_LAST_STATUS_OPCODE\
  530. )
  531. /**
  532. * \brief API to get the Light Lightness Default state of an element.
  533. *
  534. * \par Description
  535. * Light Lightness Default Get is an acknowledged message used to get the Light Lightness Default state of an element.
  536. * The response to the Light Lightness Default Get message is a Light Lightness Default Status message.
  537. * There are no parameters for this message.
  538. *
  539. * \return API_SUCCESS or an error code indicating reason for failure
  540. */
  541. #define MS_light_lightness_default_get() \
  542. MS_light_lightness_client_send_reliable_pdu \
  543. (\
  544. MS_ACCESS_LIGHT_LIGHTNESS_DEFAULT_GET_OPCODE,\
  545. NULL,\
  546. MS_ACCESS_LIGHT_LIGHTNESS_DEFAULT_STATUS_OPCODE\
  547. )
  548. /**
  549. * \brief API to set the Light Lightness Default state of an element.
  550. *
  551. * \par Description
  552. * The Light Lightness Default Set is an acknowledged message used to set the Light Lightness Default state of an element.
  553. * The response to the Light Lightness Default Set message is a Light Lightness Default Status message.
  554. *
  555. * \param [in] param Light Lightness Default Set message
  556. *
  557. * \return API_SUCCESS or an error code indicating reason for failure
  558. */
  559. #define MS_light_lightness_default_set(param) \
  560. MS_light_lightness_client_send_reliable_pdu \
  561. (\
  562. MS_ACCESS_LIGHT_LIGHTNESS_DEFAULT_SET_OPCODE,\
  563. param,\
  564. MS_ACCESS_LIGHT_LIGHTNESS_DEFAULT_STATUS_OPCODE\
  565. )
  566. /**
  567. * \brief API to set the Light Lightness Default state of an element.
  568. *
  569. * \par Description
  570. * The Light Lightness Default Set Unacknowledged is an unacknowledged message
  571. * used to set the Light Lightness Default state of an element.
  572. *
  573. * \param [in] param Light Lightness Default Set message
  574. *
  575. * \return API_SUCCESS or an error code indicating reason for failure
  576. */
  577. #define MS_light_lightness_default_set_unacknowledged(param) \
  578. MS_light_lightness_client_send_reliable_pdu \
  579. (\
  580. MS_ACCESS_LIGHT_LIGHTNESS_DEFAULT_SET_UNACKNOWLEDGED_OPCODE,\
  581. param,\
  582. 0xFFFFFFFF\
  583. )
  584. /**
  585. * \brief API to get the Light Lightness Range state of an element.
  586. *
  587. * \par Description
  588. * The Light Lightness Range Get is an acknowledged message used to get the Light Lightness Range state of an element.
  589. * The response to the Light Lightness Range Get message is a Light Lightness Range Status message.
  590. * There are no parameters for this message.
  591. *
  592. * \return API_SUCCESS or an error code indicating reason for failure
  593. */
  594. #define MS_light_lightness_range_get() \
  595. MS_light_lightness_client_send_reliable_pdu \
  596. (\
  597. MS_ACCESS_LIGHT_LIGHTNESS_RANGE_GET_OPCODE,\
  598. NULL,\
  599. MS_ACCESS_LIGHT_LIGHTNESS_RANGE_STATUS_OPCODE\
  600. )
  601. /**
  602. * \brief API to acknowledged message used to set the Light Lightness Range state of an element.
  603. *
  604. * \par Description
  605. * Light Lightness Range Set is an acknowledged message used to set the Light Lightness Range state of an element.
  606. * The response to the Light Lightness Range Get message is a Light Lightness Range Status message.
  607. *
  608. * \param [in] param Light Lightness Range Set message
  609. *
  610. * \return API_SUCCESS or an error code indicating reason for failure
  611. */
  612. #define MS_light_lightness_range_set(param) \
  613. MS_light_lightness_client_send_reliable_pdu \
  614. (\
  615. MS_ACCESS_LIGHT_LIGHTNESS_RANGE_SET_OPCODE,\
  616. param,\
  617. MS_ACCESS_LIGHT_LIGHTNESS_RANGE_STATUS_OPCODE\
  618. )
  619. /**
  620. * \brief API to acknowledged message used to set the Light Lightness Range state of an element.
  621. *
  622. * \par Description
  623. * Light Lightness Range Set Unacknowledged is an unacknowledged message used
  624. * to set the Light Lightness Range state of an element.
  625. *
  626. * \param [in] param Light Lightness Range Set message
  627. *
  628. * \return API_SUCCESS or an error code indicating reason for failure
  629. */
  630. #define MS_light_lightness_range_set_unacknowledged(param) \
  631. MS_light_lightness_client_send_reliable_pdu \
  632. (\
  633. MS_ACCESS_LIGHT_LIGHTNESS_RANGE_SET_UNACKNOWLEDGED_OPCODE,\
  634. param,\
  635. 0xFFFFFFFF\
  636. )
  637. /** \} */
  638. /** \} */
  639. /** \} */
  640. #endif /*_H_MS_LIGHT_LIGHTNESS_API_ */