iec61850_cdc.h 21 KB

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