iec61850_cdc.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658
  1. /*
  2. * cdc.h
  3. *
  4. * Copyright 2014 Michael Zillgith
  5. *
  6. * This file is part of libIEC61850.
  7. *
  8. * libIEC61850 is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * libIEC61850 is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with libIEC61850. If not, see <http://www.gnu.org/licenses/>.
  20. *
  21. * See COPYING file for the complete license text.
  22. */
  23. #ifndef CDC_H_
  24. #define CDC_H_
  25. #ifdef __cplusplus
  26. extern "C" {
  27. #endif
  28. /** \addtogroup server_api_group
  29. * @{
  30. */
  31. /**
  32. * @defgroup COMMON_DATA_CLASSES Helper functions to create common data classes (CDC) using the dynamic model API
  33. *
  34. * Currently supports CDCs from IEC 61850-7-3:2010 (Edition 2)
  35. *
  36. * @{
  37. */
  38. /**
  39. * \brief optional parts of CDCs
  40. */
  41. #define CDC_OPTION_PICS_SUBST (1 << 0)
  42. #define CDC_OPTION_BLK_ENA (1 << 1)
  43. /** Add d (description) data attribute */
  44. #define CDC_OPTION_DESC (1 << 2)
  45. /** Add dU (unicode description) data attribute */
  46. #define CDC_OPTION_DESC_UNICODE (1 << 3)
  47. /** Add cdcNs and cdcName required when a CDC is an extension to the standard */
  48. #define CDC_OPTION_AC_DLNDA (1 << 4)
  49. /** Add dataNs (data namespace) required for extended CDCs */
  50. #define CDC_OPTION_AC_DLN (1 << 5)
  51. /** Add the unit data attribute */
  52. #define CDC_OPTION_UNIT (1 << 6)
  53. #define CDC_OPTION_FROZEN_VALUE (1 << 7)
  54. #define CDC_OPTION_ADDR (1 << 8)
  55. #define CDC_OPTION_ADDINFO (1 << 9)
  56. #define CDC_OPTION_INST_MAG (1 << 10)
  57. #define CDC_OPTION_RANGE (1 << 11)
  58. #define CDC_OPTION_UNIT_MULTIPLIER (1 << 12)
  59. #define CDC_OPTION_AC_SCAV (1 << 13)
  60. #define CDC_OPTION_MIN (1 << 14)
  61. #define CDC_OPTION_MAX (1 << 15)
  62. #define CDC_OPTION_AC_CLC_O (1 << 16)
  63. #define CDC_OPTION_RANGE_ANG (1 << 17)
  64. #define CDC_OPTION_PHASE_A (1 << 18)
  65. #define CDC_OPTION_PHASE_B (1 << 19)
  66. #define CDC_OPTION_PHASE_C (1 << 20)
  67. #define CDC_OPTION_PHASE_NEUT (1 << 21)
  68. #define CDC_OPTION_PHASES_ABC (CDC_OPTION_PHASE_A | CDC_OPTION_PHASE_B | CDC_OPTION_PHASE_C)
  69. #define CDC_OPTION_PHASES_ALL (CDC_OPTION_PHASE_A | CDC_OPTION_PHASE_B | CDC_OPTION_PHASE_C | CDC_OPTION_PHASE_NEUT)
  70. #define CDC_OPTION_STEP_SIZE (1 << 22)
  71. #define CDC_OPTION_ANGLE_REF (1 << 23)
  72. /** Options that are only valid for DPL CDC */
  73. #define CDC_OPTION_DPL_HWREV (1 << 17)
  74. #define CDC_OPTION_DPL_SWREV (1 << 18)
  75. #define CDC_OPTION_DPL_SERNUM (1 << 19)
  76. #define CDC_OPTION_DPL_MODEL (1 << 20)
  77. #define CDC_OPTION_DPL_LOCATION (1 << 21)
  78. /** Add mandatory data attributes for LLN0 (e.g. LBL configRef) */
  79. #define CDC_OPTION_AC_LN0_M (1 << 24)
  80. #define CDC_OPTION_AC_LN0_EX (1 << 25)
  81. #define CDC_OPTION_AC_DLD_M (1 << 26)
  82. /**
  83. * \brief Control model types
  84. */
  85. #define CDC_CTL_MODEL_NONE 0
  86. #define CDC_CTL_MODEL_DIRECT_NORMAL 1
  87. #define CDC_CTL_MODEL_SBO_NORMAL 2
  88. #define CDC_CTL_MODEL_DIRECT_ENHANCED 3
  89. #define CDC_CTL_MODEL_SBO_ENHANCED 4
  90. #define CDC_CTL_MODEL_HAS_CANCEL (1 << 4)
  91. #define CDC_CTL_MODEL_IS_TIME_ACTIVATED (1 << 5)
  92. #define CDC_CTL_OPTION_ORIGIN (1 << 6)
  93. #define CDC_CTL_OPTION_CTL_NUM (1 << 7)
  94. #define CDC_CTL_OPTION_ST_SELD (1 << 8)
  95. #define CDC_CTL_OPTION_OP_RCVD (1 << 9)
  96. #define CDC_CTL_OPTION_OP_OK (1 << 10)
  97. #define CDC_CTL_OPTION_T_OP_OK (1 << 11)
  98. #define CDC_CTL_OPTION_SBO_TIMEOUT (1 << 12)
  99. #define CDC_CTL_OPTION_SBO_CLASS (1 << 13)
  100. #define CDC_CTL_OPTION_OPER_TIMEOUT (1 << 14)
  101. /****************************************************
  102. * Constructed Attribute Classes (CAC)
  103. ***************************************************/
  104. LIB61850_API DataAttribute*
  105. CAC_AnalogueValue_create(const char* name, ModelNode* parent, FunctionalConstraint fc, uint8_t triggerOptions,
  106. bool isIntegerNotFloat);
  107. /**
  108. * \brief create a ValWithTrans constructed data attribute
  109. *
  110. * \param hasTransInd
  111. */
  112. LIB61850_API DataAttribute*
  113. CAC_ValWithTrans_create(const char* name, ModelNode* parent, FunctionalConstraint fc, uint8_t triggerOptions, bool hasTransientIndicator);
  114. /**
  115. * CDC_OPTION_AC_CLC_O
  116. */
  117. LIB61850_API DataAttribute*
  118. CAC_Vector_create(const char* name, ModelNode* parent, uint32_t options, FunctionalConstraint fc, uint8_t triggerOptions);
  119. LIB61850_API DataAttribute*
  120. CAC_Point_create(const char* name, ModelNode* parent, FunctionalConstraint fc, uint8_t triggerOptions, bool hasZVal);
  121. LIB61850_API DataAttribute*
  122. CAC_ScaledValueConfig_create(const char* name, ModelNode* parent);
  123. LIB61850_API DataAttribute*
  124. CAC_Unit_create(const char* name, ModelNode* parent, bool hasMagnitude);
  125. LIB61850_API DataAttribute*
  126. CDA_OperBoolean(ModelNode* parent, bool isTImeActivated);
  127. /****************************************************
  128. * Common Data Classes (CDC)
  129. ***************************************************/
  130. LIB61850_API DataObject*
  131. CDC_SPS_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
  132. LIB61850_API DataObject*
  133. CDC_DPS_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
  134. LIB61850_API DataObject*
  135. CDC_INS_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
  136. LIB61850_API DataObject*
  137. CDC_ENS_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
  138. LIB61850_API DataObject*
  139. CDC_BCR_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
  140. LIB61850_API DataObject*
  141. CDC_VSS_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
  142. /**
  143. * \brief create a new SEC (Security violation) CDC instance (data object)
  144. *
  145. * Allowed parent types are LogicalNode and DataObject.
  146. *
  147. * options:
  148. * standard (include standard optional elements like extension namespaces and descriptions (d, dU).
  149. *
  150. * CDC_OPTION_ADDR (address of the client causing the security violation)
  151. * CDC_OPTION_ADDINFO (additional info text)
  152. *
  153. * \param dataObjectName the name of the new object
  154. * \param parent the parent of the new data object (either a LogicalNode or another DataObject)
  155. * \param options bit mask to encode required optional elements
  156. */
  157. LIB61850_API DataObject*
  158. CDC_SEC_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
  159. /**
  160. * \brief create a new MV (Measured value) CDC instance (data object)
  161. *
  162. * Allowed parent types are LogicalNode and DataObject.
  163. *
  164. * possible options:
  165. * CDC_OPTION_INST_MAG
  166. * CDC_OPTION_RANGE
  167. * CDC_OPTION_PICS_SUBST
  168. * standard (include standard optional elements like extension namespaces and descriptions (d, dU).
  169. *
  170. * \param dataObjectName the name of the new object
  171. * \param parent the parent of the new data object (either a LogicalNode or another DataObject)
  172. * \param options bit mask to encode required optional elements
  173. * \param isIntegerNotFloat if true the AnalogueValue instance have integer instead of float
  174. *
  175. */
  176. LIB61850_API DataObject*
  177. CDC_MV_create(const char* dataObjectName, ModelNode* parent, uint32_t options, bool isIntegerNotFloat);
  178. /**
  179. * CDC_OPTION_INST_MAG
  180. * CDC_OPTION_RANGE
  181. */
  182. LIB61850_API DataObject*
  183. CDC_CMV_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
  184. /**
  185. * \brief create a new SAV (Sampled analog value) CDC instance (data object)
  186. *
  187. * Allowed parent types are LogicalNode and DataObject.
  188. *
  189. * possible options:
  190. * CDC_OPTION_UNIT
  191. * CDC_OPTION_AC_SCAV
  192. * CDC_OPTION_MIN
  193. * CDC_OPTION_MAX
  194. * standard (include standard optional elements like extension namespaces and descriptions (d, dU).
  195. *
  196. * \param dataObjectName the name of the new object
  197. * \param parent the parent of the new data object (either a LogicalNode or another DataObject)
  198. * \param options bit mask to encode required optional elements
  199. * \param isIntegerNotFloat if true the AnalogueValue instance have integer instead of float
  200. *
  201. */
  202. LIB61850_API DataObject*
  203. CDC_SAV_create(const char* dataObjectName, ModelNode* parent, uint32_t options, bool isIntegerNotFloat);
  204. /**
  205. * \brief create a new LPL (Logical node name plate) CDC instance (data object)
  206. *
  207. * Allowed parent type is LogicalNode
  208. *
  209. * possible options:
  210. * CDC_OPTION_AC_LN0_M (includes "configRev")
  211. * CDC_OPTION_AC_LN0_EX (includes "ldNs")
  212. * CDC_OPTION_AC_DLD_M (includes "lnNs")
  213. * standard options:
  214. * CDC_OPTION_DESC (includes "d")
  215. * CDC_OPTION_DESC_UNICODE (include "du")
  216. * CDC_OPTION_AC_DLNDA (include "cdcNs" and "cdcName")
  217. * CDC_OPTION_AC_DLN (includes "dataNs")
  218. *
  219. * \param dataObjectName the name of the new object
  220. * \param parent the parent of the new data object (either a LogicalNode or another DataObject)
  221. * \param options bit mask to encode required optional elements
  222. *
  223. * \return new DataObject instance
  224. */
  225. LIB61850_API DataObject*
  226. CDC_LPL_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
  227. /**
  228. * \brief create a new DPL (Device name plate) CDC instance (data object)
  229. *
  230. * Allowed parent type is LogicalNode
  231. *
  232. * possible options:
  233. * CDC_OPTION_DPL_HWREV (includes "hwRev")
  234. * CDC_OPTION_DPL_SWREV (includes "swRev")
  235. * CDC_OPTION_DPL_SERNUM (includes "serNum")
  236. * CDC_OPTION_DPL_MODEL (includes "model")
  237. * CDC_OPTION_DPL_LOCATION (includes "location")
  238. * standard options:
  239. * CDC_OPTION_AC_DLNDA (include "cdcNs" and "cdcName")
  240. * CDC_OPTION_AC_DLN (includes "dataNs")
  241. *
  242. * \param dataObjectName the name of the new object
  243. * \param parent the parent of the new data object (either a LogicalNode or another DataObject)
  244. * \param options bit mask to encode required optional elements
  245. *
  246. * \return new DataObject instance
  247. */
  248. LIB61850_API DataObject*
  249. CDC_DPL_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
  250. LIB61850_API DataObject*
  251. CDC_HST_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint16_t maxPts);
  252. /**
  253. * \brief Directional protection activation information (ACD)
  254. *
  255. * Allowed parent types are LogicalNode and DataObject.
  256. *
  257. * possible options:
  258. * CDC_OPTION_PHASE_A
  259. * CDC_OPTION_PHASE_B
  260. * CDC_OPTION_PHASE_C
  261. * CDC_OPTION_PHASE_NEUT
  262. * CDC_OPTION_PHASES_ABC
  263. * CDC_OPTION_PHASES_ALL
  264. * standard (include standard optional elements like extension namespaces and descriptions (d, dU).
  265. *
  266. * \param dataObjectName the name of the new object
  267. * \param parent the parent of the new data object (either a LogicalNode or another DataObject)
  268. * \param options bit mask to encode required optional elements
  269. */
  270. LIB61850_API DataObject*
  271. CDC_ACD_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
  272. /**
  273. * \brief Protection activation information (ACT)
  274. */
  275. LIB61850_API DataObject*
  276. CDC_ACT_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
  277. /**
  278. * \brief Single point setting (SPG)
  279. *
  280. * \param dataObjectName the name of the new object
  281. * \param parent the parent of the new data object (either a LogicalNode or another DataObject)
  282. * \param options bit mask to encode required optional elements
  283. */
  284. LIB61850_API DataObject*
  285. CDC_SPG_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
  286. /**
  287. * \brief Visible string setting (VSG)
  288. *
  289. * \param dataObjectName the name of the new object
  290. * \param parent the parent of the new data object (either a LogicalNode or another DataObject)
  291. * \param options bit mask to encode required optional elements
  292. */
  293. LIB61850_API DataObject*
  294. CDC_VSG_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
  295. /**
  296. * \brief Enumerated status setting (ENG)
  297. *
  298. * \param dataObjectName the name of the new object
  299. * \param parent the parent of the new data object (either a LogicalNode or another DataObject)
  300. * \param options bit mask to encode required optional elements
  301. */
  302. LIB61850_API DataObject*
  303. CDC_ENG_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
  304. /**
  305. * \brief Integer status setting (ING)
  306. *
  307. * possible options:
  308. * CDC_OPTION_UNIT
  309. * CDC_OPTION_MIN
  310. * CDC_OPTION_MAX
  311. * CDC_OPTION_STEP_SIZE
  312. * standard (include standard optional elements like extension namespaces and descriptions (d, dU).
  313. *
  314. */
  315. LIB61850_API DataObject*
  316. CDC_ING_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
  317. /**
  318. * \brief Analogue Setting (ASG)
  319. *
  320. * possible options:
  321. * CDC_OPTION_UNIT
  322. * CDC_OPTION_MIN
  323. * CDC_OPTION_MAX
  324. * CDC_OPTION_STEP_SIZE
  325. * standard (include standard optional elements like extension namespaces and descriptions (d, dU).
  326. *
  327. */
  328. LIB61850_API DataObject*
  329. CDC_ASG_create(const char* dataObjectName, ModelNode* parent, uint32_t options, bool isIntegerNotFloat);
  330. /**
  331. * \brief Phase to ground/neutral related measured values of a three-phase system (WYE)
  332. *
  333. * possible options:
  334. * CDC_OPTION_ANGLE_REF
  335. */
  336. LIB61850_API DataObject*
  337. CDC_WYE_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
  338. /**
  339. * \brief Phase to phase related measured values of a three-phase system (DEL)
  340. *
  341. * possible options:
  342. * CDC_OPTION_ANGLE_REF
  343. */
  344. LIB61850_API DataObject*
  345. CDC_DEL_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
  346. /***************************
  347. * Controls
  348. ***************************/
  349. /**
  350. * \brief Controllable single point (SPC)
  351. *
  352. * \param controlOptions specify which control model to set as default and other control related options
  353. */
  354. LIB61850_API DataObject*
  355. CDC_SPC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions);
  356. /**
  357. * \brief Controllable double point (DPC)
  358. *
  359. * CDC_OPTION_IS_TIME_ACTICATED
  360. *
  361. * substitution options
  362. * CDC_OPTION_BLK_ENA
  363. * standard description and namespace options
  364. *
  365. * \param dataObjectName the name of the new object
  366. * \param parent the parent of the new data object (either a LogicalNode or another DataObject)
  367. * \param options bit mask to encode required optional elements
  368. * \param defaultControlModel specify which control model to set as default.
  369. *
  370. */
  371. LIB61850_API DataObject*
  372. CDC_DPC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions);
  373. /**
  374. * \brief Controllable integer status (INC)
  375. *
  376. * CDC_OPTION_IS_TIME_ACTICATED
  377. *
  378. * CDC_OPTION_MIN
  379. * CDC_OPTION_MAX
  380. * CDC_OPTION_STEP_SIZE
  381. *
  382. * substitution options
  383. * CDC_OPTION_BLK_ENA
  384. * standard description and namespace options
  385. *
  386. * \param dataObjectName the name of the new object
  387. * \param parent the parent of the new data object (either a LogicalNode or another DataObject)
  388. * \param options bit mask to encode required optional elements
  389. * \param defaultControlModel specify which control model to set as default.
  390. *
  391. */
  392. LIB61850_API DataObject*
  393. CDC_INC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions);
  394. /**
  395. * \brief Controllable enumerated status (ENC)
  396. *
  397. * CDC_OPTION_IS_TIME_ACTICATED
  398. *
  399. * substitution options
  400. * CDC_OPTION_BLK_ENA
  401. * standard description and namespace options
  402. *
  403. * \param dataObjectName the name of the new object
  404. * \param parent the parent of the new data object (either a LogicalNode or another DataObject)
  405. * \param options bit mask to encode required optional elements
  406. * \param defaultControlModel specify which control model to set as default.
  407. *
  408. */
  409. LIB61850_API DataObject*
  410. CDC_ENC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions);
  411. /**
  412. * \brief Controllable enumerated status (ENC)
  413. *
  414. * CDC_OPTION_IS_TIME_ACTICATED
  415. *
  416. * substitution options
  417. * CDC_OPTION_BLK_ENA
  418. * standard description and namespace options
  419. *
  420. * \param dataObjectName the name of the new object
  421. * \param parent the parent of the new data object (either a LogicalNode or another DataObject)
  422. * \param options bit mask to encode required optional elements
  423. * \param controlOptions specify which control model to set as default and other control specific options
  424. * \param hasTransientIndicator specifies if the step position information contains the transient indicator
  425. *
  426. */
  427. LIB61850_API DataObject*
  428. CDC_BSC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions, bool hasTransientIndicator);
  429. /**
  430. * \brief Integer controlled step position information (ISC)
  431. *
  432. * CDC_OPTION_IS_TIME_ACTICATED
  433. *
  434. * substitution options
  435. * CDC_OPTION_BLK_ENA
  436. * standard description and namespace options
  437. *
  438. * \param dataObjectName the name of the new object
  439. * \param parent the parent of the new data object (either a LogicalNode or another DataObject)
  440. * \param options bit mask to encode required optional elements
  441. * \param controlOptions specify which control model to set as default and other control specific options
  442. * \param hasTransientIndicator specifies if the step position information contains the transient indicator
  443. *
  444. */
  445. LIB61850_API DataObject*
  446. CDC_ISC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions, bool hasTransientIndicator);
  447. /**
  448. * \brief Controllable analogue process value (APC)
  449. *
  450. * CDC_OPTION_IS_TIME_ACTICATED
  451. *
  452. * CDC_OPTION_MIN
  453. * CDC_OPTION_MAX
  454. *
  455. * substitution options
  456. * CDC_OPTION_BLK_ENA
  457. * standard description and namespace options
  458. *
  459. * \param dataObjectName the name of the new object
  460. * \param parent the parent of the new data object (either a LogicalNode or another DataObject)
  461. * \param options bit mask to encode required optional elements
  462. * \param controlOptions specify which control model to set as default and other control specific options
  463. * \param isIntegerNotFloat
  464. */
  465. LIB61850_API DataObject*
  466. CDC_APC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions, bool isIntegerNotFloat);
  467. /**
  468. * \brief Binary controlled ananlogue process value (BAC)
  469. *
  470. * CDC_OPTION_IS_TIME_ACTICATED
  471. *
  472. * CDC_OPTION_MIN
  473. * CDC_OPTION_MAX
  474. * CDC_OPTION_STEP_SIZE
  475. *
  476. * substitution options
  477. * CDC_OPTION_BLK_ENA
  478. * standard description and namespace options
  479. *
  480. * \param dataObjectName the name of the new object
  481. * \param parent the parent of the new data object (either a LogicalNode or another DataObject)
  482. * \param options bit mask to encode required optional elements
  483. * \param controlOptions specify which control model to set as default and other control specific options
  484. * \param isIntegerNotFloat
  485. */
  486. LIB61850_API DataObject*
  487. CDC_BAC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions, bool isIntegerNotFloat);
  488. /** Minimum measured value */
  489. #define CDC_OPTION_61400_MIN_MX_VAL (1 << 10)
  490. /** Maximum measured value */
  491. #define CDC_OPTION_61400_MAX_MX_VAL (1 << 11)
  492. /** Total average value of data */
  493. #define CDC_OPTION_61400_TOT_AV_VAL (1 << 12)
  494. /** Standard deviation of data */
  495. #define CDC_OPTION_61400_SDV_VAL (1 << 13)
  496. /** Rate of increase */
  497. #define CDC_OPTION_61400_INC_RATE (1 << 14)
  498. /** Rate of decrease */
  499. #define CDC_OPTION_61400_DEC_RATE (1 << 15)
  500. /** Setpoint or parameter access level (low/medium/high) */
  501. #define CDC_OPTION_61400_SP_ACS (1 << 16)
  502. /** Time periodical reset (hourly/daily/weekly/monthly) */
  503. #define CDC_OPTION_61400_CHA_PER_RS (1 << 17)
  504. /** Command access level */
  505. #define CDC_OPTION_61400_CM_ACS (1 << 18)
  506. /** Total time duration of a state */
  507. #define CDC_OPTION_61400_TM_TOT (1 << 19)
  508. /** Daily counting data */
  509. #define CDC_OPTION_61400_COUNTING_DAILY (1 << 20)
  510. /** Monthly counting data */
  511. #define CDC_OPTION_61400_COUNTING_MONTHLY (1 << 21)
  512. /** Yearly counting data */
  513. #define CDC_OPTION_61400_COUNTING_YEARLY (1 << 22)
  514. /** Total counting data */
  515. #define CDC_OPTION_61400_COUNTING_TOTAL (1 << 23)
  516. /** All counting data */
  517. #define CDC_OPTION_61400_COUNTING_ALL (CDC_OPTION_61400_COUNTING_DAILY | CDC_OPTION_61400_COUNTING_MONTHLY | CDC_OPTION_61400_COUNTING_YEARLY | CDC_OPTION_61400_COUNTING_TOTAL)
  518. LIB61850_API DataObject*
  519. CDC_SPV_create(const char* dataObjectName, ModelNode* parent,
  520. uint32_t options,
  521. uint32_t controlOptions,
  522. uint32_t wpOptions,
  523. bool hasChaManRs);
  524. LIB61850_API DataObject*
  525. CDC_STV_create(const char* dataObjectName, ModelNode* parent,
  526. uint32_t options,
  527. uint32_t controlOptions,
  528. uint32_t wpOptions,
  529. bool hasOldStatus);
  530. LIB61850_API DataObject*
  531. CDC_CMD_create(const char* dataObjectName, ModelNode* parent,
  532. uint32_t options,
  533. uint32_t controlOptions,
  534. uint32_t wpOptions,
  535. bool hasOldStatus,
  536. bool hasCmTm,
  537. bool hasCmCt);
  538. LIB61850_API DataObject*
  539. CDC_ALM_create(const char* dataObjectName, ModelNode* parent,
  540. uint32_t options,
  541. uint32_t controlOptions,
  542. uint32_t wpOptions,
  543. bool hasOldStatus);
  544. LIB61850_API DataObject*
  545. CDC_CTE_create(const char* dataObjectName, ModelNode* parent,
  546. uint32_t options,
  547. uint32_t controlOptions,
  548. uint32_t wpOptions,
  549. bool hasHisRs);
  550. LIB61850_API DataObject*
  551. CDC_TMS_create(const char* dataObjectName, ModelNode* parent,
  552. uint32_t options,
  553. uint32_t controlOptions,
  554. uint32_t wpOptions,
  555. bool hasHisRs);
  556. /**@}*/
  557. /**@}*/
  558. #ifdef __cplusplus
  559. }
  560. #endif
  561. #endif /* CDC_H_ */