libiec61850
1.6.0
|
Functions and structures to access and iterate the IEC 61850 data model. More...
Data Structures | |
struct | IedModel |
Root node of the IEC 61850 data model. This is usually created by the model generator tool (genmodel.jar) More... | |
struct | LogicalDevice |
IEC 61850 data model element of type logical device. More... | |
struct | ModelNode |
abstract base type for IEC 61850 data model nodes More... | |
struct | LogicalNode |
IEC 61850 data model element of type logical node. More... | |
struct | DataObject |
IEC 61850 data model element of type data object. More... | |
struct | DataAttribute |
IEC 61850 data model element of type data attribute. More... | |
struct | DataSetEntry |
struct | DataSet |
struct | ReportControlBlock |
struct | LogControlBlock |
struct | Log |
struct | SettingGroupControlBlock |
IEC 61850 data model of setting group control block (SGCB) More... | |
struct | GSEControlBlock |
struct | SVControlBlock |
Functions | |
LIB61850_API int | ModelNode_getChildCount (ModelNode *self) |
get the number of direct children of a model node More... | |
LIB61850_API ModelNode * | ModelNode_getChild (ModelNode *self, const char *name) |
return a child model node More... | |
LIB61850_API ModelNode * | ModelNode_getChildWithIdx (ModelNode *self, int idx) |
return the child node of an array or other structure More... | |
LIB61850_API ModelNode * | ModelNode_getChildWithFc (ModelNode *self, const char *name, FunctionalConstraint fc) |
return a child model node with a given functional constraint More... | |
LIB61850_API char * | ModelNode_getObjectReference (ModelNode *self, char *objectReference) |
Return the IEC 61850 object reference of a model node. More... | |
LIB61850_API char * | ModelNode_getObjectReferenceEx (ModelNode *node, char *objectReference, bool withoutIedName) |
Return the IEC 61850 object reference of a model node. More... | |
LIB61850_API ModelNodeType | ModelNode_getType (ModelNode *self) |
Get the type of the ModelNode. More... | |
LIB61850_API const char * | ModelNode_getName (ModelNode *self) |
Get the name of the ModelNode. More... | |
LIB61850_API ModelNode * | ModelNode_getParent (ModelNode *self) |
Get the parent ModelNode of this ModelNode instance. More... | |
LIB61850_API LinkedList | ModelNode_getChildren (ModelNode *self) |
Get the list of direct child nodes. More... | |
LIB61850_API void | IedModel_setIedName (IedModel *self, const char *iedName) |
Set the name of the IED. More... | |
LIB61850_API ModelNode * | IedModel_getModelNodeByObjectReference (IedModel *self, const char *objectReference) |
Lookup a model node by its object reference. More... | |
LIB61850_API SVControlBlock * | IedModel_getSVControlBlock (IedModel *self, LogicalNode *parentLN, const char *svcbName) |
LIB61850_API ModelNode * | IedModel_getModelNodeByShortObjectReference (IedModel *self, const char *objectReference) |
Lookup a model node by its short (normalized) reference. More... | |
LIB61850_API ModelNode * | IedModel_getModelNodeByShortAddress (IedModel *self, uint32_t shortAddress) |
Lookup a model node by its short address. More... | |
LIB61850_API LogicalDevice * | IedModel_getDeviceByInst (IedModel *self, const char *ldInst) |
Lookup logical device (LD) by device instance name (SCL attribute "inst") More... | |
LIB61850_API LogicalDevice * | IedModel_getDeviceByIndex (IedModel *self, int index) |
Lookup logical device (LD) instance by index. More... | |
LIB61850_API LogicalNode * | LogicalDevice_getLogicalNode (LogicalDevice *self, const char *lnName) |
Lookup a logical node by name that is part of the given logical device. More... | |
LIB61850_API SettingGroupControlBlock * | LogicalDevice_getSettingGroupControlBlock (LogicalDevice *self) |
Get the setting group control block (SGCB) of the logical device. More... | |
Functions and structures to access and iterate the IEC 61850 data model.
enum DataAttributeType |
enum ModelNodeType |
LIB61850_API LogicalDevice* IedModel_getDeviceByIndex | ( | IedModel * | self, |
int | index | ||
) |
Lookup logical device (LD) instance by index.
self | IedModel instance |
index | the index of the LD in the range (0 .. number of LDs - 1) |
LIB61850_API LogicalDevice* IedModel_getDeviceByInst | ( | IedModel * | self, |
const char * | ldInst | ||
) |
Lookup logical device (LD) by device instance name (SCL attribute "inst")
self | IedModel instance |
ldInst | the logical device instance name (SCL attribute "inst") |
LIB61850_API ModelNode* IedModel_getModelNodeByObjectReference | ( | IedModel * | self, |
const char * | objectReference | ||
) |
Lookup a model node by its object reference.
This function uses the full logical device name as part of the object reference as it happens to appear on the wire. E.g. if IED name in SCL file would be "IED1" and the logical device "WD1" the resulting LD name would be "IED1WD". When using functional naming in the LD (with ldName attribute) then the logical device name is identical with the ldName attribute.
self | the IedModel instance that holds the model node |
objectReference | the IEC 61850 object reference |
LIB61850_API ModelNode* IedModel_getModelNodeByShortAddress | ( | IedModel * | self, |
uint32_t | shortAddress | ||
) |
Lookup a model node by its short address.
Short address is a 32 bit unsigned integer as specified in the "sAddr" attribute of the ICD file or in the configuration file.
self | the IedModel instance that holds the model node |
shortAddress |
LIB61850_API ModelNode* IedModel_getModelNodeByShortObjectReference | ( | IedModel * | self, |
const char * | objectReference | ||
) |
Lookup a model node by its short (normalized) reference.
This version uses the object reference that does not contain the IED name or functional name as part of the logical device name. Instead the LD part consists of the LD instance name ("inst" attribute). This function is useful for devices where the IED name can be configured.
self | the IedModel instance that holds the model node |
objectReference | the IEC 61850 object reference |
LIB61850_API SVControlBlock* IedModel_getSVControlBlock | ( | IedModel * | self, |
LogicalNode * | parentLN, | ||
const char * | svcbName | ||
) |
LIB61850_API void IedModel_setIedName | ( | IedModel * | self, |
const char * | iedName | ||
) |
Set the name of the IED.
This will change the default name (usualy "TEMPLATE") to a user configured values. NOTE: This function has to be called before IedServer_create !
model | the IedModel instance |
the | name of the configured IED |
LIB61850_API LogicalNode* LogicalDevice_getLogicalNode | ( | LogicalDevice * | self, |
const char * | lnName | ||
) |
Lookup a logical node by name that is part of the given logical device.
device | the logical device instance |
lnName | the logical node name |
LIB61850_API SettingGroupControlBlock* LogicalDevice_getSettingGroupControlBlock | ( | LogicalDevice * | self | ) |
Get the setting group control block (SGCB) of the logical device.
device | the logical device instance |
LIB61850_API ModelNode* ModelNode_getChild | ( | ModelNode * | self, |
const char * | name | ||
) |
return a child model node
self | the model node instance |
name | the name of the child model node |
LIB61850_API int ModelNode_getChildCount | ( | ModelNode * | self | ) |
get the number of direct children of a model node
self | the model node instance |
LIB61850_API LinkedList ModelNode_getChildren | ( | ModelNode * | self | ) |
Get the list of direct child nodes.
self | the ModelNode instance |
LIB61850_API ModelNode* ModelNode_getChildWithFc | ( | ModelNode * | self, |
const char * | name, | ||
FunctionalConstraint | fc | ||
) |
return a child model node with a given functional constraint
Sometimes the name is not enough to identify a model node. This is the case when editable setting groups are used. In this case the setting group members have two different model nodes associated that differ in their FC (SG and SE).
self | the model node instance |
name | the name of the child model node |
fc | the functional constraint of the model node |
LIB61850_API ModelNode* ModelNode_getChildWithIdx | ( | ModelNode * | self, |
int | idx | ||
) |
return the child node of an array or other structure
self | the model node instance |
idx | the index (e.g. array index) starting with 0 |
LIB61850_API const char* ModelNode_getName | ( | ModelNode * | self | ) |
Get the name of the ModelNode.
self | the ModelNode instance |
LIB61850_API char* ModelNode_getObjectReference | ( | ModelNode * | self, |
char * | objectReference | ||
) |
Return the IEC 61850 object reference of a model node.
self | the model node instance |
objectReference | pointer to a buffer where to write the object reference string. If NULL is given the buffer is allocated by the function. |
LIB61850_API char* ModelNode_getObjectReferenceEx | ( | ModelNode * | node, |
char * | objectReference, | ||
bool | withoutIedName | ||
) |
Return the IEC 61850 object reference of a model node.
self | the model node instance |
objectReference | pointer to a buffer where to write the object reference string. If NULL is given the buffer is allocated by the function. |
withoutIedName | create object reference without IED name part |
LIB61850_API ModelNode* ModelNode_getParent | ( | ModelNode * | self | ) |
Get the parent ModelNode of this ModelNode instance.
self | the ModelNode instance |
LIB61850_API ModelNodeType ModelNode_getType | ( | ModelNode * | self | ) |
Get the type of the ModelNode.
self | the ModelNode instance |