MS_model_states.h 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396
  1. /**
  2. * \file MS_model_states.h
  3. */
  4. /*
  5. * Copyright (C) 2017. Mindtree Ltd.
  6. * All rights reserved.
  7. */
  8. #ifndef _H_MS_MODEL_STATES_
  9. #define _H_MS_MODEL_STATES_
  10. /* --------------------------------------------- Global Definitions */
  11. /* --------------------------------------------- Data Types/ Structures */
  12. /** Model State Type Defines */
  13. #define MS_STATE_GENERIC_ONOFF_T 0
  14. #define MS_STATE_GENERIC_LEVEL_T 1
  15. #define MS_STATE_GENERIC_DEFAULT_TRANSITION_TIME_T 2
  16. #define MS_STATE_GENERIC_ONPOWERUP_T 3
  17. #define MS_STATE_GENERIC_POWER_ACTUAL_T 4
  18. #define MS_STATE_GENERIC_POWER_LAST_T 5
  19. #define MS_STATE_GENERIC_POWER_DEFAULT_T 6
  20. #define MS_STATE_GENERIC_POWER_RANGE_T 7
  21. #define MS_STATE_GENERIC_POWER_LEVEL_T 8
  22. #define MS_STATE_GENERIC_BATTERY_T 9
  23. #define MS_STATE_GENERIC_LOCATION_GLOBAL_T 10
  24. #define MS_STATE_GENERIC_LOCATION_LOCAL_T 11
  25. #define MS_STATE_GENERIC_LOCATION_T 12
  26. #define MS_STATE_GENERIC_USER_PROPERTY_T 13
  27. #define MS_STATE_GENERIC_ADMIN_PROPERTY_T 14
  28. #define MS_STATE_GENERIC_MANUFACTURER_PROPERTY_T 15
  29. #define MS_STATE_GENERIC_PROPERTY_ID_T 16
  30. #define MS_STATE_GENERIC_PROPERTY_IDS_T 17
  31. #define MS_STATE_SENSOR_PROPERTY_ID_T 18
  32. #define MS_STATE_SENSOR_DESCRIPTOR_T 19
  33. #define MS_STATE_SENSOR_SETTINGS_T 20
  34. #define MS_STATE_SENSOR_SETTING_T 21
  35. #define MS_STATE_SENSOR_CADENCE_T 22
  36. #define MS_STATE_SENSOR_DATA_PROPERTY_ID_T 23
  37. #define MS_STATE_SENSOR_DATA_T 24
  38. #define MS_STATE_SENSOR_COLUMN_STATUS_T 25
  39. #define MS_STATE_SENSOR_SERIES_COLUMN_T 26
  40. #define MS_STATE_TIME_T 27
  41. #define MS_STATE_TIME_ZONE_T 28
  42. #define MS_STATE_TIME_TAI_UTC_DELTA_T 29
  43. #define MS_STATE_TIME_ROLE_T 30
  44. #define MS_STATE_SCENE_NUMBER_T 31
  45. #define MS_STATE_SCENE_STATUS_T 32
  46. #define MS_STATE_SCENE_REGISTER_STATUS_T 33
  47. #define MS_STATE_SCHEDULER_SCHEDULES_T 34
  48. #define MS_STATE_SCHEDULER_ENTRY_INDEX_T 35
  49. #define MS_STATE_SCHEDULER_ENTRY_T 36
  50. #define MS_STATE_LIGHT_LIGHTNESS_LINEAR_T 37
  51. #define MS_STATE_LIGHT_LIGHTNESS_ACTUAL_T 38
  52. #define MS_STATE_LIGHT_LIGHTNESS_LAST_T 39
  53. #define MS_STATE_LIGHT_LIGHTNESS_DEFAULT_T 40
  54. #define MS_STATE_LIGHT_LIGHTNESS_RANGE_T 41
  55. #define MS_STATE_LIGHT_LIGHTNESS_T 42
  56. #define MS_STATE_LIGHT_CTL_T 43
  57. #define MS_STATE_LIGHT_CTL_DEFAULT_T 44
  58. #define MS_STATE_LIGHT_CTL_TEMPERATURE_T 45
  59. #define MS_STATE_LIGHT_CTL_TEMPERATURE_RANGE_T 46
  60. #define MS_STATE_LIGHT_HSL_T 47
  61. #define MS_STATE_LIGHT_HSL_TARGET_T 48
  62. #define MS_STATE_LIGHT_HSL_DEFAULT_T 49
  63. #define MS_STATE_LIGHT_HSL_HUE_T 50
  64. #define MS_STATE_LIGHT_HSL_SATURATION_T 51
  65. #define MS_STATE_LIGHT_HSL_RANGE_T 52
  66. #define MS_STATE_LIGHT_XYL_T 53
  67. #define MS_STATE_LIGHT_XYL_TARGET_T 54
  68. #define MS_STATE_LIGHT_XYL_DEFAULT_T 55
  69. #define MS_STATE_LIGHT_XYL_RANGE_T 56
  70. #define MS_STATE_LIGHT_LC_MODE_T 57
  71. #define MS_STATE_LIGHT_LC_OM_T 58
  72. #define MS_STATE_LIGHT_LC_LIGHT_ONOFF_T 59
  73. #define MS_STATE_LIGHT_LC_PROPERTY_ID_T 60
  74. #define MS_STATE_LIGHT_LC_PROPERTY_T 61
  75. #define MS_STATE_GENERIC_USER_PROPERTY_IDS_T 62
  76. #define MS_STATE_GENERIC_ADMIN_PROPERTY_IDS_T 63
  77. #define MS_STATE_GENERIC_MANUFACTURER_PROPERTY_IDS_T 64
  78. #define MS_STATE_GENERIC_CLIENT_PROPERTY_IDS_T 65
  79. #define MS_STATE_SCENE_STORE_T 66
  80. #define MS_STATE_SCENE_RECALL_T 67
  81. #define MS_STATE_SCENE_DELETE_T 68
  82. #define MS_STATE_DELTA_LEVEL_T 69
  83. #define MS_STATE_MOVE_LEVEL_T 70
  84. /* Additional supporting structure type defines */
  85. #define MS_EXT_TID_AND_TRANSITION_STRUCT_T 128
  86. #define MS_EXT_STATUS_STRUCT_T 129
  87. #define MS_STATE_SENSOR_SERIES_T 130
  88. /**
  89. * Generic OnOff state is a Boolean value that represents the state of an
  90. * element
  91. */
  92. typedef struct MS_state_generic_onoff_struct
  93. {
  94. /** Generic On/Off */
  95. UINT8 onoff;
  96. /** Target On/Off - Used in response path */
  97. UINT8 target_onoff;
  98. /** Last On/Off */
  99. UINT8 last_onoff;
  100. /** TID - Used in request path */
  101. UINT8 tid;
  102. /**
  103. * Transition Time - Used in request path.
  104. * Used as remaining time in response path.
  105. */
  106. UINT8 transition_time;
  107. /** Delay - Used in request path */
  108. UINT8 delay;
  109. /** Transition Timer Handle */
  110. UINT16 transition_time_handle;
  111. } MS_STATE_GENERIC_ONOFF_STRUCT;
  112. /**
  113. * Generic Level state is a 16-bit signed integer (2-s complement) representing
  114. * the state of an element
  115. */
  116. typedef struct MS_state_generic_level_struct
  117. {
  118. /** Generic Level */
  119. UINT16 level;
  120. /** Delta Level */
  121. UINT32 delta_level;
  122. /** Move Level */
  123. UINT16 move_level;
  124. /* TID - Used in received path */
  125. UINT8 tid;
  126. /* Optional */
  127. /* Transition Time */
  128. UINT8 transition_time;
  129. /* Delay */
  130. UINT8 delay;
  131. /** Target Level */
  132. UINT16 target_level;
  133. } MS_STATE_GENERIC_LEVEL_STRUCT;
  134. /**
  135. * Generic Default Transition Time state determines how long an element shall
  136. * take to transition from a present state to a new state
  137. */
  138. typedef struct MS_state_generic_default_transition_time_struct
  139. {
  140. /** The number of Steps */
  141. UCHAR default_transition_number_of_steps;
  142. /** The resolution of the Default Transition Number of Steps field */
  143. UCHAR default_transition_step_resolution;
  144. } MS_STATE_GENERIC_DEFAULT_TRANSITION_TIME_STRUCT;
  145. /**
  146. * Generic OnPowerUp state is an enumeration representing the behavior of an
  147. * element when powered up
  148. */
  149. typedef struct MS_state_generic_onpowerup_struct
  150. {
  151. /** Generic OnPowerUp */
  152. UCHAR onpowerup;
  153. } MS_STATE_GENERIC_ONPOWERUP_STRUCT;
  154. /**
  155. * Generic Power Actual state determines the linear percentage of the maximum
  156. * power level of an element, representing a range from 0 percent through 100
  157. * percent
  158. */
  159. typedef struct MS_state_generic_power_actual_struct
  160. {
  161. /** Generic Power Actual */
  162. UINT16 power_actual;
  163. /* TID - Used only in request path */
  164. UINT8 tid;
  165. /** Generic Power Target - Used only in response path */
  166. UINT16 power_target;
  167. /**
  168. * Transition Time - Used in request path
  169. * Used as Remaining Time in response path
  170. */
  171. UINT8 transition_time;
  172. /* Delay - Used only in request path */
  173. UINT8 delay;
  174. /** Transition Timer Handle */
  175. UINT16 transition_time_handle;
  176. } MS_STATE_GENERIC_POWER_ACTUAL_STRUCT;
  177. /**
  178. * Generic Power Last state is a 16-bit value representing a percentage ranging
  179. * from (1/65535) percent to 100 percent
  180. */
  181. typedef struct MS_state_generic_power_last_struct
  182. {
  183. /** Generic Power Last */
  184. UINT16 power_last;
  185. } MS_STATE_GENERIC_POWER_LAST_STRUCT;
  186. /** Generic Power Default state is a 16-bit value ranging from 0 through 65535 */
  187. typedef struct MS_state_generic_power_default_struct
  188. {
  189. /** Generic Power Default */
  190. UINT16 power_default;
  191. } MS_STATE_GENERIC_POWER_DEFAULT_STRUCT;
  192. /**
  193. * Generic Power Range state determines the minimum and maximum power levels of
  194. * an element relative to the maximum power level an element can output
  195. */
  196. typedef struct MS_state_generic_power_range_struct
  197. {
  198. /** Generic Power Range - Minimum */
  199. UINT16 power_range_min;
  200. /** Generic Power Range - Maximum */
  201. UINT16 power_range_max;
  202. /** Status - Used only in the response path */
  203. UINT8 status;
  204. } MS_STATE_GENERIC_POWER_RANGE_STRUCT;
  205. /**
  206. * Generic Power Level state is a composite state that includes a Generic Power
  207. * Actual state, a Generic Power Last state, a Generic Power Default state, and
  208. * a Generic Power Range state
  209. */
  210. typedef struct MS_state_generic_power_level_struct
  211. {
  212. /** Generic Power Actual */
  213. MS_STATE_GENERIC_POWER_ACTUAL_STRUCT generic_power_actual;
  214. /** Generic Power Last */
  215. MS_STATE_GENERIC_POWER_LAST_STRUCT generic_power_last;
  216. /** Generic Power Default */
  217. MS_STATE_GENERIC_POWER_DEFAULT_STRUCT generic_power_default;
  218. /** Generic Power Range */
  219. MS_STATE_GENERIC_POWER_RANGE_STRUCT generic_power_range;
  220. } MS_STATE_GENERIC_POWER_LEVEL_STRUCT;
  221. /**
  222. * Generic Battery state is a set of four values representing the state of a
  223. * battery
  224. */
  225. typedef struct MS_state_generic_battery_struct
  226. {
  227. /**
  228. * Generic Battery Level state is a value ranging from 0 percent through 100
  229. * percent
  230. */
  231. UCHAR generic_battery_level;
  232. /**
  233. * Generic Battery Time to Discharge state is a 24-bit unsigned value ranging
  234. * from 0 through 0xFFFFFF
  235. */
  236. UINT32 generic_battery_time_to_discharge;
  237. /**
  238. * Generic Battery Time to Charge state is a 24-bit unsigned value ranging from
  239. * 0 through 0xFFFFFF
  240. */
  241. UINT32 generic_battery_time_to_charge;
  242. /**
  243. * Generic Battery Flags state is a concatenation of four 2-bit bit fields:
  244. * Presence, Indicator, Charging, and Serviceability
  245. */
  246. UCHAR generic_battery_flags;
  247. } MS_STATE_GENERIC_BATTERY_STRUCT;
  248. /** Generic Global Location state defines location information of an element */
  249. typedef struct MS_state_generic_location_global_struct
  250. {
  251. /** Global Coordinates (Latitude) */
  252. UINT32 global_latitude;
  253. /** Global Coordinates (Longitude) */
  254. UINT32 global_longitude;
  255. /** Global Altitude */
  256. UINT16 global_altitude;
  257. } MS_STATE_GENERIC_LOCATION_GLOBAL_STRUCT;
  258. /** Generic Local Location state defines location information of an element */
  259. typedef struct MS_state_generic_location_local_struct
  260. {
  261. /** Local Coordinates (North) */
  262. UINT16 local_north;
  263. /** Local Coordinates (East) */
  264. UINT16 local_east;
  265. /** Local Altitude */
  266. UINT16 local_altitude;
  267. /** Floor Number */
  268. UCHAR floor_number;
  269. /** Uncertainty */
  270. UINT16 uncertainty;
  271. } MS_STATE_GENERIC_LOCATION_LOCAL_STRUCT;
  272. /**
  273. * Generic Location state is a composite state that includes a Generic Location
  274. * Global state and a Generic Location Local state
  275. */
  276. typedef struct MS_state_generic_location_struct
  277. {
  278. /** Global Location */
  279. MS_STATE_GENERIC_LOCATION_GLOBAL_STRUCT global_location;
  280. /** Local Location */
  281. MS_STATE_GENERIC_LOCATION_LOCAL_STRUCT local_location;
  282. } MS_STATE_GENERIC_LOCATION_STRUCT;
  283. /**
  284. * Generic Property is a state representing a device property of an element.
  285. * The properties can be one of the following
  286. * - Manufacturer Properties
  287. * - Admin Properties
  288. * - User Properties
  289. */
  290. typedef struct MS_state_generic_property_struct
  291. {
  292. /**
  293. * User Property ID field is a 2-octet Assigned Number value referencing a
  294. * property
  295. */
  296. UINT16 property_id;
  297. /** Property Type - Manufacturer/Admin/User */
  298. UINT8 property_type;
  299. /**
  300. * User Access field is an enumeration indicating whether the device property
  301. * can be read or written as a Generic Admin/User Property
  302. */
  303. UCHAR access;
  304. /** User Property Value field is a conditional field */
  305. UCHAR * property_value;
  306. UINT16 property_value_len;
  307. } MS_STATE_GENERIC_PROPERTY_STRUCT;
  308. /** Generic User Property is a state representing a device property of an element */
  309. typedef struct MS_state_generic_user_property_struct
  310. {
  311. /**
  312. * User Property ID field is a 2-octet Assigned Number value referencing a
  313. * device property
  314. */
  315. UINT16 property_id;
  316. /**
  317. * User Access field is an enumeration indicating whether the device property
  318. * can be read or written as a Generic User Property
  319. */
  320. UCHAR user_access;
  321. /** User Property Value field is a conditional field */
  322. UCHAR * property_value;
  323. UINT16 property_value_len;
  324. } MS_STATE_GENERIC_USER_PROPERTY_STRUCT;
  325. /**
  326. * Generic Admin Property is a state representing a device property of an
  327. * element that can be read or written
  328. */
  329. typedef struct MS_state_generic_admin_property_struct
  330. {
  331. /**
  332. * Admin Property ID field is a 2-octet Assigned Number value referencing a
  333. * device property
  334. */
  335. UINT16 property_id;
  336. /**
  337. * Admin User Access field is an enumeration indicating whether the device
  338. * property can be read or written as a Generic User Property
  339. */
  340. UCHAR user_access;
  341. /** Admin Property Value field is a conditional field */
  342. UCHAR * property_value;
  343. UINT16 property_value_len;
  344. } MS_STATE_GENERIC_ADMIN_PROPERTY_STRUCT;
  345. /**
  346. * Generic Manufacturer Property is a state representing a device property of an
  347. * element that is programmed by a manufacturer and can be read
  348. */
  349. typedef struct MS_state_generic_manufacturer_property_struct
  350. {
  351. /**
  352. * Manufacturer Property ID field is a 2-octet Assigned Number value that
  353. * references a device property
  354. */
  355. UINT16 property_id;
  356. /**
  357. * Manufacturer User Access field is an enumeration indicating whether or not
  358. * the device property can be read as a Generic User Property
  359. */
  360. UCHAR user_access;
  361. /** Manufacturer Property Value field is a conditional field */
  362. UCHAR * property_value;
  363. UINT16 property_value_len;
  364. } MS_STATE_GENERIC_MANUFACTURER_PROPERTY_STRUCT;
  365. /**
  366. * Generic Property ID a read-only state representing a device property that an
  367. * element supports
  368. */
  369. typedef struct MS_state_generic_property_id_struct
  370. {
  371. /**
  372. * Property ID field is a 2-octet Assigned Number value that references a device
  373. * property
  374. */
  375. UINT16 property_id;
  376. } MS_STATE_GENERIC_PROPERTY_ID_STRUCT;
  377. /**
  378. * Generic Property IDs a state representing a set of device properties that an
  379. * element supports
  380. */
  381. typedef struct MS_state_generic_property_ids_struct
  382. {
  383. /**
  384. * Property IDs field is a set of 2-octet Assigned Number value that references
  385. * a set of device properties
  386. */
  387. UINT16 *property_ids;
  388. UINT16 property_ids_count;
  389. } MS_STATE_GENERIC_PROPERTY_IDS_STRUCT;
  390. /**
  391. * Sensor Property ID field is a 2-octet value referencing a device property
  392. * that describes the meaning and the format of data reported by a sensor
  393. */
  394. typedef struct MS_state_sensor_property_id_struct
  395. {
  396. /**
  397. * Sensor Property ID field is a 2-octet value referencing a device property
  398. * that describes the meaning and the format of data reported by a sensor
  399. */
  400. UINT16 property_id;
  401. } MS_STATE_SENSOR_PROPERTY_ID_STRUCT;
  402. /** Sensor Descriptor state represents the attributes describing the sensor data */
  403. typedef struct MS_state_sensor_descriptor_struct
  404. {
  405. /**
  406. * Sensor Property ID field is a 2-octet value referencing a device property
  407. * that describes the meaning and the format of data reported by a sensor
  408. */
  409. UINT16 sensor_property_id;
  410. /**
  411. * Sensor Positive Tolerance field is a 12-bit value representing the magnitude
  412. * of a possible positive error associated with the measurements that the sensor
  413. * is reporting
  414. */
  415. UINT16 sensor_positive_tolerance;
  416. /**
  417. * Sensor Negative Tolerance field is a 12-bit value representing the magnitude
  418. * of a possible negative error associated with the measurements that the sensor
  419. * is reporting
  420. */
  421. UINT16 sensor_negative_tolerance;
  422. /**
  423. * Sensor Sampling Function field specifies the averaging operation or type of
  424. * sampling function applied to the measured value
  425. */
  426. UCHAR sensor_sampling_function;
  427. /**
  428. * Sensor Measurement Period field specifies a uint8 value n that represents the
  429. * averaging time span, accumulation time, or measurement period in seconds over
  430. * which the measurement is taken
  431. */
  432. UCHAR sensor_measurement_period;
  433. /**
  434. * measurement reported by a sensor is internally refreshed at the frequency
  435. * indicated in the Sensor Update Interval field
  436. */
  437. UCHAR sensor_update_interval;
  438. /** Status - used in response to indicate if other fields to be included */
  439. UINT8 status;
  440. } MS_STATE_SENSOR_DESCRIPTOR_STRUCT;
  441. /** Sensor Settings state controls parameters of a sensor */
  442. typedef struct MS_state_sensor_settings_struct
  443. {
  444. /** Property ID of a sensor */
  445. UINT16 sensor_property_id;
  446. /** Property ID of a setting within a sensor */
  447. UINT16 *setting_property_ids;
  448. UINT16 setting_property_ids_count;
  449. } MS_STATE_SENSOR_SETTINGS_STRUCT;
  450. /** Sensor Setting state controls parameters of a sensor */
  451. typedef struct MS_state_sensor_setting_struct
  452. {
  453. /** Property ID of a sensor */
  454. UINT16 sensor_property_id;
  455. /** Property ID of a setting within a sensor */
  456. UINT16 sensor_setting_property_id;
  457. /** Read/Write access rights for the setting */
  458. UCHAR sensor_setting_access;
  459. /** Raw value of a setting within a sensor */
  460. UCHAR *sensor_setting_raw;
  461. UINT16 sensor_setting_raw_len;
  462. /* Status - used in response path */
  463. UINT8 status;
  464. } MS_STATE_SENSOR_SETTING_STRUCT;
  465. /** Sensor Cadence state controls the cadence of sensor reports */
  466. typedef struct MS_state_sensor_cadence_struct
  467. {
  468. /** Property ID of a sensor */
  469. UINT16 sensor_property_id;
  470. /** Divisor for the Publish Period */
  471. UCHAR fast_cadence_period_divisor;
  472. /** Defines the unit and format of the Status Trigger Delta fields */
  473. UCHAR status_trigger_type;
  474. /** Delta down value that triggers a status message */
  475. UCHAR *status_trigger_delta_down;
  476. UINT16 status_trigger_delta_down_len;
  477. /** Delta up value that triggers a status message */
  478. UCHAR *status_trigger_delta_up;
  479. UINT16 status_trigger_delta_up_len;
  480. /** Minimum interval between two consecutive Status messages */
  481. UCHAR status_min_interval;
  482. /** Low value for the fast cadence range */
  483. UCHAR *fast_cadence_low;
  484. UINT16 fast_cadence_low_len;
  485. /** High value for the fast cadence range */
  486. UCHAR *fast_cadence_high;
  487. UINT16 fast_cadence_high_len;
  488. /** Status - used in response path */
  489. UINT8 status;
  490. } MS_STATE_SENSOR_CADENCE_STRUCT;
  491. /**
  492. * The Sensor Data state is a sequence of one or more pairs of Sensor Property
  493. * ID and Raw Value fields, with each Raw Value field size and representation
  494. * defined by the characteristics referenced by the Sensor Property ID
  495. */
  496. typedef struct MS_state_sensor_data_struct
  497. {
  498. /** ID of the 1st device property of the sensor */
  499. UINT16 property_id_1;
  500. /**
  501. * Raw Value field with a size and representation defined by the 1st device
  502. * property
  503. */
  504. UCHAR *raw_value_1;
  505. UINT16 raw_value_1_len;
  506. /** ID of the 2nd device property of the sensor */
  507. UINT16 property_id_2;
  508. /**
  509. * Raw Value field with a size and representation defined by the 2nd device
  510. * property
  511. */
  512. UCHAR *raw_value_2;
  513. UINT16 raw_value_2_len;
  514. /** ID of the nth device property of the sensor */
  515. UINT16 property_id_n;
  516. /**
  517. * Raw Value field with a size and representation defined by the nth device
  518. * property
  519. */
  520. UCHAR *raw_value_n;
  521. UINT16 raw_value_n_len;
  522. /** Status - used in response path */
  523. UINT8 status;
  524. } MS_STATE_SENSOR_DATA_STRUCT;
  525. /**
  526. * Values measured by sensors may be organized as arrays (and represented as
  527. * series of columns, such as histograms
  528. */
  529. typedef struct MS_state_sensor_series_column_struct
  530. {
  531. /** Property describing the data series of the sensor */
  532. UINT16 sensor_property_id;
  533. /** Raw value representing the left corner of a column on the X axis */
  534. UCHAR *sensor_raw_value_x;
  535. UINT16 sensor_raw_value_x_len;
  536. /** Raw value representing the width of the column */
  537. UCHAR *sensor_column_width;
  538. UINT16 sensor_column_width_len;
  539. /** Raw value representing the height of the column on the Y axis */
  540. UCHAR *sensor_raw_value_y;
  541. UINT16 sensor_raw_value_y_len;
  542. /** Status - used in response path */
  543. UINT8 status;
  544. } MS_STATE_SENSOR_SERIES_COLUMN_STRUCT;
  545. /**
  546. * Mesh defines times based on International Atomic Time (TAI). The base
  547. * representation of times is the number of seconds after 00:00:00 TAI on
  548. * 2000-01-01 (that is, 1999-12-31T23:59:28 UTC)
  549. */
  550. typedef struct MS_state_time_struct
  551. {
  552. /** Current TAI time in seconds since the epoch. */
  553. UCHAR tai_seconds[5];
  554. /** The sub-second time in units of 1/256s. */
  555. UCHAR subsecond;
  556. /** Estimated uncertainty in 10-millisecond steps. */
  557. UCHAR uncertainty;
  558. /**
  559. * 0 = No Time Authority. The element does not have a trusted OOB source of
  560. * time, such as GPS or NTP. 1 = Time Authority. The element has a trusted OOB
  561. * source of time, such as GPS or NTP or a battery-backed, properly initialized
  562. * RTC.
  563. */
  564. UCHAR time_authority;
  565. /** Current difference between TAI and UTC in seconds */
  566. UINT16 tai_utc_delta;
  567. /** The local time zone offset in 15-minute increments */
  568. UCHAR time_zone_offset;
  569. } MS_STATE_TIME_STRUCT;
  570. /** Time Zone */
  571. typedef struct MS_state_time_zone_struct
  572. {
  573. /**
  574. * Current local time zone offset.
  575. * Meaningful only in 'Time Zone Status' response.
  576. */
  577. UCHAR time_zone_offset_current;
  578. /** Upcoming local time zone offset. */
  579. UCHAR time_zone_offset_new;
  580. /** Absolute TAI time when the Time Zone Offset will change from Current to New. */
  581. UCHAR tai_of_zone_change[5];
  582. } MS_STATE_TIME_ZONE_STRUCT;
  583. /** TAI-UTC Delta */
  584. typedef struct MS_state_time_tai_utc_delta_struct
  585. {
  586. /**
  587. * Current difference between TAI and UTC in seconds.
  588. * Meaningful only in 'TAI-UTC Delta Status' response.
  589. */
  590. UINT16 tai_utc_delta_current;
  591. /** Upcoming difference between TAI and UTC in seconds. */
  592. UINT16 tai_utc_delta_new;
  593. /** Always 0b0. Other values are Prohibited. */
  594. UCHAR padding;
  595. /** TAI Seconds time of the upcoming TAI-UTC Delta change */
  596. UCHAR tai_of_delta_change[5];
  597. } MS_STATE_TIME_TAI_UTC_DELTA_STRUCT;
  598. /** The Time Role state of an element */
  599. typedef struct MS_state_time_role_struct
  600. {
  601. /** Time Role */
  602. UCHAR role;
  603. } MS_STATE_TIME_ROLE_STRUCT;
  604. /** The state to identify a scene */
  605. typedef struct MS_state_scene_number_struct
  606. {
  607. /** The number to identify a scene */
  608. UINT16 number;
  609. } MS_STATE_SCENE_NUMBER_STRUCT;
  610. /** The current status of a currently active scene */
  611. typedef struct MS_state_scene_status_struct
  612. {
  613. /** Status Code */
  614. UCHAR status_code;
  615. /** Scene Number of a current scene. */
  616. UINT16 current_scene;
  617. /** Scene Number of a target scene. */
  618. UINT16 target_scene;
  619. /* Remaining Time */
  620. UINT8 remaining_time;
  621. } MS_STATE_SCENE_STATUS_STRUCT;
  622. /** The current status of scene register */
  623. typedef struct MS_state_scene_register_status_struct
  624. {
  625. /** Status Code */
  626. UCHAR status_code;
  627. /** Scene Number of a current scene. */
  628. UINT16 current_scene;
  629. /** A list of scenes stored within an element */
  630. UINT16 *scenes;
  631. UINT16 scenes_count;
  632. } MS_STATE_SCENE_REGISTER_STATUS_STRUCT;
  633. /** The current Schedule Register state of an element. */
  634. typedef struct MS_state_scheduler_schedules_struct
  635. {
  636. /** Bit field indicating defined Actions in the Schedule Register */
  637. UINT16 schedules;
  638. } MS_STATE_SCHEDULER_SCHEDULES_STRUCT;
  639. /** The entry index of the Schedule Register state */
  640. typedef struct MS_state_scheduler_entry_index_struct
  641. {
  642. /** Index of the Schedule Register entry */
  643. UCHAR index;
  644. } MS_STATE_SCHEDULER_ENTRY_INDEX_STRUCT;
  645. /** The entry of the Schedule Register state */
  646. typedef struct MS_state_scheduler_entry_struct
  647. {
  648. /** Index of the Schedule Register entry */
  649. UCHAR index;
  650. /** Scheduled year for the action */
  651. UCHAR year;
  652. /** Scheduled month for the action */
  653. UINT16 month;
  654. /** Scheduled day of the month for the action */
  655. UCHAR day;
  656. /** Scheduled hour for the action */
  657. UCHAR hour;
  658. /** Scheduled minute for the action */
  659. UCHAR minute;
  660. /** Scheduled second for the action */
  661. UCHAR second;
  662. /** Schedule days of the week for the action */
  663. UCHAR dayofweek;
  664. /** Action to be performed at the scheduled time */
  665. UCHAR action;
  666. /** Transition time for this action */
  667. UCHAR transition_time;
  668. /** Scene number to be used for some actions */
  669. UINT16 scene_number;
  670. } MS_STATE_SCHEDULER_ENTRY_STRUCT;
  671. /**
  672. * Light Lightness Linear state represents the lightness of a light on a linear
  673. * scale
  674. */
  675. typedef struct MS_state_light_lightness_linear_struct
  676. {
  677. /** Light Lightness Linear */
  678. UINT16 lightness_linear;
  679. /** Light Lightness Target - Used in response path. */
  680. UINT16 lightness_target;
  681. /** TID - Used in request path */
  682. UINT8 tid;
  683. /**
  684. * Transition Time - Used in request path.
  685. * Used as remaining time in response path.
  686. */
  687. UINT8 transition_time;
  688. /** Delay - Used in request path */
  689. UINT8 delay;
  690. } MS_STATE_LIGHT_LIGHTNESS_LINEAR_STRUCT;
  691. /**
  692. * Light Lightness Actual state represents the lightness of a light on a
  693. * perceptually uniform lightness scale
  694. */
  695. typedef struct MS_state_light_lightness_actual_struct
  696. {
  697. /** Light Lightness Actual */
  698. UINT16 lightness_actual;
  699. /** Light Lightness Target - Used in response path. */
  700. UINT16 lightness_target;
  701. /** TID - Used in request path */
  702. UINT8 tid;
  703. /**
  704. * Transition Time - Used in request path.
  705. * Used as remaining time in response path.
  706. */
  707. UINT8 transition_time;
  708. /** Delay - Used in request path */
  709. UINT8 delay;
  710. /** Transition Timer Handle */
  711. UINT16 transition_time_handle;
  712. } MS_STATE_LIGHT_LIGHTNESS_ACTUAL_STRUCT;
  713. /**
  714. * Light Lightness Last state represents the lightness of a light on a
  715. * perceptually uniform lightness scale
  716. */
  717. typedef struct MS_state_light_lightness_last_struct
  718. {
  719. /** Light Lightness Last */
  720. UINT16 lightness_last;
  721. } MS_STATE_LIGHT_LIGHTNESS_LAST_STRUCT;
  722. /**
  723. * Light Lightness Default state is a value ranging from 0x0000 to 0xFFFF,
  724. * representing a default lightness level for the Light Lightness Actual state
  725. */
  726. typedef struct MS_state_light_lightness_default_struct
  727. {
  728. /** Light Lightness Default */
  729. UINT16 lightness_default;
  730. } MS_STATE_LIGHT_LIGHTNESS_DEFAULT_STRUCT;
  731. /**
  732. * Light Lightness Range state determines the minimum and maximum lightness of
  733. * an element
  734. */
  735. typedef struct MS_state_light_lightness_range_struct
  736. {
  737. /** Light Lightness Range Min */
  738. UINT16 lightness_range_min;
  739. /** Light Lightness Range Max */
  740. UINT16 lightness_range_max;
  741. } MS_STATE_LIGHT_LIGHTNESS_RANGE_STRUCT;
  742. /**
  743. * Light Lightness state is a composite state that includes the Light Lightness
  744. * Linear, the Light Lightness Actual, the Light Lightness Last, and the Light
  745. * Lightness Default states
  746. */
  747. typedef struct MS_state_light_lightness_struct
  748. {
  749. /**
  750. * Light Lightness Linear state represents the lightness of a light on a linear
  751. * scale
  752. */
  753. MS_STATE_LIGHT_LIGHTNESS_LINEAR_STRUCT light_lightness_linear;
  754. /**
  755. * Light Lightness Actual state represents the lightness of a light on a
  756. * perceptually uniform lightness scale
  757. */
  758. MS_STATE_LIGHT_LIGHTNESS_ACTUAL_STRUCT light_lightness_actual;
  759. /**
  760. * Light Lightness Last state represents the lightness of a light on a
  761. * perceptually uniform lightness scale
  762. */
  763. MS_STATE_LIGHT_LIGHTNESS_LAST_STRUCT light_lightness_last;
  764. /**
  765. * Light Lightness Default state is a value ranging from 0x0000 to 0xFFFF,
  766. * representing a default lightness level for the Light Lightness Actual state
  767. */
  768. MS_STATE_LIGHT_LIGHTNESS_DEFAULT_STRUCT light_lightness_default;
  769. /**
  770. * Light Lightness Range state.
  771. */
  772. MS_STATE_LIGHT_LIGHTNESS_RANGE_STRUCT light_lightness_range;
  773. /** Status field used only for the Range Status */
  774. UINT8 range_status;
  775. } MS_STATE_LIGHT_LIGHTNESS_STRUCT;
  776. /**
  777. * Light CTL state is a composite state that includes the Light CTL Lightness,
  778. * the Light CTL Temperature and the Light CTL Delta UV states
  779. */
  780. typedef struct MS_state_light_ctl_struct
  781. {
  782. /** Light CTL Lightness */
  783. UINT16 ctl_lightness;
  784. /** Target Light CTL Lightness - Used in response path */
  785. UINT16 target_ctl_lightness;
  786. /** Light CTL Temperature */
  787. UINT16 ctl_temperature;
  788. /** Terget Light CTL Temperature - Used in response path */
  789. UINT16 target_ctl_temperature;
  790. /** Light CTL Delta UV */
  791. UINT16 ctl_delta_uv;
  792. /** TID - Used in request path */
  793. UINT8 tid;
  794. /**
  795. * Transition Time - Used in request path.
  796. * Used as remaining time in response path.
  797. */
  798. UINT8 transition_time;
  799. /** Delay - Used in request path */
  800. UINT8 delay;
  801. } MS_STATE_LIGHT_CTL_STRUCT;
  802. /**
  803. * Light CTL Default state is a composite state that includes the Light CTL
  804. * Lightness, the Light CTL Temperature and the Light CTL Delta UV states
  805. */
  806. typedef struct MS_state_light_ctl_default_struct
  807. {
  808. /** Light CTL Lightness */
  809. UINT16 ctl_lightness;
  810. /** Light CTL Temperature */
  811. UINT16 ctl_temperature;
  812. /** Light CTL Delta UV */
  813. UINT16 ctl_delta_uv;
  814. } MS_STATE_LIGHT_CTL_DEFAULT_STRUCT;
  815. /**
  816. * Light CTL Temperature state is a composite state that includes the Light CTL
  817. * Temperature and the Light CTL Delta UV states
  818. */
  819. typedef struct MS_state_light_ctl_temperature_struct
  820. {
  821. /** Light CTL Temperature */
  822. UINT16 ctl_temperature;
  823. /** Target Light CTL Temperature - Used in response path */
  824. UINT16 target_ctl_temperature;
  825. /** Light CTL Delta UV */
  826. UINT16 ctl_delta_uv;
  827. /** Target Light CTL Delta UV - Used in response path */
  828. UINT16 target_ctl_delta_uv;
  829. /** TID - Used in request path */
  830. UINT8 tid;
  831. /**
  832. * Transition Time - Used in request path.
  833. * Used as remaining time in response path.
  834. */
  835. UINT8 transition_time;
  836. /** Delay - Used in request path */
  837. UINT8 delay;
  838. } MS_STATE_LIGHT_CTL_TEMPERATURE_STRUCT;
  839. /**
  840. * Light CTL Temperature Range state determines the minimum and maximum color
  841. * temperatures of tunable white light an element is capable of emitting
  842. */
  843. typedef struct MS_state_light_ctl_temperature_range_struct
  844. {
  845. /** CTL Temperature Range Min */
  846. UINT16 ctl_temperature_range_min;
  847. /** CTL Temperature Range Max */
  848. UINT16 ctl_temperature_range_max;
  849. /** Status - Used in response path */
  850. UINT8 status;
  851. } MS_STATE_LIGHT_CTL_TEMPERATURE_RANGE_STRUCT;
  852. /**
  853. * Light HSL state is a composite state that includes the Light HSL Lighness,
  854. * the Light HSL Hue and the Light HSL Saturation states
  855. */
  856. typedef struct MS_state_light_hsl_struct
  857. {
  858. /** The perceived lightness of a light emitted by the element */
  859. UINT16 hsl_lightness;
  860. /** Target Perceived lightness - used in the response path */
  861. UINT16 target_hsl_lightness;
  862. /** The 16-bit value representing the hue */
  863. UINT16 hsl_hue;
  864. /** Target hue - used in the response path */
  865. UINT16 target_hsl_hue;
  866. /** The saturation of a color light */
  867. UINT16 hsl_saturation;
  868. /** Target saturation - used in the response path */
  869. UINT16 target_hsl_saturation;
  870. /** TID - Used in request path */
  871. UINT8 tid;
  872. /**
  873. * Transition Time - Used in request path.
  874. * Used as remaining time in response path.
  875. */
  876. UINT8 transition_time;
  877. /** Delay - Used in request path */
  878. UINT8 delay;
  879. /** Transition Timer Handle */
  880. UINT16 transition_time_handle;
  881. } MS_STATE_LIGHT_HSL_STRUCT;
  882. /**
  883. * Light HSL Target state is a composite state that includes the Light HSL
  884. * Lighness, the Light HSL Hue and the Light HSL Saturation states
  885. */
  886. typedef struct MS_state_light_hsl_target_struct
  887. {
  888. /** The perceived lightness of a light emitted by the element */
  889. UINT16 hsl_lightness;
  890. /** The 16-bit value representing the hue */
  891. UINT16 hsl_hue;
  892. /** The saturation of a color light */
  893. UINT16 hsl_saturation;
  894. } MS_STATE_LIGHT_HSL_TARGET_STRUCT;
  895. /**
  896. * Light HSL Default state is a composite state that includes the Light HSL
  897. * Lighness, the Light HSL Hue and the Light HSL Saturation states
  898. */
  899. typedef struct MS_state_light_hsl_default_struct
  900. {
  901. /** The perceived lightness of a light emitted by the element */
  902. UINT16 hsl_lightness;
  903. /** The 16-bit value representing the hue */
  904. UINT16 hsl_hue;
  905. /** The saturation of a color light */
  906. UINT16 hsl_saturation;
  907. } MS_STATE_LIGHT_HSL_DEFAULT_STRUCT;
  908. /** Light HSL Hue */
  909. typedef struct MS_state_light_hsl_hue_struct
  910. {
  911. /** The 16-bit value representing the hue */
  912. UINT16 hsl_hue;
  913. } MS_STATE_LIGHT_HSL_HUE_STRUCT;
  914. /** Light HSL Saturation */
  915. typedef struct MS_state_light_hsl_saturation_struct
  916. {
  917. /** The saturation of a color light */
  918. UINT16 hsl_saturation;
  919. } MS_STATE_LIGHT_HSL_SATURATION_STRUCT;
  920. /**
  921. * Light HSL Range state is a composite state that includes Minimum and Maximum
  922. * of the Light HSL Hue and the Light HSL Saturation states
  923. */
  924. typedef struct MS_state_light_hsl_range_struct
  925. {
  926. /** The value of the Hue Range Min field of the Light HSL Hue Range state */
  927. UINT16 hue_range_min;
  928. /** The value of the Hue Range Max field of the Light HSL Hue Range state */
  929. UINT16 hue_range_max;
  930. /**
  931. * The value of the Saturation Range Min field of the Light HSL Saturation Range
  932. * state
  933. */
  934. UINT16 saturation_range_min;
  935. /**
  936. * The value of the Saturation Range Max field of the Light HSL Saturation Range
  937. * state
  938. */
  939. UINT16 saturation_range_max;
  940. /** Status - Used only in response path */
  941. UINT8 status;
  942. } MS_STATE_LIGHT_HSL_RANGE_STRUCT;
  943. /**
  944. * Light xyL state is a composite state that includes the xyL Lightness, the
  945. * Light xyL x and the Light xyL y states
  946. */
  947. typedef struct MS_state_light_xyl_struct
  948. {
  949. /** The perceived lightness of a light emitted by the element */
  950. UINT16 xyl_lightness;
  951. /** Target perceived lightness - used in response path */
  952. UINT16 target_xyl_lightness;
  953. /** The 16-bit value representing the x coordinate of a CIE1931 color light */
  954. UINT16 xyl_x;
  955. /** Target x coordinate - used in response path */
  956. UINT16 target_xyl_x;
  957. /** The 16-bit value representing the y coordinate of a CIE1931 color light */
  958. UINT16 xyl_y;
  959. /** Target y coordinate - used in response path */
  960. UINT16 target_xyl_y;
  961. /** TID - Used in request path */
  962. UINT8 tid;
  963. /**
  964. * Transition Time - Used in request path.
  965. * Used as remaining time in response path.
  966. */
  967. UINT8 transition_time;
  968. /** Delay - Used in request path */
  969. UINT8 delay;
  970. /** Transition Timer Handle */
  971. UINT16 transition_time_handle;
  972. } MS_STATE_LIGHT_XYL_STRUCT;
  973. /**
  974. * Light xyL target state is a composite state that includes the xyL Lightness,
  975. * the Light xyL x and the Light xyL y states
  976. */
  977. typedef struct MS_state_light_xyl_target_struct
  978. {
  979. /** The perceived lightness of a light emitted by the element */
  980. UINT16 xyl_lightness;
  981. /** The 16-bit value representing the x coordinate of a CIE1931 color light */
  982. UINT16 xyl_x;
  983. /** The 16-bit value representing the y coordinate of a CIE1931 color light */
  984. UINT16 xyl_y;
  985. } MS_STATE_LIGHT_XYL_TARGET_STRUCT;
  986. /**
  987. * Light xyL default state is a composite state that includes the xyL Lightness,
  988. * the Light xyL x and the Light xyL y states
  989. */
  990. typedef struct MS_state_light_xyl_default_struct
  991. {
  992. /** The perceived lightness of a light emitted by the element */
  993. UINT16 xyl_lightness;
  994. /** The 16-bit value representing the x coordinate of a CIE1931 color light */
  995. UINT16 xyl_x;
  996. /** The 16-bit value representing the y coordinate of a CIE1931 color light */
  997. UINT16 xyl_y;
  998. } MS_STATE_LIGHT_XYL_DEFAULT_STRUCT;
  999. /**
  1000. * Light xyL Range state determines the minimum and maximum values of the Light
  1001. * xyL x and syL y state of an element
  1002. */
  1003. typedef struct MS_state_light_xyl_range_struct
  1004. {
  1005. /** The minimum value of a Light xyL x state of an element */
  1006. UINT16 xyl_x_range_min;
  1007. /** The maximum value of a Light xyL x state of an element */
  1008. UINT16 xyl_x_range_max;
  1009. /** The minimum value of a Light xyL y state of an element */
  1010. UINT16 xyl_y_range_min;
  1011. /** The maximum value of a Light xyL y state of an element */
  1012. UINT16 xyl_y_range_max;
  1013. /** Status - Used in the response path */
  1014. UINT8 status;
  1015. } MS_STATE_LIGHT_XYL_RANGE_STRUCT;
  1016. /** Light LC Mode state */
  1017. typedef struct MS_state_light_lc_mode_struct
  1018. {
  1019. /** Light LC Mode state - present */
  1020. UCHAR present_mode;
  1021. /** Light LC Mode state - target */
  1022. UCHAR target_mode;
  1023. } MS_STATE_LIGHT_LC_MODE_STRUCT;
  1024. /** Light LC Occupancy Mode state */
  1025. typedef struct MS_state_light_lc_om_struct
  1026. {
  1027. /** Light LC Occupancy Mode state - present */
  1028. UCHAR present_mode;
  1029. /** Light LC Occupancy Mode state - target */
  1030. UCHAR target_mode;
  1031. } MS_STATE_LIGHT_LC_OM_STRUCT;
  1032. /** Light LC Light OnOff State */
  1033. typedef struct MS_state_light_lc_light_onoff_struct
  1034. {
  1035. /** Light LC Light OnOff State */
  1036. UCHAR present_light_onoff;
  1037. /** Light LC Light OnOff State */
  1038. UCHAR target_light_onoff;
  1039. /** TID - Used in request path */
  1040. UINT8 tid;
  1041. /**
  1042. * Transition Time - Used in request path.
  1043. * Used as remaining time in response path.
  1044. */
  1045. UINT8 transition_time;
  1046. /** Delay - Used in request path */
  1047. UINT8 delay;
  1048. } MS_STATE_LIGHT_LC_LIGHT_ONOFF_STRUCT;
  1049. /** Property ID identifying a Light LC Property */
  1050. typedef struct MS_state_light_lc_property_id_struct
  1051. {
  1052. /** Property ID identifying a Light LC Property */
  1053. UINT16 property_id;
  1054. } MS_STATE_LIGHT_LC_PROPERTY_ID_STRUCT;
  1055. /** Light LC Property state */
  1056. typedef struct MS_state_light_lc_property_struct
  1057. {
  1058. /** Property ID identifying a Light LC Property */
  1059. UINT16 property_id;
  1060. /** Raw value for the Light LC Property */
  1061. UCHAR *property_value;
  1062. UINT16 property_value_len;
  1063. } MS_STATE_LIGHT_LC_PROPERTY_STRUCT;
  1064. /* Additional supporting structure defines */
  1065. /**
  1066. * TID and Transition is a structure which contains Transaction ID (TID) as mandatory field.
  1067. * Other two fields, Transition Time and Delay are optional.
  1068. *
  1069. * TID field is a transaction identifier indicating whether the message is a new message or
  1070. * a retransmission of a previously sent message.
  1071. *
  1072. * If present, the Transition Time field identifies the time that an element will take
  1073. * to transition to the target state from the present state.
  1074. *
  1075. * The Delay field shall be present when the Transition Time field is present.
  1076. * It identifies the message execution delay, representing a time interval between receiving
  1077. * the message by a model and executing the associated model behaviors.
  1078. */
  1079. typedef struct MS_ext_tid_and_transition_struct
  1080. {
  1081. UCHAR tid;
  1082. UCHAR transition_time;
  1083. UCHAR delay;
  1084. UCHAR optional_fields_present;
  1085. } MS_EXT_TID_AND_TRANSITION_STRUCT;
  1086. /**
  1087. * The Status Code field identifies the Status Code for the last operation.
  1088. */
  1089. typedef struct MS_ext_status_struct
  1090. {
  1091. UCHAR status;
  1092. } MS_EXT_STATUS_STRUCT;
  1093. /* State Transition data structure */
  1094. typedef struct _MS_ACCESS_STATE_TRANSITION_TYPE
  1095. {
  1096. /* Transition Timer */
  1097. EM_timer_handle transition_timer_handle;
  1098. /* Transition State. Initial/delay/transition */
  1099. UINT8 transition_state;
  1100. /* Delay */
  1101. UINT8 delay;
  1102. /* Transition Time */
  1103. UINT8 transition_time;
  1104. /* Transition Start Callback */
  1105. void (* transition_start_cb)(void *);
  1106. /* Transition Complete Callback */
  1107. void (* transition_complete_cb)(void *);
  1108. /* Blob/Context */
  1109. void * blob;
  1110. }MS_ACCESS_STATE_TRANSITION_TYPE;
  1111. /* --------------------------------------------- Function */
  1112. #endif /*_H_MS_MODEL_STATES_ */