Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

976 lines
61 KiB

  1. /*
  2. * jod15Dec92: Added Keiths codes from kcodes.h
  3. * jod16Dec92: Added RATED_LINE_VOLTAGE and HOST_SHUTDOWN
  4. * ane16Dec92: Added shutdown and bindery constants
  5. * ane11Jan93: Added SHUTDOWN_WAKEUP_TIME
  6. * pcy19Jan93: Added MEASURE_UPS group stuff, and HOST_LOW_BATTERY_SHUTDOWN now
  7. * jod28Jan93: Added SHUTDOWN_CONDITION
  8. * pcy21Apr93: OS2 FE merge
  9. * pcy30Apr93: Added FRONT_END_HEIGHT, FRONT_END_WIDTH
  10. * jod05Apr93: Added changes for Deep Discharge
  11. * jod14May93: Added Matrix changes.
  12. * cad04Aug93: Cleaned up/added host codes
  13. * cad12Aug93: Added code to set comm port
  14. * cad27Aug93: Added comm port and mups stuff and made one message interval
  15. * cad16Sep93: Added timer pulse
  16. * cad27Sep93: misc codes added, including FIXED_VALUE for graph thresholds
  17. * cad07Oct93: Added cool codes
  18. * cad29Oct93: server list change and delete codes
  19. * cad08Dec93: Flex event codes
  20. * cad19Jan94: more flex event codes
  21. * cad24Jan94: added more
  22. * pcy28Jan94: added more flex codes
  23. * cad02Feb94: uflex event users
  24. * cad08Jan94: removed run time enabled stuff
  25. * rct28Feb94: email & paging codes
  26. * pcy04Mar94: Added shutdowner message codes
  27. * cad04Mar94: added user codes
  28. * rct09Mar94: fixed some shutdowner stuff
  29. * cad14Mar94: added AIO stuff
  30. * cad16Mar94: added modem stuff
  31. * cad28Mar94: added code to reset ups comm port
  32. * cad07Apr94: fixed dupes, added reset to default stuff
  33. * cad18Apr94: added modem code for wait for dial tone
  34. * ajr10Jun94: Added a LOW_BATTERY shutdown code.
  35. * dml13Sep95: added standalone code
  36. * djs05Feb96: Added firmware rev codes
  37. * djs07May96: Added Dark Star codes
  38. * pcy04Jun96: Added Bridge Window Handle
  39. * ntf11Jun96: Added LEFT_BAR_TYPE ... RIGHT_BAR_TYPE
  40. * djs18Jun96: Moved firmware codes to the UPS obj
  41. * ntf23Jun96: Changed LEFT... to FIRST, MIDDLE -> SECOND and RIGHT -> THIRD
  42. * pcy28jun96: Added IS_ stuff for menus
  43. * pam08Jul96: Added MORE_UPS_ATTRIBUTES, MORE_UPS_STATE_VALUES
  44. * djs12Jul96: Added IS_ bar graph codes
  45. * pam12Jul96: Added SERVER_PRODUCT_NAME, SERVER_VERSION, SERVER_PLATFORM
  46. * srt19Dec96: Added COMPUTER_NAME
  47. * srt04Jun97: Added IS_EXT_SLEEP_UPS
  48. * tjg11Jul97: Added CURRENT_FIRMWARE_REV
  49. * tjg03Sep97: Added Front End Version codes
  50. * tjg05Sep97: Added EMAIL codes
  51. * awm07Oct97: Added FLEX_EVENT_NAME_LIST
  52. * awm14Oct97: Added Testing codes
  53. * tjg10Nov97: Added IS_SMTP_EMAIL code
  54. * awm22Nov97: Added FLEX_TEST_AVAILABLE
  55. * tjg02Dec97: Changed IS_DARKSTAR to IS_SYMMETRA, changed MINIMUM_LOAD_CAPABILITY
  56. * to MAX_LOAD... removed RIM_INSTALLATION_STATUS
  57. * dma10Dec97: Resolved conflict between SPECIFIC_SMARTSCHEDULING and IS_SYMMETRA codes.
  58. * Cleaned up look of the code.
  59. * clk24Jun98: Added PENDING_EVENT to Internal
  60. * mholly12May1999: add TURN_OFF_SMART_MODE code
  61. */
  62. #ifndef __CODES_H
  63. #define __CODES_H
  64. #define NO_CODE 0
  65. // ****** UPS STUFF ******
  66. #define UPS 0
  67. #define UPS_ATTRIBUTES 0
  68. #define UPS_STATES 200
  69. #define UPS_STATE_VALUES 300
  70. #define UPS_ACTIONS 400
  71. #define MORE_UPS_ATTRIBUTES 500
  72. #define MORE_UPS_STATE_VALUES 700
  73. // Attributes
  74. #define TOTAL_BATTERY_PACKS (UPS + UPS_ATTRIBUTES + 1)
  75. #define BAD_BATTERY_PACKS (UPS + UPS_ATTRIBUTES + 2)
  76. #define TRANSFER_CAUSE (UPS + UPS_ATTRIBUTES + 3)
  77. #define FIRMWARE_REV (UPS + UPS_ATTRIBUTES + 4)
  78. #define RATED_BATTERY_VOLTAGE (UPS + UPS_ATTRIBUTES + 5)
  79. #define BATTERY_CAPACITY (UPS + UPS_ATTRIBUTES + 6)
  80. #define TRIP_REGISTER (UPS + UPS_ATTRIBUTES + 7)
  81. #define DIP_SWITCH_POSITION (UPS + UPS_ATTRIBUTES + 8)
  82. #define RUN_TIME_REMAINING (UPS + UPS_ATTRIBUTES + 9)
  83. #define COPYRIGHT (UPS + UPS_ATTRIBUTES + 10)
  84. #define BATTERY_VOLTAGE (UPS + UPS_ATTRIBUTES + 11)
  85. #define UPS_TEMPERATURE (UPS + UPS_ATTRIBUTES + 12)
  86. #define OUTPUT_FREQUENCY (UPS + UPS_ATTRIBUTES + 13)
  87. #define LINE_VOLTAGE (UPS + UPS_ATTRIBUTES + 14)
  88. #define MAX_LINE_VOLTAGE (UPS + UPS_ATTRIBUTES + 15)
  89. #define MIN_LINE_VOLTAGE (UPS + UPS_ATTRIBUTES + 16)
  90. #define OUTPUT_VOLTAGE (UPS + UPS_ATTRIBUTES + 17)
  91. #define UPS_LOAD (UPS + UPS_ATTRIBUTES + 18)
  92. #define EEPROM_RESET (UPS + UPS_ATTRIBUTES + 19)
  93. #define EEPROM_DECREMENT (UPS + UPS_ATTRIBUTES + 20)
  94. #define UPS_ID (UPS + UPS_ATTRIBUTES + 21)
  95. #define UPS_SERIAL_NUMBER (UPS + UPS_ATTRIBUTES + 22)
  96. #define MANUFACTURE_DATE (UPS + UPS_ATTRIBUTES + 23)
  97. #define BATTERY_REPLACEMENT_DATE (UPS + UPS_ATTRIBUTES + 24)
  98. #define HIGH_TRANSFER_VOLTAGE (UPS + UPS_ATTRIBUTES + 25)
  99. #define LOW_TRANSFER_VOLTAGE (UPS + UPS_ATTRIBUTES + 26)
  100. #define MIN_RETURN_CAPACITY (UPS + UPS_ATTRIBUTES + 27)
  101. #define RATED_OUTPUT_VOLTAGE (UPS + UPS_ATTRIBUTES + 28)
  102. #define UPS_SENSITIVITY (UPS + UPS_ATTRIBUTES + 29)
  103. #define LOW_BATTERY_DURATION (UPS + UPS_ATTRIBUTES + 30)
  104. #define ALARM_DELAY (UPS + UPS_ATTRIBUTES + 31)
  105. #define SHUTDOWN_DELAY (UPS + UPS_ATTRIBUTES + 32)
  106. #define TURN_ON_DELAY (UPS + UPS_ATTRIBUTES + 33)
  107. #define EARLY_TURN_OFF_POINTS (UPS + UPS_ATTRIBUTES + 34)
  108. #define UPS_SELF_TEST_SCHEDULE (UPS + UPS_ATTRIBUTES + 35)
  109. #define SELF_TEST_DAY (UPS + UPS_ATTRIBUTES + 36)
  110. #define SELF_TEST_TIME (UPS + UPS_ATTRIBUTES + 37)
  111. #define SELF_TEST_SETTING (UPS + UPS_ATTRIBUTES + 38)
  112. #define SELF_TEST_LAST_DATE (UPS + UPS_ATTRIBUTES + 39)
  113. #define SELF_TEST_LAST_TIME (UPS + UPS_ATTRIBUTES + 40)
  114. #define SELF_TEST_RESULT (UPS + UPS_ATTRIBUTES + 41)
  115. #define LOW_BATTERY_VOLTAGE_THRESHOLD (UPS + UPS_ATTRIBUTES + 42)
  116. #define HIGH_BATTERY_VOLTAGE_THRESHOLD (UPS + UPS_ATTRIBUTES + 43)
  117. #define LOW_BV_THRESHOLD_ENABLED (UPS + UPS_ATTRIBUTES + 44)
  118. #define HIGH_BV_THRESHOLD_ENABLED (UPS + UPS_ATTRIBUTES + 45)
  119. #define LOW_UPS_TEMP_THRESHOLD (UPS + UPS_ATTRIBUTES + 46)
  120. #define HIGH_UPS_TEMP_THRESHOLD (UPS + UPS_ATTRIBUTES + 47)
  121. #define LOW_UPS_TEMP_THRESHOLD_ENABLED (UPS + UPS_ATTRIBUTES + 48)
  122. #define HIGH_UPS_TEMP_THRESHOLD_ENABLED (UPS + UPS_ATTRIBUTES + 49)
  123. #define LOW_FREQUENCY_THRESHOLD (UPS + UPS_ATTRIBUTES + 50)
  124. #define HIGH_FREQUENCY_THRESHOLD (UPS + UPS_ATTRIBUTES + 51)
  125. #define LOW_FREQUENCY_THRESHOLD_ENABLED (UPS + UPS_ATTRIBUTES + 52)
  126. #define HIGH_FREQUENCY_THRESHOLD_ENABLED (UPS + UPS_ATTRIBUTES + 53)
  127. #define LOW_LINEV_THRESHOLD (UPS + UPS_ATTRIBUTES + 54)
  128. #define HIGH_LINEV_THRESHOLD (UPS + UPS_ATTRIBUTES + 55)
  129. #define LOW_LINEV_THRESHOLD_ENABLED (UPS + UPS_ATTRIBUTES + 56)
  130. #define HIGH_LINEV_THRESHOLD_ENABLED (UPS + UPS_ATTRIBUTES + 57)
  131. #define LOW_OUTV_THRESHOLD (UPS + UPS_ATTRIBUTES + 58)
  132. #define HIGH_OUTV_THRESHOLD (UPS + UPS_ATTRIBUTES + 59)
  133. #define LOW_OUTV_THRESHOLD_ENABLED (UPS + UPS_ATTRIBUTES + 60)
  134. #define HIGH_OUTV_THRESHOLD_ENABLED (UPS + UPS_ATTRIBUTES + 61)
  135. #define LOW_LOAD_THRESHOLD (UPS + UPS_ATTRIBUTES + 62)
  136. #define HIGH_LOAD_THRESHOLD (UPS + UPS_ATTRIBUTES + 63)
  137. #define LOW_LOAD_THRESHOLD_ENABLED (UPS + UPS_ATTRIBUTES + 64)
  138. #define HIGH_LOAD_THRESHOLD_ENABLED (UPS + UPS_ATTRIBUTES + 65)
  139. #define BATTERY_AGE_LIMIT (UPS + UPS_ATTRIBUTES + 66)
  140. #define LOW_MAX_LINEV_THRESHOLD (UPS + UPS_ATTRIBUTES + 67)
  141. #define HIGH_MAX_LINEV_THRESHOLD (UPS + UPS_ATTRIBUTES + 68)
  142. #define LOW_MAX_LINEV_THRESHOLD_ENABLED (UPS + UPS_ATTRIBUTES + 69)
  143. #define HIGH_MAX_LINEV_THRESHOLD_ENABLED (UPS + UPS_ATTRIBUTES + 70)
  144. #define LOW_MIN_LINEV_THRESHOLD (UPS + UPS_ATTRIBUTES + 71)
  145. #define HIGH_MIN_LINEV_THRESHOLD (UPS + UPS_ATTRIBUTES + 72)
  146. #define LOW_MIN_LINEV_THRESHOLD_ENABLED (UPS + UPS_ATTRIBUTES + 73)
  147. #define HIGH_MIN_LINEV_THRESHOLD_ENABLED (UPS + UPS_ATTRIBUTES + 74)
  148. #define BATTERY_TYPE (UPS + UPS_ATTRIBUTES + 75)
  149. #define AVERAGE_VOLTAGE (UPS + UPS_ATTRIBUTES + 76)
  150. #define UPS_MODEL (UPS + UPS_ATTRIBUTES + 78)
  151. #define FAILURE_CAUSE (UPS + UPS_ATTRIBUTES + 79)
  152. #define TIMED_RUN_TIME_REMAINING (UPS + UPS_ATTRIBUTES + 80)
  153. #define ALLOWED_VALUES (UPS + UPS_ATTRIBUTES + 81)
  154. #define ALLOWED_RATED_OUTPUT_VOLTAGES (UPS + UPS_ATTRIBUTES + 82)
  155. #define ALLOWED_HIGH_TRANSFER_VOLTAGES (UPS + UPS_ATTRIBUTES + 83)
  156. #define ALLOWED_LOW_TRANSFER_VOLTAGES (UPS + UPS_ATTRIBUTES + 84)
  157. #define ALLOWED_MIN_RETURN_CAPACITIES (UPS + UPS_ATTRIBUTES + 85)
  158. #define ALLOWED_UPS_SENSITIVITIES (UPS + UPS_ATTRIBUTES + 86)
  159. #define ALLOWED_LOW_BATTERY_DURATIONS (UPS + UPS_ATTRIBUTES + 87)
  160. #define ALLOWED_ALARM_DELAYS (UPS + UPS_ATTRIBUTES + 88)
  161. #define ALLOWED_SHUTDOWN_DELAYS (UPS + UPS_ATTRIBUTES + 89)
  162. #define ALLOWED_TURN_ON_DELAYS (UPS + UPS_ATTRIBUTES + 90)
  163. #define MAX_BATTERY_RUN_TIME (UPS + UPS_ATTRIBUTES + 91)
  164. #define BATTERY_CALIBRATION_DAY (UPS + UPS_ATTRIBUTES + 99)
  165. #define BATTERY_CALIBRATION_TIME (UPS + UPS_ATTRIBUTES + 100)
  166. #define STATE_REGISTER (UPS + UPS_ATTRIBUTES + 101)
  167. #define BATTERY_CALIBRATION_ENABLED (UPS + UPS_ATTRIBUTES + 102)
  168. #define DAILY_SELF_TEST_ENABLED (UPS + UPS_ATTRIBUTES + 103)
  169. #define WEEKLY_SELF_TEST_ENABLED (UPS + UPS_ATTRIBUTES + 104)
  170. #define AUTO_REBOOT_ENABLED (UPS + UPS_ATTRIBUTES + 105)
  171. #define DATA_DECREMENT (UPS + UPS_ATTRIBUTES + 106)
  172. #define UPS_TYPE (UPS + UPS_ATTRIBUTES + 107)
  173. #define BYPASS_CAUSE (UPS + UPS_ATTRIBUTES + 108)
  174. #define BYPASS_BY_SOFTWARE (UPS + UPS_ATTRIBUTES + 109)
  175. #define BYPASS_BY_SWITCH (UPS + UPS_ATTRIBUTES + 110)
  176. #define BYPASS_BY_DC_IMBALANCE (UPS + UPS_ATTRIBUTES + 111)
  177. #define BYPASS_BY_VOLTAGE_LIMITS (UPS + UPS_ATTRIBUTES + 112)
  178. #define BYPASS_BY_TOP_FAN_FAILURE (UPS + UPS_ATTRIBUTES + 113)
  179. #define BYPASS_BY_INTERNAL_TEMP (UPS + UPS_ATTRIBUTES + 114)
  180. #define BYPASS_BY_BATT_CHARGER_FAILED (UPS + UPS_ATTRIBUTES + 115)
  181. #define TRIP1_REGISTER (UPS + UPS_ATTRIBUTES + 116)
  182. #define SLAVE_ENABLED (UPS + UPS_ATTRIBUTES + 117)
  183. #define IS_EEPROM_PROGRAMMABLE (UPS + UPS_ATTRIBUTES + 119)
  184. #define IS_LOAD_SENSING_ON (UPS + UPS_ATTRIBUTES + 120)
  185. #define OUTPUT_VOLTAGE_REPORT (UPS + UPS_ATTRIBUTES + 121)
  186. #define UPS_LANGUAGE (UPS + UPS_ATTRIBUTES + 122)
  187. #define AUTO_SELF_TEST (UPS + UPS_ATTRIBUTES + 123)
  188. #define UPS_ALLOWED_VALUES (UPS + UPS_ATTRIBUTES + 124)
  189. #define EEPROM_ALLOWED_VALUES (UPS + UPS_ATTRIBUTES + 125)
  190. #define BATTERY_CALIBRATION_LAST_DATE (UPS + UPS_ATTRIBUTES + 126)
  191. #define TIME_ON_BATTERY (UPS + UPS_ATTRIBUTES + 127)
  192. #define UPS_RUN_TIME_AFTER_LOW_BATTERY (UPS + UPS_ATTRIBUTES + 128)
  193. #define UPS_FRONT_PANEL_PASSWORD (UPS + UPS_ATTRIBUTES + 129)
  194. #define ALLOWED_UPS_RUN_TIME_AFTER_LOW_BATTERY (UPS + UPS_ATTRIBUTES + 130)
  195. #define UPS_MODEL_NAME (UPS + UPS_ATTRIBUTES + 131)
  196. #define EEPROM_INCREMENT (UPS + UPS_ATTRIBUTES + 132)
  197. #define INTERNAL_BATTERY_PACKS (UPS + UPS_ATTRIBUTES + 133)
  198. #define EXTERNAL_BATTERY_PACKS (UPS + UPS_ATTRIBUTES + 134)
  199. #define EXTERNAL_PACKS_CHANGEABLE (UPS + UPS_ATTRIBUTES + 135)
  200. #define DECIMAL_FIRMWARE_REV (UPS + UPS_ATTRIBUTES + 136)
  201. #define IS_ADMIN_SHUTDOWN (UPS + UPS_ATTRIBUTES + 137)
  202. #define IS_SECOND_GEN (UPS + UPS_ATTRIBUTES + 138)
  203. #define MAX_VOLTAGE_RANGE_VALUE (UPS + UPS_ATTRIBUTES + 139)
  204. #define MIN_VOLTAGE_RANGE_VALUE (UPS + UPS_ATTRIBUTES + 140)
  205. #define IS_MATRIX (UPS + UPS_ATTRIBUTES + 141)
  206. #define IS_THIRD_GEN (UPS + UPS_ATTRIBUTES + 142)
  207. #define IS_FIRST_GEN (UPS + UPS_ATTRIBUTES + 143)
  208. #define IS_BACKUPS (UPS + UPS_ATTRIBUTES + 144)
  209. #define IS_SYMMETRA (UPS + UPS_ATTRIBUTES + 145)
  210. // Smart Scheduling
  211. #define DAILY_SMARTSCHEDULING (UPS + UPS_ATTRIBUTES + 146)
  212. #define MONTHLY_SMARTSCHEDULING (UPS + UPS_ATTRIBUTES + 147)
  213. #define NO_SMARTSCHEDULING (UPS + UPS_ATTRIBUTES + 148)
  214. #define SELFTEST_LIST (UPS + UPS_ATTRIBUTES + 149)
  215. #define BATTERY_CALIBRATION_LIST (UPS + UPS_ATTRIBUTES + 150)
  216. // Dark Star
  217. #define MODULE_COUNTS_AND_STATUS (UPS + UPS_ATTRIBUTES + 151)
  218. #define ABNORMAL_CONDITION_REGISTER (UPS + UPS_ATTRIBUTES + 152)
  219. #define INPUT_VOLTAGE_FREQUENCY (UPS + UPS_ATTRIBUTES + 153)
  220. #define OUTPUT_VOLTAGE_CURRENTS (UPS + UPS_ATTRIBUTES + 154)
  221. #define TOTAL_INVERTERS (UPS + UPS_ATTRIBUTES + 155)
  222. #define NUMBER_BAD_INVERTERS (UPS + UPS_ATTRIBUTES + 156)
  223. #define CURRENT_REDUNDANCY (UPS + UPS_ATTRIBUTES + 157)
  224. #define MINIMUM_REDUNDANCY (UPS + UPS_ATTRIBUTES + 158)
  225. #define CURRENT_LOAD_CAPABILITY (UPS + UPS_ATTRIBUTES + 159)
  226. #define INPUT_VOLTAGE_PHASE_A (UPS + UPS_ATTRIBUTES + 161)
  227. #define INPUT_VOLTAGE_PHASE_B (UPS + UPS_ATTRIBUTES + 162)
  228. #define INPUT_VOLTAGE_PHASE_C (UPS + UPS_ATTRIBUTES + 163)
  229. #define INPUT_FREQUENCY (UPS + UPS_ATTRIBUTES + 164)
  230. #define OUTPUT_VOLTAGE_PHASE_A (UPS + UPS_ATTRIBUTES + 165)
  231. #define OUTPUT_VOLTAGE_PHASE_B (UPS + UPS_ATTRIBUTES + 166)
  232. #define OUTPUT_VOLTAGE_PHASE_C (UPS + UPS_ATTRIBUTES + 167)
  233. #define NUMBER_OF_INPUT_PHASES (UPS + UPS_ATTRIBUTES + 168)
  234. #define NUMBER_OF_OUTPUT_PHASES (UPS + UPS_ATTRIBUTES + 169)
  235. #define FIRMWARE_REV_CHAR (UPS + UPS_ATTRIBUTES + 170)
  236. #define COUNTRY_CODE (UPS + UPS_ATTRIBUTES + 171)
  237. #define UPSMODEL_CHAR (UPS + UPS_ATTRIBUTES + 172)
  238. #define IS_SMARTBOOST (UPS + UPS_ATTRIBUTES + 173)
  239. #define IS_SMARTTRIM (UPS + UPS_ATTRIBUTES + 174)
  240. #define IS_FREQUENCY (UPS + UPS_ATTRIBUTES + 175)
  241. #define IS_BATTERY_CAPACITY (UPS + UPS_ATTRIBUTES + 176)
  242. #define IS_COPYRIGHT (UPS + UPS_ATTRIBUTES + 177)
  243. #define IS_RUNTIME_REMAINING (UPS + UPS_ATTRIBUTES + 178)
  244. #define IS_MIN_RETURN_CAPACITY (UPS + UPS_ATTRIBUTES + 179)
  245. #define IS_SENSITIVITY (UPS + UPS_ATTRIBUTES + 180)
  246. #define IS_LOW_BATTERY_DURATION (UPS + UPS_ATTRIBUTES + 181)
  247. #define IS_ALARM_DELAY (UPS + UPS_ATTRIBUTES + 182)
  248. #define IS_SHUTDOWN_DELAY (UPS + UPS_ATTRIBUTES + 183)
  249. #define IS_TURN_ON_DELAY (UPS + UPS_ATTRIBUTES + 184)
  250. #define IS_MANUFACTURE_DATE (UPS + UPS_ATTRIBUTES + 185)
  251. #define IS_SERIAL_NUMBER (UPS + UPS_ATTRIBUTES + 186)
  252. #define IS_UPS_ID (UPS + UPS_ATTRIBUTES + 187)
  253. #define IS_TURN_OFF_WITH_DELAY (UPS + UPS_ATTRIBUTES + 188)
  254. #define IS_CTRL_Z (UPS + UPS_ATTRIBUTES + 189)
  255. #define IS_LOAD_SENSING (UPS + UPS_ATTRIBUTES + 190)
  256. #define IS_EEPROM_PROGRAM_CAPABLE (UPS + UPS_ATTRIBUTES + 191)
  257. #define IS_BATTERY_DATE (UPS + UPS_ATTRIBUTES + 192)
  258. #define IS_SELF_TEST_SCHEDULE (UPS + UPS_ATTRIBUTES + 193)
  259. #define IS_BATTERY_CALIBRATION (UPS + UPS_ATTRIBUTES + 194)
  260. #define IS_RATED_OUTPUT_VOLTAGE (UPS + UPS_ATTRIBUTES + 195)
  261. #define IS_HIGH_TRANSFER_VOLTAGE (UPS + UPS_ATTRIBUTES + 196)
  262. #define IS_LOW_TRANSFER_VOLTAGE (UPS + UPS_ATTRIBUTES + 197)
  263. #define HIGH_TRANSFER_VALUES (UPS + UPS_ATTRIBUTES + 198)
  264. #define LOW_TRANSFER_VALUES (UPS + UPS_ATTRIBUTES + 199)
  265. //
  266. // These cant remain contiguous since we have to work with old back ends
  267. // whose state codes start at 200
  268. //
  269. #define RATED_OUTPUT_VALUES (UPS + MORE_UPS_ATTRIBUTES + 0)
  270. #define SINGLE_HIGH_TRANSFER_VALUE (UPS + MORE_UPS_ATTRIBUTES + 1)
  271. #define SINGLE_LOW_TRANSFER_VALUE (UPS + MORE_UPS_ATTRIBUTES + 2)
  272. #define UPS_NAME (UPS + MORE_UPS_ATTRIBUTES + 3)
  273. #define IS_XL (UPS + MORE_UPS_ATTRIBUTES + 4)
  274. #define IS_SELF_TEST (UPS + MORE_UPS_ATTRIBUTES + 5)
  275. #define IS_SIMULATE_POWER_FAIL (UPS + MORE_UPS_ATTRIBUTES + 6)
  276. #define IS_LIGHTS_TEST (UPS + MORE_UPS_ATTRIBUTES + 7)
  277. #define IS_BYPASS (UPS + MORE_UPS_ATTRIBUTES + 8)
  278. #define SUPPORTED_FEATURES (UPS + MORE_UPS_ATTRIBUTES + 9)
  279. #define MAXIMUM_LOAD_CAPABILITY (UPS + MORE_UPS_ATTRIBUTES + 10)
  280. #define IS_UPS_LOAD (UPS + MORE_UPS_ATTRIBUTES + 11)
  281. #define IS_UTILITY_VOLTAGE (UPS + MORE_UPS_ATTRIBUTES + 12)
  282. #define IS_OUTPUT_VOLTAGE (UPS + MORE_UPS_ATTRIBUTES + 13)
  283. #define IS_OPERATING_REDUNDANCY (UPS + MORE_UPS_ATTRIBUTES + 14)
  284. #define IS_MIN_REDUNDANCY_ALARM (UPS + MORE_UPS_ATTRIBUTES + 15)
  285. #define IS_UPS_LOAD_ALARM (UPS + MORE_UPS_ATTRIBUTES + 16)
  286. #define IS_INTELLIGENCE_MODULE (UPS + MORE_UPS_ATTRIBUTES + 17)
  287. #define IS_REDUNDANT_INTELLIGENCE_MODULE (UPS + MORE_UPS_ATTRIBUTES + 18)
  288. #define IS_MAXIMUM_CAPACITY (UPS + MORE_UPS_ATTRIBUTES + 19)
  289. #define IS_BATTERY_VOLTAGE (UPS + MORE_UPS_ATTRIBUTES + 20)
  290. #define IS_UPS_TEMPERATURE (UPS + MORE_UPS_ATTRIBUTES + 21)
  291. #define IS_MULTIPLE_UPS_MODULES (UPS + MORE_UPS_ATTRIBUTES + 22)
  292. #define IS_EXT_SLEEP_UPS (UPS + MORE_UPS_ATTRIBUTES + 23)
  293. #define CURRENT_FIRMWARE_REV (UPS + MORE_UPS_ATTRIBUTES + 24)
  294. // moved SPECIFIC_SMARTSCHEDULING code because it had the same code as
  295. // IS_SYMMETRA. Moved this code because at the current time (building of v5.1.0),
  296. // no backends ask for SPECIFIC_SMARTSCHEDULING so this likely will not break anything.
  297. #define SPECIFIC_SMARTSCHEDULING (UPS + MORE_UPS_ATTRIBUTES + 25)
  298. #define IS_SINGLEBYTE (UPS + MORE_UPS_ATTRIBUTES + 26)
  299. #define IS_MULTIBYTE (UPS + MORE_UPS_ATTRIBUTES + 27)
  300. // States
  301. #define BATTERY_CONDITION (UPS + UPS_STATES + 1)
  302. #define UTILITY_LINE_CONDITION (UPS + UPS_STATES + 2)
  303. #define SMART_BOOST_STATE (UPS + UPS_STATES + 3)
  304. #define ABNORMAL_CONDITION_STATE (UPS + UPS_STATES + 4)
  305. #define OVERLOAD_CONDITION (UPS + UPS_STATES + 5)
  306. #define BATTERY_REPLACEMENT_CONDITION (UPS + UPS_STATES + 6)
  307. #define COMMUNICATION_STATE (UPS + UPS_STATES + 7)
  308. #define SELF_TEST_STATE (UPS + UPS_STATES + 8)
  309. #define BATTERY_CALIBRATION_CONDITION (UPS + UPS_STATES + 9)
  310. #define UPS_STATE (UPS + UPS_STATES + 10)
  311. #define LINE_CONDITION_TEST (UPS + UPS_STATES + 11)
  312. #define RUN_TIME_EXPIRED (UPS + UPS_STATES + 12)
  313. #define SHUTDOWN_CONDITION (UPS + UPS_STATES + 13)
  314. #define MATRIX_FAN_STATE (UPS + UPS_STATES + 14)
  315. #define BATTERY_CHARGER_STATE (UPS + UPS_STATES + 15)
  316. #define BYPASS_RELAY_CONDITION (UPS + UPS_STATES + 16)
  317. #define BYPASS_POWER_SUPPLY_CONDITION (UPS + UPS_STATES + 17)
  318. #define MATRIX_STATE_CONDITION (UPS + UPS_STATES + 18)
  319. #define MATRIX_TEMPERATURE (UPS + UPS_STATES + 19)
  320. #define BYPASS_MODE (UPS + UPS_STATES + 20)
  321. #define SMART_CELL_SIGNAL_CABLE_STATE (UPS + UPS_STATES + 21)
  322. #define CLIENT_DISCONNECT (UPS + UPS_STATES + 22)
  323. #define EEPROM_CHANGED (UPS + UPS_STATES + 23)
  324. #define SYSTEM_STATE (UPS + UPS_STATES + 24)
  325. #define SMART_TRIM_STATE (UPS + UPS_STATES + 25)
  326. #define IM_STATUS (UPS + UPS_STATES + 27)
  327. #define IM_INSTALLATION_STATE (UPS + UPS_STATES + 28)
  328. #define RIM_STATUS (UPS + UPS_STATES + 29)
  329. #define RIM_INSTALLATION_STATE (UPS + UPS_STATES + 30)
  330. #define REDUNDANCY_STATE (UPS + UPS_STATES + 31)
  331. #define SYSTEM_FAN_STATE (UPS + UPS_STATES + 32)
  332. #define INPUT_BREAKER_STATE (UPS + UPS_STATES + 33)
  333. #define BYPASS_CONTACTOR_STATE (UPS + UPS_STATES + 34)
  334. #define LOAD_CAPABILITY_STATE (UPS + UPS_STATES + 35)
  335. #define INVERTER_INSTALLATION_STATE (UPS + UPS_STATES + 36)
  336. // Allowable state values
  337. #define COMMUNICATION_LOST (UPS + UPS_STATE_VALUES + 1)
  338. #define COMMUNICATION_ESTABLISHED (UPS + UPS_STATE_VALUES + 2)
  339. #define UPS_OVERLOAD (UPS + UPS_STATE_VALUES + 3)
  340. #define NO_UPS_OVERLOAD (UPS + UPS_STATE_VALUES + 4)
  341. #define SMART_BOOST_ON (UPS + UPS_STATE_VALUES + 5)
  342. #define SMART_BOOST_OFF (UPS + UPS_STATE_VALUES + 6)
  343. #define BATTERY_BAD (UPS + UPS_STATE_VALUES + 7)
  344. #define BATTERY_GOOD (UPS + UPS_STATE_VALUES + 8)
  345. #define LOW_BATTERY (UPS + UPS_STATE_VALUES + 9)
  346. #define BATTERY_DISCHARGED (UPS + UPS_STATE_VALUES + 10)
  347. #define LINE_BAD (UPS + UPS_STATE_VALUES + 11)
  348. #define LINE_GOOD (UPS + UPS_STATE_VALUES + 12)
  349. #define SELF_TEST_PASSED (UPS + UPS_STATE_VALUES + 13)
  350. #define SELF_TEST_FAILED (UPS + UPS_STATE_VALUES + 14)
  351. #define SELF_TEST_INVALID (UPS + UPS_STATE_VALUES + 15)
  352. #define ABNORMAL_CONDITION (UPS + UPS_STATE_VALUES + 16)
  353. #define NO_ABNORMAL_CONDITION (UPS + UPS_STATE_VALUES + 17)
  354. #define BATTERY_NEEDS_REPLACING (UPS + UPS_STATE_VALUES + 18)
  355. #define BATTERY_DOESNT_NEED_REPLACING (UPS + UPS_STATE_VALUES + 19)
  356. #define COPYRIGHT_VIOLATION (UPS + UPS_STATE_VALUES + 20)
  357. #define BATTERY_CALIBRATED (UPS + UPS_STATE_VALUES + 21)
  358. #define BATTERY_CALIBRATION_IN_PROGRESS (UPS + UPS_STATE_VALUES + 22)
  359. #define BATTERY_CALIBRATION_CANCELLED (UPS + UPS_STATE_VALUES + 23)
  360. #define BATTERY_CALIBRATION_FAILED (UPS + UPS_STATE_VALUES + 24)
  361. #define NO_BATTERY_CALIBRATION (UPS + UPS_STATE_VALUES + 25)
  362. #define UPS_SHUTDOWN (UPS + UPS_STATE_VALUES + 26)
  363. #define UPS_NOT_SHUTDOWN (UPS + UPS_STATE_VALUES + 27)
  364. #define UPS_OFF_PENDING (UPS + UPS_STATE_VALUES + 28)
  365. #define STATE_UNKNOWN (UPS + UPS_STATE_VALUES + 29)
  366. #define HIGH_THRESHOLD_EXCEEDED (UPS + UPS_STATE_VALUES + 30)
  367. #define LOW_THRESHOLD_EXCEEDED (UPS + UPS_STATE_VALUES + 31)
  368. #define IN_THRESHOLD_RANGE (UPS + UPS_STATE_VALUES + 32)
  369. #define LIGHTS_TEST_IN_PROGRESS (UPS + UPS_STATE_VALUES + 33)
  370. #define NO_LIGHTS_TEST_IN_PROGRESS (UPS + UPS_STATE_VALUES + 34)
  371. #define SELF_TEST_IN_PROGRESS (UPS + UPS_STATE_VALUES + 35)
  372. #define NO_SELF_TEST_IN_PROGRESS (UPS + UPS_STATE_VALUES + 36)
  373. #define COMMUNICATION_LOST_ON_BATTERY (UPS + UPS_STATE_VALUES + 37)
  374. //
  375. // These value come from Keiths Kcodes.h Im not sure they
  376. // belong here.
  377. //
  378. #define RETURN_FROM_LOW_BATTERY (UPS + UPS_STATE_VALUES + 38)
  379. #define LINE_BAD_TRANSFER_CAUSE (UPS + UPS_STATE_VALUES + 39)
  380. #define HIGH_LINE_VOLTAGE (UPS + UPS_STATE_VALUES + 40)
  381. #define BROWNOUT (UPS + UPS_STATE_VALUES + 41)
  382. #define BLACKOUT (UPS + UPS_STATE_VALUES + 42)
  383. #define SMALL_SAG (UPS + UPS_STATE_VALUES + 43)
  384. #define SMALL_SPIKE (UPS + UPS_STATE_VALUES + 44)
  385. #define DEEP_SAG (UPS + UPS_STATE_VALUES + 45)
  386. #define SELF_TEST_INITIATOR (UPS + UPS_STATE_VALUES + 46)
  387. #define SELF_TEST_INITIATED_BY_USER (UPS + UPS_STATE_VALUES + 47)
  388. #define SELF_TEST_INITIATED_BY_SCHEDULE (UPS + UPS_STATE_VALUES + 48)
  389. #define SELF_TEST_INITIATED_BY_UNKNOWN (UPS + UPS_STATE_VALUES + 49)
  390. #define BATTERY_CALIBRATION_STATE (UPS + UPS_STATE_VALUES + 50)
  391. #define NO_BATTERY_CALIBRATION_IN_PROGRESS (UPS + UPS_STATE_VALUES + 51)
  392. #define LARGE_SPIKE (UPS + UPS_STATE_VALUES + 52)
  393. #define NO_TRANSFERS (UPS + UPS_STATE_VALUES + 53)
  394. #define SELF_TEST_TRANSFER (UPS + UPS_STATE_VALUES + 54)
  395. #define NOTCH_SPIKE_TRANSFER (UPS + UPS_STATE_VALUES + 55)
  396. #define LOW_LINE_TRANSFER (UPS + UPS_STATE_VALUES + 56)
  397. #define HIGH_LINE_TRANSFER (UPS + UPS_STATE_VALUES + 57)
  398. #define RATE_TRANSFER (UPS + UPS_STATE_VALUES + 58)
  399. #define UNKNOWN_TRANSFER (UPS + UPS_STATE_VALUES + 59)
  400. #define FAN_FAILURE_IN_TOP_BOX (UPS + UPS_STATE_VALUES + 60)
  401. #define FAN_FAILURE_IN_BOTTOM_BOX (UPS + UPS_STATE_VALUES + 61)
  402. #define FAN_OK (UPS + UPS_STATE_VALUES + 62)
  403. #define BATTERY_CHARGER_OK (UPS + UPS_STATE_VALUES + 63)
  404. #define BATTERY_CHARGER_FAILED (UPS + UPS_STATE_VALUES + 64)
  405. #define BYPASS_RELAY_OK (UPS + UPS_STATE_VALUES + 65)
  406. #define BYPASS_RELAY_FAILED (UPS + UPS_STATE_VALUES + 65)
  407. #define BYPASS_POWER_SUPPLY_OK (UPS + UPS_STATE_VALUES + 66)
  408. #define BYPASS_POWER_SUPPLY_FAULT (UPS + UPS_STATE_VALUES + 67)
  409. #define UPS_NOT_ON_BYPASS (UPS + UPS_STATE_VALUES + 68)
  410. #define UPS_ON_BYPASS (UPS + UPS_STATE_VALUES + 69)
  411. //
  412. // These value come from the MATRIX state register response
  413. //
  414. #define MATRIX_ARMED_RECP_STANDBY (UPS + UPS_STATE_VALUES + 70)
  415. #define MATRIX_RECP_STANDBY (UPS + UPS_STATE_VALUES + 71)
  416. #define MATRIX_SWITCHED_BYPASS (UPS + UPS_STATE_VALUES + 72)
  417. #define MATRIX_RETURN_FROM_BYPASS (UPS + UPS_STATE_VALUES + 73)
  418. #define MATRIX_COMP_SELECT_BYPASS (UPS + UPS_STATE_VALUES + 74)
  419. #define MATRIX_ENTERING_COMP_SELECT_BYPASS (UPS + UPS_STATE_VALUES + 75)
  420. #define MATRIX_WAKEUP (UPS + UPS_STATE_VALUES + 76)
  421. #define MATRIX_STATE_CLEAR (UPS + UPS_STATE_VALUES + 77)
  422. #define MATRIX_TEMPERATURE_OK (UPS + UPS_STATE_VALUES + 78)
  423. #define MATRIX_TEMPERATURE_FAULT (UPS + UPS_STATE_VALUES + 79)
  424. #define SELF_TEST_NO_RECENT_TEST (UPS + UPS_STATE_VALUES + 80)
  425. //
  426. // More Comm States
  427. //
  428. #define SERVER_COMM_LOST (UPS + UPS_STATE_VALUES + 81)
  429. #define SERVER_COMM_ESTABLISHED (UPS + UPS_STATE_VALUES + 82)
  430. #define UPS_COMM_PORT_CHANGED (UPS + UPS_STATE_VALUES + 83)
  431. #define CHECK_CABLE (UPS + UPS_STATE_VALUES + 84)
  432. #define CABLE_OK (UPS + UPS_STATE_VALUES + 85)
  433. #define IGNORE_BATTERY_GOOD (UPS + UPS_STATE_VALUES + 86)
  434. #define RESPOND_TO_BATTERY_GOOD (UPS + UPS_STATE_VALUES + 87)
  435. #define INITIATE_BYPASS (UPS + UPS_STATE_VALUES + 88)
  436. #define CANCEL_BYPASS (UPS + UPS_STATE_VALUES + 89)
  437. #define PRECAUTION_TO_UPS_FAULT (UPS + UPS_STATE_VALUES + 90)
  438. #define SMART_TRIM_ON (UPS + UPS_STATE_VALUES + 91)
  439. #define SMART_TRIM_OFF (UPS + UPS_STATE_VALUES + 92)
  440. #define UPS_MODULE_FAILED (UPS + UPS_STATE_VALUES + 93)
  441. #define UPS_MODULE_OK (UPS + UPS_STATE_VALUES + 94)
  442. #define IM_FAILED (UPS + UPS_STATE_VALUES + 95)
  443. #define IM_OK (UPS + UPS_STATE_VALUES + 96)
  444. #define IM_INSTALLED (UPS + UPS_STATE_VALUES + 97)
  445. #define IM_NOT_INSTALLED (UPS + UPS_STATE_VALUES + 98)
  446. #define REDUNDANCY_FAILED (UPS + UPS_STATE_VALUES + 99)
  447. //
  448. // These cant remain contiguous since we have to work with old back ends
  449. // whose action codes start at 400
  450. //
  451. #define REDUNDANCY_OK (UPS + MORE_UPS_STATE_VALUES + 0)
  452. #define BYPASS_CONTACTOR_OK (UPS + MORE_UPS_STATE_VALUES + 1)
  453. #define BYPASS_CONTACTOR_FAILED (UPS + MORE_UPS_STATE_VALUES + 2)
  454. #define SYSTEM_FAN_FAILED (UPS + MORE_UPS_STATE_VALUES + 3)
  455. #define SYSTEM_FAN_OK (UPS + MORE_UPS_STATE_VALUES + 4)
  456. #define BREAKER_CLOSED (UPS + MORE_UPS_STATE_VALUES + 5)
  457. #define BREAKER_OPEN (UPS + MORE_UPS_STATE_VALUES + 6)
  458. #define RIM_FAILED (UPS + MORE_UPS_STATE_VALUES + 7)
  459. #define RIM_OK (UPS + MORE_UPS_STATE_VALUES + 8)
  460. #define RIM_INSTALLED (UPS + MORE_UPS_STATE_VALUES + 9)
  461. #define RIM_NOT_INSTALLED (UPS + MORE_UPS_STATE_VALUES + 10)
  462. #define LOAD_CAPABILITY_FAILED (UPS + MORE_UPS_STATE_VALUES + 11)
  463. #define LOAD_CAPABILITY_OK (UPS + MORE_UPS_STATE_VALUES + 12)
  464. #define UPS_MODULE_ADDED (UPS + MORE_UPS_STATE_VALUES + 13)
  465. #define UPS_MODULE_REMOVED (UPS + MORE_UPS_STATE_VALUES + 14)
  466. #define BATTERY_ADDED (UPS + MORE_UPS_STATE_VALUES + 15)
  467. #define BATTERY_REMOVED (UPS + MORE_UPS_STATE_VALUES + 16)
  468. #define INPUT_BREAKER_TRIPPED_TRANSFER (UPS + MORE_UPS_STATE_VALUES + 17)
  469. // Actions
  470. #define TURN_ON_SMART_MODE (UPS + UPS_ACTIONS + 1)
  471. #define LIGHTS_TEST (UPS + UPS_ACTIONS + 2)
  472. #define TURN_OFF_UPS_AFTER_DELAY (UPS + UPS_ACTIONS + 3)
  473. #define TURN_OFF_UPS_ON_BATTERY (UPS + UPS_ACTIONS + 4)
  474. #define SIMULATE_POWER_FAIL (UPS + UPS_ACTIONS + 5)
  475. #define TURN_OFF_UPS (UPS + UPS_ACTIONS + 6)
  476. #define PUT_UPS_TO_SLEEP (UPS + UPS_ACTIONS + 7)
  477. #define BATTERY_CALIBRATION_TEST (UPS + UPS_ACTIONS + 8)
  478. #define SELF_TEST (UPS + UPS_ACTIONS + 9)
  479. #define PERFORM_BATTERY_CALIBRATION (UPS + UPS_ACTIONS + 10)
  480. #define CANCEL_BATTERY_CALIBRATION (UPS + UPS_ACTIONS + 11)
  481. #define SIMULATE_POWER_FAIL_OVER (UPS + UPS_ACTIONS + 12)
  482. #define RESCHEDULE_SELF_TEST (UPS + UPS_ACTIONS + 13)
  483. #define RESCHEDULE_DDTEST (UPS + UPS_ACTIONS + 14)
  484. #define TURN_OFF_SMART_MODE (UPS + UPS_ACTIONS + 15)
  485. // ****** UPS STUFF ******
  486. #define MEASURE_UPS 1000
  487. #define MEASURE_UPS_ATTRIBUTES 0
  488. #define MEASURE_UPS_STATES 100
  489. #define MEASURE_UPS_STATE_VALUES 200
  490. #define MEASURE_UPS_ACTIONS 300
  491. // Attributes
  492. #define AMBIENT_TEMPERATURE (MEASURE_UPS + MEASURE_UPS_ATTRIBUTES + 1)
  493. #define HUMIDITY (MEASURE_UPS + MEASURE_UPS_ATTRIBUTES + 2)
  494. #define LOW_AMBIENT_TEMP_THRESHOLD (MEASURE_UPS + MEASURE_UPS_ATTRIBUTES + 3)
  495. #define HIGH_AMBIENT_TEMP_THRESHOLD (MEASURE_UPS + MEASURE_UPS_ATTRIBUTES + 4)
  496. #define LOW_HUMIDITY_THRESHOLD (MEASURE_UPS + MEASURE_UPS_ATTRIBUTES + 5)
  497. #define HIGH_HUMIDITY_THRESHOLD (MEASURE_UPS + MEASURE_UPS_ATTRIBUTES + 6)
  498. #define CONTACT_POSITION (MEASURE_UPS + MEASURE_UPS_ATTRIBUTES + 7)
  499. #define CONTACT_NUMBER (MEASURE_UPS + MEASURE_UPS_ATTRIBUTES + 8)
  500. #define USER_COMMENT (MEASURE_UPS + MEASURE_UPS_ATTRIBUTES + 9)
  501. #define LOW_AMBIENT_TEMP_THRESHOLD_ENABLED (MEASURE_UPS + MEASURE_UPS_ATTRIBUTES + 10)
  502. #define HIGH_AMBIENT_TEMP_THRESHOLD_ENABLED (MEASURE_UPS + MEASURE_UPS_ATTRIBUTES + 11)
  503. #define LOW_HUMIDITY_THRESHOLD_ENABLED (MEASURE_UPS + MEASURE_UPS_ATTRIBUTES + 12)
  504. #define HIGH_HUMIDITY_THRESHOLD_ENABLED (MEASURE_UPS + MEASURE_UPS_ATTRIBUTES + 13)
  505. // Note: CONTACT1..4 values must be numerically sequential and adjacent
  506. //
  507. #define CONTACT1_DEFAULT_POSITION (MEASURE_UPS + MEASURE_UPS_ATTRIBUTES + 14)
  508. #define CONTACT2_DEFAULT_POSITION (MEASURE_UPS + MEASURE_UPS_ATTRIBUTES + 15)
  509. #define CONTACT3_DEFAULT_POSITION (MEASURE_UPS + MEASURE_UPS_ATTRIBUTES + 16)
  510. #define CONTACT4_DEFAULT_POSITION (MEASURE_UPS + MEASURE_UPS_ATTRIBUTES + 17)
  511. #define CONTACT1_DESCRIPTION (MEASURE_UPS + MEASURE_UPS_ATTRIBUTES + 18)
  512. #define CONTACT2_DESCRIPTION (MEASURE_UPS + MEASURE_UPS_ATTRIBUTES + 19)
  513. #define CONTACT3_DESCRIPTION (MEASURE_UPS + MEASURE_UPS_ATTRIBUTES + 20)
  514. #define CONTACT4_DESCRIPTION (MEASURE_UPS + MEASURE_UPS_ATTRIBUTES + 21)
  515. #define CONTACT1_STATUS_ENABLED (MEASURE_UPS + MEASURE_UPS_ATTRIBUTES + 22)
  516. #define CONTACT2_STATUS_ENABLED (MEASURE_UPS + MEASURE_UPS_ATTRIBUTES + 23)
  517. #define CONTACT3_STATUS_ENABLED (MEASURE_UPS + MEASURE_UPS_ATTRIBUTES + 24)
  518. #define CONTACT4_STATUS_ENABLED (MEASURE_UPS + MEASURE_UPS_ATTRIBUTES + 25)
  519. #define CONTACT_STATUS (MEASURE_UPS + MEASURE_UPS_ATTRIBUTES + 26)
  520. #define NORMAL_POSITION (MEASURE_UPS + MEASURE_UPS_ATTRIBUTES + 27)
  521. #define MUPS_FIRMWARE_REV (MEASURE_UPS + MEASURE_UPS_ATTRIBUTES + 28)
  522. #define CONTACT1_STATE (MEASURE_UPS + MEASURE_UPS_ATTRIBUTES + 29)
  523. #define CONTACT2_STATE (MEASURE_UPS + MEASURE_UPS_ATTRIBUTES + 30)
  524. #define CONTACT3_STATE (MEASURE_UPS + MEASURE_UPS_ATTRIBUTES + 31)
  525. #define CONTACT4_STATE (MEASURE_UPS + MEASURE_UPS_ATTRIBUTES + 32)
  526. // States
  527. #define IS_MEASURE_UPS_ATTACHED (MEASURE_UPS + MEASURE_UPS_STATES + 1)
  528. #define CONTACT_STATE (MEASURE_UPS + MEASURE_UPS_STATES + 2)
  529. #define CONTACT1_STATUS (MEASURE_UPS + MEASURE_UPS_STATES + 3)
  530. #define CONTACT2_STATUS (MEASURE_UPS + MEASURE_UPS_STATES + 4)
  531. #define CONTACT3_STATUS (MEASURE_UPS + MEASURE_UPS_STATES + 5)
  532. #define CONTACT4_STATUS (MEASURE_UPS + MEASURE_UPS_STATES + 6)
  533. // Allowable state values
  534. #define CONTACT_FAULT (MEASURE_UPS + MEASURE_UPS_STATE_VALUES + 1)
  535. #define CONTACT_NORMAL (MEASURE_UPS + MEASURE_UPS_STATE_VALUES + 2)
  536. #define CONTACT_OPEN (MEASURE_UPS + MEASURE_UPS_STATE_VALUES + 3)
  537. #define CONTACT_CLOSED (MEASURE_UPS + MEASURE_UPS_STATE_VALUES + 4)
  538. // Actions
  539. // ****** HOST STUFF ******
  540. #define HOST 2000
  541. #define HOST_ATTRIBUTES 0
  542. #define HOST_STATES 100
  543. #define HOST_STATE_VALUES 200
  544. #define HOST_ACTIONS 300
  545. #define HOST_ACTION_VALUES 400
  546. // Attributes
  547. #define SERVER_NAME (HOST + HOST_ATTRIBUTES + 1)
  548. //#define ADMIN_SHUTDOWN_NOW_DELAY (HOST + HOST_ATTRIBUTES + 3)
  549. //#define LOW_BATTERY_SHUTDOWN_DELAY (HOST + HOST_ATTRIBUTES + 5)
  550. #define CLIENT_NAME (HOST + HOST_ATTRIBUTES + 6)
  551. #define CLIENT_TYPE (HOST + HOST_ATTRIBUTES + 7)
  552. #define CLIENT_ALERT_ADDR (HOST + HOST_ATTRIBUTES + 8)
  553. #define CLIENT_BINDERY_ADDR (HOST + HOST_ATTRIBUTES + 10)
  554. #define SERVER_ADDR (HOST + HOST_ATTRIBUTES + 11)
  555. #define ERROR_FILE_NAME (HOST + HOST_ATTRIBUTES + 15)
  556. #define ERROR_FILE_MAX_SIZE (HOST + HOST_ATTRIBUTES + 16)
  557. #define UPS_PORT_NAME (HOST + HOST_ATTRIBUTES + 20)
  558. #define ALLOWED_UPS_PORT_NAMES (HOST + HOST_ATTRIBUTES + 21)
  559. #define UPS_SIGNALLING_TYPE (HOST + HOST_ATTRIBUTES + 22)
  560. // just in case:
  561. #define ALLOWED_UPS_SIGNALLING_TYPES (HOST + HOST_ATTRIBUTES + 23)
  562. #define UPS_PORT_TYPE (HOST + HOST_ATTRIBUTES + 24)
  563. #define ALLOWED_UPS_PORT_TYPES (HOST + HOST_ATTRIBUTES + 25)
  564. #define HOST_TIME (HOST + HOST_ATTRIBUTES + 26)
  565. #define HOST_USES_AIO_COMM (HOST + HOST_ATTRIBUTES + 27)
  566. #define HOST_AIO_HARDWARE (HOST + HOST_ATTRIBUTES + 28)
  567. #define HOST_ALLOWED_AIO_HARDWARE (HOST + HOST_ATTRIBUTES + 29)
  568. #define HOST_AIO_BOARD_NUMBER (HOST + HOST_ATTRIBUTES + 30)
  569. #define HOST_AIO_PORT_NUMBER (HOST + HOST_ATTRIBUTES + 31)
  570. #define HOST_USER_PASSWORD (HOST + HOST_ATTRIBUTES + 32)
  571. #define HOST_SERVER_SECURITY (HOST + HOST_ATTRIBUTES + 32)
  572. #define SERVER_PRODUCT_NAME (HOST + HOST_ATTRIBUTES + 33)
  573. #define SERVER_VERSION (HOST + HOST_ATTRIBUTES + 34)
  574. #define SERVER_PLATFORM (HOST + HOST_ATTRIBUTES + 35)
  575. #define COMPUTER_NAME (HOST + HOST_ATTRIBUTES + 36)
  576. // States
  577. #define MONITORING_STATUS (HOST + HOST_STATES + 1)
  578. #define SHUTDOWN_STATUS (HOST + HOST_STATES + 2)
  579. // Allowable state values
  580. #define MONITORING_STARTED (HOST + HOST_STATE_VALUES + 1)
  581. #define MONITORING_STOPPED (HOST + HOST_STATE_VALUES + 2)
  582. // Actions
  583. #define HOST_NAME (HOST + HOST_ACTIONS + 11)
  584. #define CLIENT_ACK (HOST + HOST_ACTIONS + 12)
  585. #define CLEAR_ERROR_FILE (HOST + HOST_ACTIONS + 16)
  586. #define CLIENT_USE_MASTER (HOST + HOST_ACTIONS + 17)
  587. #define RESET_UPS_COMM_PORT (HOST + HOST_ACTIONS + 18)
  588. // Values for Action Codes
  589. #define ENABLE (HOST + HOST_ACTION_VALUES + 1)
  590. #define DISABLE (HOST + HOST_ACTION_VALUES + 2)
  591. #define SLAVE_SHUTDOWN (HOST + HOST_ACTION_VALUES + 7)
  592. // ****** POPUP STUFF ******
  593. #define POPUP 3000
  594. #define POPUP_ATTRIBUTES 0
  595. #define POPUP_STATES 100
  596. #define POPUP_STATE_VALUES 200
  597. #define POPUP_ACTIONS 300
  598. #define MESSAGE_DELAY (POPUP + POPUP_ATTRIBUTES + 1)
  599. #define MESSAGE_INTERVAL (POPUP + POPUP_ATTRIBUTES + 2)
  600. #define POWER_FAIL_MSG (POPUP + POPUP_ATTRIBUTES + 3)
  601. #define POWER_RETURN_MSG (POPUP + POPUP_ATTRIBUTES + 4)
  602. #define LOW_BATTERY_MSG (POPUP + POPUP_ATTRIBUTES + 5)
  603. #define SHUTDOWN_MSG (POPUP + POPUP_ATTRIBUTES + 6)
  604. #define RUN_TIME_EXPIRED_MSG (POPUP + POPUP_ATTRIBUTES + 7)
  605. #define SHUTDOWN_DELAY_VALUE (POPUP + POPUP_ATTRIBUTES + 8)
  606. #define DISABLE_POPUPS (POPUP + POPUP_ACTIONS + 1)
  607. // ****** DATALOG STUFF ******
  608. #define CDATALOG 4000
  609. #define DATALOG_ATTRIBUTES 0
  610. #define DATALOG_STATES 100
  611. #define DATALOG_STATE_VALUES 200
  612. #define DATALOG_ACTIONS 300
  613. #define DATA_FILE_NAME (CDATALOG + DATALOG_ATTRIBUTES + 1)
  614. #define DATA_FILE_MAX_SIZE (CDATALOG + DATALOG_ATTRIBUTES + 2)
  615. #define DATA_LOGGING_INTERVAL (CDATALOG + DATALOG_ATTRIBUTES + 3)
  616. #define DATA_LOGGING_ENABLED (CDATALOG + DATALOG_ATTRIBUTES + 4)
  617. #define DATA_LOG_DATA (CDATALOG + DATALOG_ATTRIBUTES + 5)
  618. #define DATA_LOG_DATA_DONE (CDATALOG + DATALOG_ATTRIBUTES + 6)
  619. #define IS_DATA_LOGGING (CDATALOG + DATALOG_ATTRIBUTES + 7)
  620. #define CLEAR_DATA_FILE (CDATALOG + DATALOG_ACTIONS + 1)
  621. #define LOG_DATA (CDATALOG + DATALOG_ACTIONS + 2)
  622. // ****** EVENTLOG STUFF ******
  623. #define CEVENTLOG 5000
  624. #define EVENTLOG_ATTRIBUTES 0
  625. #define EVENTLOG_STATES 100
  626. #define EVENTLOG_STATE_VALUES 200
  627. #define EVENTLOG_ACTIONS 300
  628. #define EVENT_FILE_NAME (CEVENTLOG + EVENTLOG_ATTRIBUTES + 2)
  629. #define EVENT_FILE_MAX_SIZE (CEVENTLOG + EVENTLOG_ATTRIBUTES + 3)
  630. #define EVENT_LOGGING_ENABLED (CEVENTLOG + EVENTLOG_ATTRIBUTES + 4)
  631. #define EVENT_LOG_DATA (CEVENTLOG + EVENTLOG_ATTRIBUTES + 5)
  632. #define EVENT_LOG_DATA_DONE (CEVENTLOG + EVENTLOG_ATTRIBUTES + 6)
  633. #define EVENT_LOG_UPDATE (CEVENTLOG + EVENTLOG_ATTRIBUTES + 7)
  634. #define IS_EVENT_LOGGING (CEVENTLOG + EVENTLOG_ATTRIBUTES + 8)
  635. #define CLEAR_EVENT_FILE (CEVENTLOG + EVENTLOG_ACTIONS + 13)
  636. #define USERS 6000
  637. #define USERS_ATTRIBUTES 0
  638. #define USERS_ACTIONS 100
  639. #define USERS_USER_NAME (USERS + USERS_ATTRIBUTES + 1)
  640. #define USERS_NOTIFICATION_ENABLED (USERS + USERS_ATTRIBUTES + 2)
  641. #define USERS_NOTIFY_ADDRESS (USERS + USERS_ATTRIBUTES + 3)
  642. #define USERS_PAGING_ENABLED (USERS + USERS_ATTRIBUTES + 4)
  643. #define USERS_PAGER_NUMBER (USERS + USERS_ATTRIBUTES + 5)
  644. #define USERS_PAGER_ACCESS_CODE (USERS + USERS_ATTRIBUTES + 6)
  645. #define USERS_PAGER_SERVICE (USERS + USERS_ATTRIBUTES + 7)
  646. #define USERS_EMAIL_ENABLED (USERS + USERS_ATTRIBUTES + 8)
  647. #define USERS_EMAIL_ADDRESS (USERS + USERS_ATTRIBUTES + 9)
  648. #define USERS_PAGER_SERVICE_LIST (USERS + USERS_ATTRIBUTES + 10)
  649. #define USERS_OLD_NAME (USERS + USERS_ATTRIBUTES + 11)
  650. #define USERS_ATTRIBUTE_VALUES (USERS + USERS_ACTIONS + 1)
  651. #define USERS_DELETE_USER (USERS + USERS_ACTIONS + 2)
  652. #define USERS_RENAME_USER (USERS + USERS_ACTIONS + 3)
  653. // ***** INTERNAL MESSAGES ******
  654. #define INTERNAL 7000
  655. #define SET_DATA (INTERNAL + 1)
  656. #define DECREMENT (INTERNAL + 2)
  657. #define NO_MSG (INTERNAL + 3)
  658. #define RUNTIME_ERROR (INTERNAL + 4)
  659. #define ERROR_LOCATION (INTERNAL + 5)
  660. #define RETRY_CONSTRUCT (INTERNAL + 6)
  661. #define RETRY_POPUP (INTERNAL + 7)
  662. #define NEW_SERVER (INTERNAL + 8)
  663. #define AVAILABLE_SERVERS (INTERNAL + 9)
  664. #define NO_THRESHOLD (INTERNAL + 10)
  665. #define WEEKDAYS (INTERNAL + 11)
  666. #define FRONT_END_WIDTH (INTERNAL + 12)
  667. #define FRONT_END_HEIGHT (INTERNAL + 13)
  668. #define WILD_CARD (INTERNAL + 14)
  669. // the following must be numerically sequential
  670. #define UPS_BACKUPS (INTERNAL + 15)
  671. #define UPS_SMARTUPS (INTERNAL + 16)
  672. #define UPS_SECOND_GEN (INTERNAL + 17)
  673. #define UPS_MATRIX (INTERNAL + 18)
  674. // end sequence
  675. #define ISNETWORK_ATTACHED (INTERNAL + 19)
  676. #define TEMPERATURE_UNITS (INTERNAL + 20)
  677. #define BAR_TYPE (INTERNAL + 21)
  678. #define SOUND_EFFECTS (INTERNAL + 22)
  679. #define LOW_THRESHOLD (INTERNAL + 23)
  680. #define HIGH_THRESHOLD (INTERNAL + 24)
  681. #define ADDED_SERVER (INTERNAL + 25)
  682. #define REMOVED_SERVER (INTERNAL + 26)
  683. #define CHANGED_SERVER (INTERNAL + 27)
  684. #define USER_PASSWORD (INTERNAL + 28)
  685. #define TIMER_PULSE (INTERNAL + 29)
  686. #define FIXED_VALUE (INTERNAL + 30)
  687. #define INTERVAL (INTERNAL + 31)
  688. #define DISPLAY_POPUP (INTERNAL + 32)
  689. #define TIME_REMAINING (INTERNAL + 33)
  690. #define RETRY_PORT (INTERNAL + 34)
  691. #define TIMER_ID (INTERNAL + 35)
  692. #define EXECUTE_COMMAND_FILE (INTERNAL + 36)
  693. #define CONNECTING_SERVER (INTERNAL + 37)
  694. #define SHUTDOWN_TYPE (INTERNAL + 38)
  695. #define LOW_THRESHOLD_ENABLED (INTERNAL + 39)
  696. #define HIGH_THRESHOLD_ENABLED (INTERNAL + 40)
  697. #define EXIT_THREAD_NOW (INTERNAL + 41)
  698. #define IS_SECURITY_ENABLED (INTERNAL + 42)
  699. #define EXIT_MAIL (INTERNAL + 43)
  700. #define IS_SYSTEM_STANDALONE (INTERNAL + 44)
  701. #define ADD_SERVER_TO_LIST (INTERNAL + 45)
  702. #define REMOVE_SERVER_FROM_LIST (INTERNAL + 46)
  703. #define CHANGE_SERVER_IN_LIST (INTERNAL + 47)
  704. #define SELFTEST_TYPE (INTERNAL + 48)
  705. #define BRIDGE_WINDOW_HANDLE (INTERNAL + 49)
  706. #define FIRST_BAR_TYPE (INTERNAL + 50)
  707. #define SECOND_BAR_TYPE (INTERNAL + 51)
  708. #define THIRD_BAR_TYPE (INTERNAL + 52)
  709. #define FRONT_END_NAME (INTERNAL + 53)
  710. #define FRONT_END_VERSION (INTERNAL + 54)
  711. #define FRONT_END_COPYRIGHT (INTERNAL + 55)
  712. #define PENDING_EVENT (INTERNAL + 56)
  713. //**** Shutdowner stuff
  714. #define SHUTDOWNER 8000
  715. #define SHUTDOWNER_ATTRIBUTES 0
  716. #define SHUTDOWNER_STATES 200
  717. #define SHUTDOWNER_STATE_VALUES 300
  718. #define SHUTDOWNER_ACTIONS 400
  719. #define ADMIN_SHUTDOWN_DELAY (SHUTDOWNER + SHUTDOWNER_ATTRIBUTES + 1)
  720. #define ADMIN_SHUTDOWN_NOW_DELAY (SHUTDOWNER + SHUTDOWNER_ATTRIBUTES + 3)
  721. #define LOW_BATTERY_SHUTDOWN_DELAY (SHUTDOWNER + SHUTDOWNER_ATTRIBUTES + 4)
  722. #define SHUTDOWNER_SHUTDOWN (SHUTDOWNER + SHUTDOWNER_ATTRIBUTES + 5)
  723. #define SHUTDOWN_INITIATOR (SHUTDOWNER + SHUTDOWNER_ATTRIBUTES + 6)
  724. #define SHUTDOWN_WAKEUP_TIME (SHUTDOWNER + SHUTDOWNER_ATTRIBUTES + 7)
  725. #define WEEKLY_SHUTDOWN_DAY (SHUTDOWNER + SHUTDOWNER_ATTRIBUTES + 8)
  726. #define WEEKLY_SHUTDOWN_TIME (SHUTDOWNER + SHUTDOWNER_ATTRIBUTES + 9)
  727. #define WEEKLY_SHUTDOWN (SHUTDOWNER + SHUTDOWNER_ATTRIBUTES + 10)
  728. #define DAILY_SHUTDOWN_TIME (SHUTDOWNER + SHUTDOWNER_ATTRIBUTES + 11)
  729. #define DAILY_SHUTDOWN (SHUTDOWNER + SHUTDOWNER_ATTRIBUTES + 12)
  730. #define WEEKLY_REBOOT_DAY (SHUTDOWNER + SHUTDOWNER_ATTRIBUTES + 13)
  731. #define WEEKLY_REBOOT_TIME (SHUTDOWNER + SHUTDOWNER_ATTRIBUTES + 14)
  732. #define DAILY_REBOOT_DAY (SHUTDOWNER + SHUTDOWNER_ATTRIBUTES + 15)
  733. #define DAILY_REBOOT_TIME (SHUTDOWNER + SHUTDOWNER_ATTRIBUTES + 16)
  734. #define DAILY_SHUTDOWN_ENABLED (SHUTDOWNER + SHUTDOWNER_ATTRIBUTES + 17)
  735. #define WEEKLY_SHUTDOWN_ENABLED (SHUTDOWNER + SHUTDOWNER_ATTRIBUTES + 18)
  736. #define DEFAULT_SHUTDOWN_DELAY (SHUTDOWNER + SHUTDOWNER_ATTRIBUTES + 19)
  737. #define HOST_LOW_BATTERY_DURATION (SHUTDOWNER + SHUTDOWNER_ATTRIBUTES + 20)
  738. #define LINE_FAIL_SHUTDOWN_DELAY (SHUTDOWNER + SHUTDOWNER_ATTRIBUTES + 21)
  739. #define SHUTDOWN_LIST (SHUTDOWNER + SHUTDOWNER_ATTRIBUTES + 22)
  740. #define PREPARE_FOR_SHUTDOWN_DELAY (SHUTDOWNER + SHUTDOWNER_ATTRIBUTES + 23)
  741. #define SHUTDOWN (SHUTDOWNER + SHUTDOWNER_ACTIONS + 1)
  742. #define ADMIN_SHUTDOWN (SHUTDOWNER + SHUTDOWNER_ACTIONS + 2)
  743. #define CANCEL_SHUTDOWN (SHUTDOWNER + SHUTDOWNER_ACTIONS + 3)
  744. #define UPS_FAULT_SHUTDOWN (SHUTDOWNER + SHUTDOWNER_ACTIONS + 4)
  745. #define FINAL_SHUTDOWN (SHUTDOWNER + SHUTDOWNER_ACTIONS + 5)
  746. #define PREPARE_FOR_SHUTDOWN (SHUTDOWNER + SHUTDOWNER_ACTIONS + 6)
  747. #define PERFORM_SHUTDOWN (SHUTDOWNER + SHUTDOWNER_ACTIONS + 7)
  748. #define LOW_BATTERY_SHUTDOWN (SHUTDOWNER + SHUTDOWNER_ACTIONS + 8)
  749. #define RESCHEDULE_SHUTDOWN (SHUTDOWNER + SHUTDOWNER_ACTIONS + 9)
  750. #define IS_SMART_SCHEDULING_ENABLED (SHUTDOWNER + SHUTDOWNER_ACTIONS + 10)
  751. #define IS_SHUTDOWN_IN_PROGRESS (SHUTDOWNER + SHUTDOWNER_ACTIONS + 11)
  752. #define IS_DATASAFE_ENABLED (SHUTDOWNER + SHUTDOWNER_ACTIONS + 12)
  753. #define NO_SHUTDOWN (SHUTDOWNER + SHUTDOWNER_STATE_VALUES + 1)
  754. #define SHUTDOWN_STARTED (SHUTDOWNER + SHUTDOWNER_STATE_VALUES + 2)
  755. #define SHUTDOWN_STOPPED (SHUTDOWNER + SHUTDOWNER_STATE_VALUES + 3)
  756. //**** Modem stuff
  757. #define MODEM 9000
  758. #define MODEM_ATTRIBUTES 0
  759. #define MODEM_STATES 200
  760. #define MODEM_STATE_VALUES 300
  761. #define MODEM_ACTIONS 400
  762. #define MODEM_INIT_STRING (MODEM + MODEM_ATTRIBUTES + 1)
  763. #define MODEM_SET_PAUSE_TIME (MODEM + MODEM_ATTRIBUTES + 2)
  764. #define MODEM_DIAL_WITH_TONE (MODEM + MODEM_ATTRIBUTES + 3)
  765. #define MODEM_DIAL_WITH_PULSE (MODEM + MODEM_ATTRIBUTES + 4)
  766. #define MODEM_DIAL_STRING_TERMINATOR (MODEM + MODEM_ATTRIBUTES + 5)
  767. #define MODEM_DIAL_WAIT_DIAL_TONE (MODEM + MODEM_ATTRIBUTES + 6)
  768. #define MODEM_DIAL_WAIT_SILENT (MODEM + MODEM_ATTRIBUTES + 7)
  769. #define MODEM_COMMAND_TERMINATOR (MODEM + MODEM_ATTRIBUTES + 8)
  770. #define MODEM_PAUSE_COMMAND (MODEM + MODEM_ATTRIBUTES + 9)
  771. #define MODEM_HANGUP_COMMAND (MODEM + MODEM_ATTRIBUTES + 10)
  772. #define MODEM_DRIVER_TYPE (MODEM + MODEM_ATTRIBUTES + 11)
  773. #define MODEM_PORT_NUMBER (MODEM + MODEM_ATTRIBUTES + 12)
  774. #define MODEM_BOARD_NUMBER (MODEM + MODEM_ATTRIBUTES + 13)
  775. #define MODEM_DIAL_TYPE (MODEM + MODEM_ATTRIBUTES + 14)
  776. #define MODEM_ALLOWED_DIAL_TYPES (MODEM + MODEM_ATTRIBUTES + 15)
  777. #define MODEM_BAUD_RATE (MODEM + MODEM_ATTRIBUTES + 16)
  778. #define MODEM_ALLOWED_BAUD_RATES (MODEM + MODEM_ATTRIBUTES + 17)
  779. #define MODEM_PORT_NAME (MODEM + MODEM_ATTRIBUTES + 18)
  780. // ***** FLEXIBLE EVENT CODES ******
  781. #define FLEX_EVENT 10000
  782. #define FLEX_EVENT_ATTRIBUTES 0
  783. #define FLEX_EVENT_ACTIONS 100
  784. #define FLEX_EVENT_EVENTS 200
  785. #define FLEX_EVENT_VALUES 300
  786. #define FLEX_EVENT_TEST_ACTIONS 400
  787. #define FLEX_EVENT_LIST (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 1)
  788. #define FLEX_ACTION_LIST (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 2)
  789. #define FLEX_USERS (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 3)
  790. #define FLEX_NOTIFIABLE_USERS (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 4)
  791. #define FLEX_ADMIN_USER_LIST (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 5)
  792. #define FLEX_ADMIN_NOTIFY_MESSAGE (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 6)
  793. #define FLEX_ADMIN_NOTIFY_DELAY (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 7)
  794. #define FLEX_ADMIN_NOTIFY_REPEAT (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 8)
  795. #define FLEX_ADMIN_NOTIFY_INTERVAL (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 9)
  796. #define FLEX_ALLOWED_NOTIFY_TYPES (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 10)
  797. #define FLEX_NOTIFY_TYPE (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 11)
  798. #define FLEX_NOTIFY_USER_LIST (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 12)
  799. #define FLEX_NOTIFY_MESSAGE (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 13)
  800. #define FLEX_NOTIFY_DELAY (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 14)
  801. #define FLEX_NOTIFY_REPEAT (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 15)
  802. #define FLEX_NOTIFY_INTERVAL (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 16)
  803. #define FLEX_SHUTDOWN_DELAY (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 17)
  804. #define FLEX_COMMAND_FILE_NAME (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 18)
  805. #define FLEX_COMMAND_FILE_DELAY (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 19)
  806. #define FLEX_PAGEABLE_USERS (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 20)
  807. #define FLEX_PAGE_USER_LIST (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 21)
  808. #define FLEX_PAGE_DELAY (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 22)
  809. #define FLEX_PAGE_MESSAGE (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 23)
  810. #define FLEX_EMAILABLE_USERS (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 24)
  811. #define FLEX_EMAIL_USER_LIST (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 25)
  812. #define FLEX_EMAIL_MESSAGE (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 26)
  813. #define FLEX_EMAIL_DELAY (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 27)
  814. #define FLEX_EMAIL_EVENT_DELAY (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 28)
  815. #define FLEX_EMAIL_ENABLED (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 29)
  816. #define FLEX_PAGER_SERVICE_NAME (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 30)
  817. #define FLEX_PAGER_SERVICE_OLD_NAME (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 31)
  818. #define FLEX_PAGER_SERVICE_ATTR_VALUES (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 32)
  819. #define FLEX_PAGER_SERVICE_ANSWER_DELAY (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 33)
  820. #define FLEX_PAGER_SERVICE_EXTENSION_DELAY (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 34)
  821. #define FLEX_PAGER_SERVICE_EXIT_CODE (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 35)
  822. #define FLEX_PAGER_EVENT_MESSAGE (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 36)
  823. #define FLEX_PAGER_EVENT_DELAY (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 37)
  824. #define FLEX_TIME_UNTIL_SHUTDOWN (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 38)
  825. #define IS_LINE_FAIL_RUN_TIME_ENABLED (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 39)
  826. #define FLEX_DEFAULT_ACTION_LIST (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 40)
  827. #define FLEX_EVENT_NAME (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 41)
  828. #define IS_FLEX_EVENTS (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 42)
  829. #define FLEX_EVENT_NAME_LIST (FLEX_EVENT + FLEX_EVENT_ATTRIBUTES + 43)
  830. #define FLEX_EDIT_USERS (FLEX_EVENT + FLEX_EVENT_EVENTS + 1)
  831. #define FLEX_ACTION_LOG (FLEX_EVENT + FLEX_EVENT_ACTIONS + 1)
  832. #define FLEX_ACTION_ADMIN_NOTIFY (FLEX_EVENT + FLEX_EVENT_ACTIONS + 2)
  833. #define FLEX_ACTION_USER_NOTIFY (FLEX_EVENT + FLEX_EVENT_ACTIONS + 3)
  834. #define FLEX_ACTION_SHUTDOWN (FLEX_EVENT + FLEX_EVENT_ACTIONS + 4)
  835. #define FLEX_ACTION_COMMAND (FLEX_EVENT + FLEX_EVENT_ACTIONS + 5)
  836. #define FLEX_ACTION_PAGE (FLEX_EVENT + FLEX_EVENT_ACTIONS + 6)
  837. #define FLEX_ACTION_EMAIL (FLEX_EVENT + FLEX_EVENT_ACTIONS + 7)
  838. #define FLEX_RESET_ACTIONS (FLEX_EVENT + FLEX_EVENT_ACTIONS + 1)
  839. #define PAGE_USERS (FLEX_EVENT + FLEX_EVENT_ACTIONS + 2)
  840. #define MAIL_USERS (FLEX_EVENT + FLEX_EVENT_ACTIONS + 3)
  841. #define FLEX_RENAME_PAGER_SERVICE (FLEX_EVENT + FLEX_EVENT_ACTIONS + 4)
  842. #define FLEX_EVENT_BASE 20000
  843. #define FLEX_NOTIFY_ALL (FLEX_EVENT + FLEX_EVENT_VALUES + 1)
  844. #define FLEX_NOTIFY_NAMES (FLEX_EVENT + FLEX_EVENT_VALUES + 2)
  845. #define FLEX_NOTIFY_DOMAIN (FLEX_EVENT + FLEX_EVENT_VALUES + 3)
  846. #define FLEX_TEST_AN_ACTION (FLEX_EVENT + FLEX_EVENT_TEST_ACTIONS)
  847. #define FLEX_TEST_NOTIFY (FLEX_EVENT + FLEX_EVENT_TEST_ACTIONS + 1)
  848. #define FLEX_TEST_NOTIFY_TYPE (FLEX_EVENT + FLEX_EVENT_TEST_ACTIONS + 2)
  849. #define FLEX_TEST_NOTIFY_USERS (FLEX_EVENT + FLEX_EVENT_TEST_ACTIONS + 3)
  850. #define FLEX_TEST_NOTIFY_MESSAGE (FLEX_EVENT + FLEX_EVENT_TEST_ACTIONS + 4)
  851. #define FLEX_TEST_AVAILABLE (FLEX_EVENT + FLEX_EVENT_TEST_ACTIONS + 5)
  852. #define FLEX_TEST_RUN_COMMAND (FLEX_EVENT + FLEX_EVENT_TEST_ACTIONS + 21)
  853. #define FLEX_TEST_RUN_COMMAND_FILE (FLEX_EVENT + FLEX_EVENT_TEST_ACTIONS + 22)
  854. #define FLEX_TEST_EMAIL (FLEX_EVENT + FLEX_EVENT_TEST_ACTIONS + 31)
  855. #define FLEX_TEST_EMAIL_USERS (FLEX_EVENT + FLEX_EVENT_TEST_ACTIONS + 32)
  856. #define FLEX_TEST_EMAIL_ADDL_MESSAGE (FLEX_EVENT + FLEX_EVENT_TEST_ACTIONS + 33)
  857. #define FLEX_TEST_EMAIL_EVENT_CODE (FLEX_EVENT + FLEX_EVENT_TEST_ACTIONS + 34)
  858. #define FLEX_TEST_PAGE (FLEX_EVENT + FLEX_EVENT_TEST_ACTIONS + 41)
  859. #define FLEX_TEST_PAGE_USERS (FLEX_EVENT + FLEX_EVENT_TEST_ACTIONS + 42)
  860. #define FLEX_TEST_PAGE_MESSAGE (FLEX_EVENT + FLEX_EVENT_TEST_ACTIONS + 43)
  861. //**** E-mail stuff
  862. #define EMAIL 30000
  863. #define EMAIL_ATTRIBUTES 0
  864. #define EMAIL_SMTP_SERVER (EMAIL + EMAIL_ATTRIBUTES + 1)
  865. #define EMAIL_SMTP_ACCOUNT (EMAIL + EMAIL_ATTRIBUTES + 2)
  866. #define EMAIL_SMTP_DOMAIN (EMAIL + EMAIL_ATTRIBUTES + 3)
  867. #define IS_SMTP_EMAIL (EMAIL + EMAIL_ATTRIBUTES + 4)
  868. #endif