libiec61850  1.2.0
iec61850_dynamic_model.h
Go to the documentation of this file.
1 /*
2  * dynamic_model.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 DYNAMIC_MODEL_H_
25 #define DYNAMIC_MODEL_H_
26 
27 #include "iec61850_model.h"
28 #include "iec61850_cdc.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 
55 IedModel*
56 IedModel_create(const char* name/*, MemoryAllocator allocator*/);
57 
69 void
70 IedModel_setIedNameForDynamicModel(IedModel* self, const char* name);
71 
81 void
82 IedModel_destroy(IedModel* model);
83 
92 LogicalDevice*
93 LogicalDevice_create(const char* name, IedModel* parent);
94 
95 
104 LogicalNode*
105 LogicalNode_create(const char* name, LogicalDevice* parent);
106 
118 DataObject*
119 DataObject_create(const char* name, ModelNode* parent, int arrayElements);
120 
136 DataAttribute*
137 DataAttribute_create(const char* name, ModelNode* parent, DataAttributeType type, FunctionalConstraint fc,
138  uint8_t triggerOptions, int arrayElements, uint32_t sAddr);
139 
159 ReportControlBlock*
160 ReportControlBlock_create(const char* name, LogicalNode* parent, char* rptId, bool isBuffered, char*
161  dataSetName, uint32_t confRef, uint8_t trgOps, uint8_t options, uint32_t bufTm, uint32_t intgPd);
162 
180 LogControlBlock*
181 LogControlBlock_create(const char* name, LogicalNode* parent, char* dataSetName, char* logRef, uint8_t trgOps,
182  uint32_t intgPd, bool logEna, bool reasonCode);
183 
192 Log*
193 Log_create(const char* name, LogicalNode* parent);
194 
206 SettingGroupControlBlock*
207 SettingGroupControlBlock_create(LogicalNode* parent, uint8_t actSG, uint8_t numOfSGs);
208 
225 GSEControlBlock*
226 GSEControlBlock_create(const char* name, LogicalNode* parent, char* appId, char* dataSet, uint32_t confRev,
227  bool fixedOffs, int minTime, int maxTime);
228 
245 SVControlBlock*
246 SVControlBlock_create(const char* name, LogicalNode* parent, char* svID, char* dataSet, uint32_t confRev, uint8_t smpMod,
247  uint16_t smpRate, uint8_t optFlds, bool isUnicast);
248 
249 void
250 SVControlBlock_addPhyComAddress(SVControlBlock* self, PhyComAddress* phyComAddress);
251 
252 void
253 GSEControlBlock_addPhyComAddress(GSEControlBlock* self, PhyComAddress* phyComAddress);
254 
268 PhyComAddress_create(uint8_t vlanPriority, uint16_t vlanId, uint16_t appId, uint8_t dstAddress[]);
269 
278 DataSet*
279 DataSet_create(const char* name, LogicalNode* parent);
280 
288 int
289 DataSet_getSize(DataSet* self);
290 
292 DataSet_getFirstEntry(DataSet* self);
293 
296 
318 DataSetEntry_create(DataSet* dataSet, const char* variable, int index, const char* component);
319 
324 #ifdef __cplusplus
325 }
326 #endif
327 
328 #endif /* DYNAMIC_MODEL_H_ */
DataObject * DataObject_create(const char *name, ModelNode *parent, int arrayElements)
create a new data object and add it to a parent model node
GSEControlBlock * GSEControlBlock_create(const char *name, LogicalNode *parent, char *appId, char *dataSet, uint32_t confRev, bool fixedOffs, int minTime, int maxTime)
create a new GSE/GOOSE control block (GoCB)
Definition: iec61850_common.h:41
LogicalNode * LogicalNode_create(const char *name, LogicalDevice *parent)
Create a new logical mode and add it to a logical device.
IedModel * IedModel_create(const char *name)
create a new IedModel instance
LogicalDevice * LogicalDevice_create(const char *name, IedModel *parent)
Create a new logical device model and add it to the IED model.
void IedModel_destroy(IedModel *model)
destroy a dynamically created data model
SettingGroupControlBlock * SettingGroupControlBlock_create(LogicalNode *parent, uint8_t actSG, uint8_t numOfSGs)
create a setting group control block (SGCB)
void GSEControlBlock_addPhyComAddress(GSEControlBlock *self, PhyComAddress *phyComAddress)
int DataSet_getSize(DataSet *self)
returns the number of elements (entries) of the data set
PhyComAddress * PhyComAddress_create(uint8_t vlanPriority, uint16_t vlanId, uint16_t appId, uint8_t dstAddress[])
create a PhyComAddress object
Definition: iec61850_model.h:236
SVControlBlock * SVControlBlock_create(const char *name, LogicalNode *parent, char *svID, char *dataSet, uint32_t confRev, uint8_t smpMod, uint16_t smpRate, uint8_t optFlds, bool isUnicast)
create a new Multicast/Unicast Sampled Value (SV) control block (SvCB)
DataAttributeType
Definition: iec61850_model.h:89
void SVControlBlock_addPhyComAddress(SVControlBlock *self, PhyComAddress *phyComAddress)
DataSetEntry * DataSetEntry_getNext(DataSetEntry *self)
ReportControlBlock * ReportControlBlock_create(const char *name, LogicalNode *parent, char *rptId, bool isBuffered, char *dataSetName, uint32_t confRef, uint8_t trgOps, uint8_t options, uint32_t bufTm, uint32_t intgPd)
create a new report control block (RCB)
DataAttribute * DataAttribute_create(const char *name, ModelNode *parent, DataAttributeType type, FunctionalConstraint fc, uint8_t triggerOptions, int arrayElements, uint32_t sAddr)
create a new data attribute and add it to a parent model node
Log * Log_create(const char *name, LogicalNode *parent)
create a log (used by the IEC 61850 log service)
void IedModel_setIedNameForDynamicModel(IedModel *self, const char *name)
Set the name of the IED (use only for dynamic model!)
DataSetEntry * DataSetEntry_create(DataSet *dataSet, const char *variable, int index, const char *component)
create a new data set entry (FCDA)
DataSetEntry * DataSet_getFirstEntry(DataSet *self)
FunctionalConstraint
Definition: iec61850_common.h:202
LogControlBlock * LogControlBlock_create(const char *name, LogicalNode *parent, char *dataSetName, char *logRef, uint8_t trgOps, uint32_t intgPd, bool logEna, bool reasonCode)
create a new log control block (LCB)
DataSet * DataSet_create(const char *name, LogicalNode *parent)
create a new data set