libiec61850  1.6.0
iec61850_cdc.h
Go to the documentation of this file.
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 
24 #ifndef CDC_H_
25 #define CDC_H_
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 
49 #define CDC_OPTION_PICS_SUBST (1 << 0)
50 #define CDC_OPTION_BLK_ENA (1 << 1)
51 
53 #define CDC_OPTION_DESC (1 << 2)
54 
56 #define CDC_OPTION_DESC_UNICODE (1 << 3)
57 
59 #define CDC_OPTION_AC_DLNDA (1 << 4)
60 
62 #define CDC_OPTION_AC_DLN (1 << 5)
63 
65 #define CDC_OPTION_UNIT (1 << 6)
66 
67 #define CDC_OPTION_FROZEN_VALUE (1 << 7)
68 
69 #define CDC_OPTION_ADDR (1 << 8)
70 #define CDC_OPTION_ADDINFO (1 << 9)
71 
72 #define CDC_OPTION_INST_MAG (1 << 10)
73 #define CDC_OPTION_RANGE (1 << 11)
74 
75 #define CDC_OPTION_UNIT_MULTIPLIER (1 << 12)
76 
77 #define CDC_OPTION_AC_SCAV (1 << 13)
78 
79 #define CDC_OPTION_MIN (1 << 14)
80 #define CDC_OPTION_MAX (1 << 15)
81 
82 #define CDC_OPTION_AC_CLC_O (1 << 16)
83 
84 #define CDC_OPTION_RANGE_ANG (1 << 17)
85 
86 #define CDC_OPTION_PHASE_A (1 << 18)
87 #define CDC_OPTION_PHASE_B (1 << 19)
88 #define CDC_OPTION_PHASE_C (1 << 20)
89 
90 #define CDC_OPTION_PHASE_NEUT (1 << 21)
91 
92 #define CDC_OPTION_PHASES_ABC (CDC_OPTION_PHASE_A | CDC_OPTION_PHASE_B | CDC_OPTION_PHASE_C)
93 
94 #define CDC_OPTION_PHASES_ALL (CDC_OPTION_PHASE_A | CDC_OPTION_PHASE_B | CDC_OPTION_PHASE_C | CDC_OPTION_PHASE_NEUT)
95 
96 #define CDC_OPTION_STEP_SIZE (1 << 22)
97 
98 #define CDC_OPTION_ANGLE_REF (1 << 23)
99 
101 #define CDC_OPTION_DPL_HWREV (1 << 17)
102 #define CDC_OPTION_DPL_SWREV (1 << 18)
103 #define CDC_OPTION_DPL_SERNUM (1 << 19)
104 #define CDC_OPTION_DPL_MODEL (1 << 20)
105 #define CDC_OPTION_DPL_LOCATION (1 << 21)
106 
108 #define CDC_OPTION_AC_LN0_M (1 << 24)
109 #define CDC_OPTION_AC_LN0_EX (1 << 25)
110 #define CDC_OPTION_AC_DLD_M (1 << 26)
111 
115 #define CDC_CTL_MODEL_NONE 0
116 #define CDC_CTL_MODEL_DIRECT_NORMAL 1
117 #define CDC_CTL_MODEL_SBO_NORMAL 2
118 #define CDC_CTL_MODEL_DIRECT_ENHANCED 3
119 #define CDC_CTL_MODEL_SBO_ENHANCED 4
120 
121 #define CDC_CTL_MODEL_HAS_CANCEL (1 << 4)
122 #define CDC_CTL_MODEL_IS_TIME_ACTIVATED (1 << 5)
123 
124 #define CDC_CTL_OPTION_ORIGIN (1 << 6)
125 #define CDC_CTL_OPTION_CTL_NUM (1 << 7)
126 #define CDC_CTL_OPTION_ST_SELD (1 << 8)
127 #define CDC_CTL_OPTION_OP_RCVD (1 << 9)
128 #define CDC_CTL_OPTION_OP_OK (1 << 10)
129 #define CDC_CTL_OPTION_T_OP_OK (1 << 11)
130 #define CDC_CTL_OPTION_SBO_TIMEOUT (1 << 12)
131 #define CDC_CTL_OPTION_SBO_CLASS (1 << 13)
132 #define CDC_CTL_OPTION_OPER_TIMEOUT (1 << 14)
133 
134 /****************************************************
135  * Constructed Attribute Classes (CAC)
136  ***************************************************/
137 
138 LIB61850_API DataAttribute*
139 CAC_AnalogueValue_create(const char* name, ModelNode* parent, FunctionalConstraint fc, uint8_t triggerOptions,
140  bool isIntegerNotFloat);
141 
142 
148 LIB61850_API DataAttribute*
149 CAC_ValWithTrans_create(const char* name, ModelNode* parent, FunctionalConstraint fc, uint8_t triggerOptions, bool hasTransientIndicator);
150 
151 
155 LIB61850_API DataAttribute*
156 CAC_Vector_create(const char* name, ModelNode* parent, uint32_t options, FunctionalConstraint fc, uint8_t triggerOptions);
157 
158 LIB61850_API DataAttribute*
159 CAC_Point_create(const char* name, ModelNode* parent, FunctionalConstraint fc, uint8_t triggerOptions, bool hasZVal);
160 
161 LIB61850_API DataAttribute*
162 CAC_ScaledValueConfig_create(const char* name, ModelNode* parent);
163 
164 LIB61850_API DataAttribute*
165 CAC_Unit_create(const char* name, ModelNode* parent, bool hasMagnitude);
166 
167 LIB61850_API DataAttribute*
168 CDA_OperBoolean(ModelNode* parent, bool isTImeActivated);
169 
170 /****************************************************
171  * Common Data Classes (CDC)
172  ***************************************************/
173 
174 LIB61850_API DataObject*
175 CDC_SPS_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
176 
177 LIB61850_API DataObject*
178 CDC_DPS_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
179 
180 LIB61850_API DataObject*
181 CDC_INS_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
182 
183 LIB61850_API DataObject*
184 CDC_ENS_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
185 
186 LIB61850_API DataObject*
187 CDC_BCR_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
188 
189 LIB61850_API DataObject*
190 CDC_VSS_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
191 
207 LIB61850_API DataObject*
208 CDC_SEC_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
209 
227 LIB61850_API DataObject*
228 CDC_MV_create(const char* dataObjectName, ModelNode* parent, uint32_t options, bool isIntegerNotFloat);
229 
234 LIB61850_API DataObject*
235 CDC_CMV_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
236 
255 LIB61850_API DataObject*
256 CDC_SAV_create(const char* dataObjectName, ModelNode* parent, uint32_t options, bool isIntegerNotFloat);
257 
279 LIB61850_API DataObject*
280 CDC_LPL_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
281 
303 LIB61850_API DataObject*
304 CDC_DPL_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
305 
306 LIB61850_API DataObject*
307 CDC_HST_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint16_t maxPts);
308 
327 LIB61850_API DataObject*
328 CDC_ACD_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
329 
333 LIB61850_API DataObject*
334 CDC_ACT_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
335 
343 LIB61850_API DataObject*
344 CDC_SPG_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
345 
353 LIB61850_API DataObject*
354 CDC_VSG_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
355 
363 LIB61850_API DataObject*
364 CDC_ENG_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
365 
377 LIB61850_API DataObject*
378 CDC_ING_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
379 
391 LIB61850_API DataObject*
392 CDC_ASG_create(const char* dataObjectName, ModelNode* parent, uint32_t options, bool isIntegerNotFloat);
393 
400 LIB61850_API DataObject*
401 CDC_WYE_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
402 
409 LIB61850_API DataObject*
410 CDC_DEL_create(const char* dataObjectName, ModelNode* parent, uint32_t options);
411 
412 /***************************
413  * Controls
414  ***************************/
415 
421 LIB61850_API DataObject*
422 CDC_SPC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions);
423 
439 LIB61850_API DataObject*
440 CDC_DPC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions);
441 
461 LIB61850_API DataObject*
462 CDC_INC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions);
463 
479 LIB61850_API DataObject*
480 CDC_ENC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions);
481 
498 LIB61850_API DataObject*
499 CDC_BSC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions, bool hasTransientIndicator);
500 
517 LIB61850_API DataObject*
518 CDC_ISC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions, bool hasTransientIndicator);
519 
538 LIB61850_API DataObject*
539 CDC_APC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions, bool isIntegerNotFloat);
540 
560 LIB61850_API DataObject*
561 CDC_BAC_create(const char* dataObjectName, ModelNode* parent, uint32_t options, uint32_t controlOptions, bool isIntegerNotFloat);
562 
564 #define CDC_OPTION_61400_MIN_MX_VAL (1 << 10)
565 
567 #define CDC_OPTION_61400_MAX_MX_VAL (1 << 11)
568 
570 #define CDC_OPTION_61400_TOT_AV_VAL (1 << 12)
571 
573 #define CDC_OPTION_61400_SDV_VAL (1 << 13)
574 
576 #define CDC_OPTION_61400_INC_RATE (1 << 14)
577 
579 #define CDC_OPTION_61400_DEC_RATE (1 << 15)
580 
582 #define CDC_OPTION_61400_SP_ACS (1 << 16)
583 
585 #define CDC_OPTION_61400_CHA_PER_RS (1 << 17)
586 
588 #define CDC_OPTION_61400_CM_ACS (1 << 18)
589 
591 #define CDC_OPTION_61400_TM_TOT (1 << 19)
592 
594 #define CDC_OPTION_61400_COUNTING_DAILY (1 << 20)
595 
597 #define CDC_OPTION_61400_COUNTING_MONTHLY (1 << 21)
598 
600 #define CDC_OPTION_61400_COUNTING_YEARLY (1 << 22)
601 
603 #define CDC_OPTION_61400_COUNTING_TOTAL (1 << 23)
604 
606 #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)
607 
608 LIB61850_API DataObject*
609 CDC_SPV_create(const char* dataObjectName, ModelNode* parent,
610  uint32_t options,
611  uint32_t controlOptions,
612  uint32_t wpOptions,
613  bool hasChaManRs);
614 
615 LIB61850_API DataObject*
616 CDC_STV_create(const char* dataObjectName, ModelNode* parent,
617  uint32_t options,
618  uint32_t controlOptions,
619  uint32_t wpOptions,
620  bool hasOldStatus);
621 
622 LIB61850_API DataObject*
623 CDC_CMD_create(const char* dataObjectName, ModelNode* parent,
624  uint32_t options,
625  uint32_t controlOptions,
626  uint32_t wpOptions,
627  bool hasOldStatus,
628  bool hasCmTm,
629  bool hasCmCt);
630 
631 LIB61850_API DataObject*
632 CDC_ALM_create(const char* dataObjectName, ModelNode* parent,
633  uint32_t options,
634  uint32_t controlOptions,
635  uint32_t wpOptions,
636  bool hasOldStatus);
637 
638 LIB61850_API DataObject*
639 CDC_CTE_create(const char* dataObjectName, ModelNode* parent,
640  uint32_t options,
641  uint32_t controlOptions,
642  uint32_t wpOptions,
643  bool hasHisRs);
644 
645 LIB61850_API DataObject*
646 CDC_TMS_create(const char* dataObjectName, ModelNode* parent,
647  uint32_t options,
648  uint32_t controlOptions,
649  uint32_t wpOptions,
650  bool hasHisRs);
651 
656 #ifdef __cplusplus
657 }
658 #endif
659 
660 #endif /* CDC_H_ */
LIB61850_API DataObject * CDC_ACD_create(const char *dataObjectName, ModelNode *parent, uint32_t options)
Directional protection activation information (ACD)
LIB61850_API DataObject * CDC_ASG_create(const char *dataObjectName, ModelNode *parent, uint32_t options, bool isIntegerNotFloat)
Analogue Setting (ASG)
LIB61850_API DataObject * CDC_BSC_create(const char *dataObjectName, ModelNode *parent, uint32_t options, uint32_t controlOptions, bool hasTransientIndicator)
Controllable enumerated status (ENC)
LIB61850_API DataObject * CDC_ISC_create(const char *dataObjectName, ModelNode *parent, uint32_t options, uint32_t controlOptions, bool hasTransientIndicator)
Integer controlled step position information (ISC)
LIB61850_API DataObject * CDC_VSG_create(const char *dataObjectName, ModelNode *parent, uint32_t options)
Visible string setting (VSG)
LIB61850_API DataObject * CDC_HST_create(const char *dataObjectName, ModelNode *parent, uint32_t options, uint16_t maxPts)
LIB61850_API DataObject * CDC_ALM_create(const char *dataObjectName, ModelNode *parent, uint32_t options, uint32_t controlOptions, uint32_t wpOptions, bool hasOldStatus)
LIB61850_API DataAttribute * CDA_OperBoolean(ModelNode *parent, bool isTImeActivated)
LIB61850_API DataAttribute * CAC_Unit_create(const char *name, ModelNode *parent, bool hasMagnitude)
LIB61850_API DataObject * CDC_SPV_create(const char *dataObjectName, ModelNode *parent, uint32_t options, uint32_t controlOptions, uint32_t wpOptions, bool hasChaManRs)
LIB61850_API DataObject * CDC_DPS_create(const char *dataObjectName, ModelNode *parent, uint32_t options)
LIB61850_API DataObject * CDC_VSS_create(const char *dataObjectName, ModelNode *parent, uint32_t options)
LIB61850_API DataObject * CDC_SEC_create(const char *dataObjectName, ModelNode *parent, uint32_t options)
create a new SEC (Security violation) CDC instance (data object)
LIB61850_API DataObject * CDC_SAV_create(const char *dataObjectName, ModelNode *parent, uint32_t options, bool isIntegerNotFloat)
create a new SAV (Sampled analog value) CDC instance (data object)
LIB61850_API DataObject * CDC_SPC_create(const char *dataObjectName, ModelNode *parent, uint32_t options, uint32_t controlOptions)
Controllable single point (SPC)
LIB61850_API DataObject * CDC_TMS_create(const char *dataObjectName, ModelNode *parent, uint32_t options, uint32_t controlOptions, uint32_t wpOptions, bool hasHisRs)
LIB61850_API DataObject * CDC_APC_create(const char *dataObjectName, ModelNode *parent, uint32_t options, uint32_t controlOptions, bool isIntegerNotFloat)
Controllable analogue process value (APC)
LIB61850_API DataObject * CDC_WYE_create(const char *dataObjectName, ModelNode *parent, uint32_t options)
Phase to ground/neutral related measured values of a three-phase system (WYE)
LIB61850_API DataObject * CDC_ENC_create(const char *dataObjectName, ModelNode *parent, uint32_t options, uint32_t controlOptions)
Controllable enumerated status (ENC)
LIB61850_API DataObject * CDC_SPG_create(const char *dataObjectName, ModelNode *parent, uint32_t options)
Single point setting (SPG)
LIB61850_API DataObject * CDC_LPL_create(const char *dataObjectName, ModelNode *parent, uint32_t options)
create a new LPL (Logical node name plate) CDC instance (data object)
LIB61850_API DataObject * CDC_DPL_create(const char *dataObjectName, ModelNode *parent, uint32_t options)
create a new DPL (Device name plate) CDC instance (data object)
LIB61850_API DataObject * CDC_ING_create(const char *dataObjectName, ModelNode *parent, uint32_t options)
Integer status setting (ING)
LIB61850_API DataAttribute * CAC_ScaledValueConfig_create(const char *name, ModelNode *parent)
LIB61850_API DataObject * CDC_CTE_create(const char *dataObjectName, ModelNode *parent, uint32_t options, uint32_t controlOptions, uint32_t wpOptions, bool hasHisRs)
LIB61850_API DataAttribute * CAC_ValWithTrans_create(const char *name, ModelNode *parent, FunctionalConstraint fc, uint8_t triggerOptions, bool hasTransientIndicator)
create a ValWithTrans constructed data attribute
LIB61850_API DataObject * CDC_INC_create(const char *dataObjectName, ModelNode *parent, uint32_t options, uint32_t controlOptions)
Controllable integer status (INC)
LIB61850_API DataObject * CDC_DPC_create(const char *dataObjectName, ModelNode *parent, uint32_t options, uint32_t controlOptions)
Controllable double point (DPC)
LIB61850_API DataObject * CDC_BCR_create(const char *dataObjectName, ModelNode *parent, uint32_t options)
LIB61850_API DataObject * CDC_CMV_create(const char *dataObjectName, ModelNode *parent, uint32_t options)
LIB61850_API DataObject * CDC_DEL_create(const char *dataObjectName, ModelNode *parent, uint32_t options)
Phase to phase related measured values of a three-phase system (DEL)
LIB61850_API DataObject * CDC_INS_create(const char *dataObjectName, ModelNode *parent, uint32_t options)
LIB61850_API DataObject * CDC_ACT_create(const char *dataObjectName, ModelNode *parent, uint32_t options)
Protection activation information (ACT)
LIB61850_API DataAttribute * CAC_Vector_create(const char *name, ModelNode *parent, uint32_t options, FunctionalConstraint fc, uint8_t triggerOptions)
LIB61850_API DataAttribute * CAC_AnalogueValue_create(const char *name, ModelNode *parent, FunctionalConstraint fc, uint8_t triggerOptions, bool isIntegerNotFloat)
LIB61850_API DataObject * CDC_MV_create(const char *dataObjectName, ModelNode *parent, uint32_t options, bool isIntegerNotFloat)
create a new MV (Measured value) CDC instance (data object)
LIB61850_API DataObject * CDC_STV_create(const char *dataObjectName, ModelNode *parent, uint32_t options, uint32_t controlOptions, uint32_t wpOptions, bool hasOldStatus)
LIB61850_API DataObject * CDC_ENG_create(const char *dataObjectName, ModelNode *parent, uint32_t options)
Enumerated status setting (ENG)
LIB61850_API DataObject * CDC_BAC_create(const char *dataObjectName, ModelNode *parent, uint32_t options, uint32_t controlOptions, bool isIntegerNotFloat)
Binary controlled ananlogue process value (BAC)
LIB61850_API DataObject * CDC_SPS_create(const char *dataObjectName, ModelNode *parent, uint32_t options)
LIB61850_API DataObject * CDC_ENS_create(const char *dataObjectName, ModelNode *parent, uint32_t options)
LIB61850_API DataObject * CDC_CMD_create(const char *dataObjectName, ModelNode *parent, uint32_t options, uint32_t controlOptions, uint32_t wpOptions, bool hasOldStatus, bool hasCmTm, bool hasCmCt)
LIB61850_API DataAttribute * CAC_Point_create(const char *name, ModelNode *parent, FunctionalConstraint fc, uint8_t triggerOptions, bool hasZVal)
FunctionalConstraint
Definition: iec61850_common.h:260