libiec61850  1.5.3
Data Structures | Enumerations | Functions
General data model definitions, access and iteration functions

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
 

Enumerations

enum  DataAttributeType {
  IEC61850_UNKNOWN_TYPE = -1 , IEC61850_BOOLEAN = 0 , IEC61850_INT8 = 1 , IEC61850_INT16 = 2 ,
  IEC61850_INT32 = 3 , IEC61850_INT64 = 4 , IEC61850_INT128 = 5 , IEC61850_INT8U = 6 ,
  IEC61850_INT16U = 7 , IEC61850_INT24U = 8 , IEC61850_INT32U = 9 , IEC61850_FLOAT32 = 10 ,
  IEC61850_FLOAT64 = 11 , IEC61850_ENUMERATED = 12 , IEC61850_OCTET_STRING_64 = 13 , IEC61850_OCTET_STRING_6 = 14 ,
  IEC61850_OCTET_STRING_8 = 15 , IEC61850_VISIBLE_STRING_32 = 16 , IEC61850_VISIBLE_STRING_64 = 17 , IEC61850_VISIBLE_STRING_65 = 18 ,
  IEC61850_VISIBLE_STRING_129 = 19 , IEC61850_VISIBLE_STRING_255 = 20 , IEC61850_UNICODE_STRING_255 = 21 , IEC61850_TIMESTAMP = 22 ,
  IEC61850_QUALITY = 23 , IEC61850_CHECK = 24 , IEC61850_CODEDENUM = 25 , IEC61850_GENERIC_BITSTRING = 26 ,
  IEC61850_CONSTRUCTED = 27 , IEC61850_ENTRY_TIME = 28 , IEC61850_PHYCOMADDR = 29 , IEC61850_CURRENCY = 30 ,
  IEC61850_OPTFLDS = 31 , IEC61850_TRGOPS = 32
}
 
enum  ModelNodeType { LogicalDeviceModelType , LogicalNodeModelType , DataObjectModelType , DataAttributeModelType }
 

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_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...
 

Detailed Description

Enumeration Type Documentation

◆ DataAttributeType

Enumerator
IEC61850_UNKNOWN_TYPE 
IEC61850_BOOLEAN 
IEC61850_INT8 
IEC61850_INT16 
IEC61850_INT32 
IEC61850_INT64 
IEC61850_INT128 
IEC61850_INT8U 
IEC61850_INT16U 
IEC61850_INT24U 
IEC61850_INT32U 
IEC61850_FLOAT32 
IEC61850_FLOAT64 
IEC61850_ENUMERATED 
IEC61850_OCTET_STRING_64 
IEC61850_OCTET_STRING_6 
IEC61850_OCTET_STRING_8 
IEC61850_VISIBLE_STRING_32 
IEC61850_VISIBLE_STRING_64 
IEC61850_VISIBLE_STRING_65 
IEC61850_VISIBLE_STRING_129 
IEC61850_VISIBLE_STRING_255 
IEC61850_UNICODE_STRING_255 
IEC61850_TIMESTAMP 
IEC61850_QUALITY 
IEC61850_CHECK 
IEC61850_CODEDENUM 
IEC61850_GENERIC_BITSTRING 
IEC61850_CONSTRUCTED 
IEC61850_ENTRY_TIME 
IEC61850_PHYCOMADDR 
IEC61850_CURRENCY 
IEC61850_OPTFLDS 
IEC61850_TRGOPS 

◆ ModelNodeType

Enumerator
LogicalDeviceModelType 
LogicalNodeModelType 
DataObjectModelType 
DataAttributeModelType 

Function Documentation

◆ IedModel_getDeviceByIndex()

LIB61850_API LogicalDevice* IedModel_getDeviceByIndex ( IedModel *  self,
int  index 
)

Lookup logical device (LD) instance by index.

Parameters
selfIedModel instance
indexthe index of the LD in the range (0 .. number of LDs - 1)
Returns
the corresponding LogicalDevice* object or NULL if the index is out of range

◆ IedModel_getDeviceByInst()

LIB61850_API LogicalDevice* IedModel_getDeviceByInst ( IedModel *  self,
const char *  ldInst 
)

Lookup logical device (LD) by device instance name (SCL attribute "inst")

Parameters
selfIedModel instance
ldInstthe logical device instance name (SCL attribute "inst")
Returns
The matching LogicalDevice instance

◆ IedModel_getModelNodeByObjectReference()

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".

Parameters
selfthe IedModel instance that holds the model node
objectReferencethe IEC 61850 object reference
Returns
the model node instance or NULL if model node does not exist.

◆ IedModel_getModelNodeByShortAddress()

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.

Parameters
selfthe IedModel instance that holds the model node
shortAddress
Returns
the model node instance or NULL if model node does not exist.

◆ IedModel_getModelNodeByShortObjectReference()

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 as part of the logical device name. This function is useful for devices where the IED name can be configured.

Parameters
selfthe IedModel instance that holds the model node
objectReferencethe IEC 61850 object reference
Returns
the model node instance or NULL if model node does not exist.

◆ IedModel_getSVControlBlock()

LIB61850_API SVControlBlock* IedModel_getSVControlBlock ( IedModel *  self,
LogicalNode *  parentLN,
const char *  svcbName 
)

◆ IedModel_setIedName()

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 !

Parameters
modelthe IedModel instance
thename of the configured IED

◆ LogicalDevice_getLogicalNode()

LIB61850_API LogicalNode* LogicalDevice_getLogicalNode ( LogicalDevice *  self,
const char *  lnName 
)

Lookup a logical node by name that is part of the given logical device.

Parameters
devicethe logical device instance
lnNamethe logical node name
Returns
the logical device instance or NULL if it does not exist

◆ LogicalDevice_getSettingGroupControlBlock()

LIB61850_API SettingGroupControlBlock* LogicalDevice_getSettingGroupControlBlock ( LogicalDevice *  self)

Get the setting group control block (SGCB) of the logical device.

Parameters
devicethe logical device instance
Returns
the SGCB instance or NULL if no SGCB is available

◆ ModelNode_getChild()

LIB61850_API ModelNode* ModelNode_getChild ( ModelNode *  self,
const char *  name 
)

return a child model node

Parameters
selfthe model node instance
namethe name of the child model node
Returns
the model node instance or NULL if model node does not exist.

◆ ModelNode_getChildCount()

LIB61850_API int ModelNode_getChildCount ( ModelNode *  self)

get the number of direct children of a model node

Parameters
selfthe model node instance
Returns
the number of children of the model node ΒΈ

◆ ModelNode_getChildren()

LIB61850_API LinkedList ModelNode_getChildren ( ModelNode *  self)

Get the list of direct child nodes.

Parameters
selfthe ModelNode instance
Returns
the list of private child nodes, or NULL when the node has no children

◆ ModelNode_getChildWithFc()

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).

Parameters
selfthe model node instance
namethe name of the child model node
fcthe functional constraint of the model node
Returns
the model node instance or NULL if model node does not exist.

◆ ModelNode_getName()

LIB61850_API const char* ModelNode_getName ( ModelNode *  self)

Get the name of the ModelNode.

Parameters
selfthe ModelNode instance
Returns
the name of the ModelNode

◆ ModelNode_getObjectReference()

LIB61850_API char* ModelNode_getObjectReference ( ModelNode *  self,
char *  objectReference 
)

Return the IEC 61850 object reference of a model node.

Parameters
selfthe model node instance
objectReferencepointer to a buffer where to write the object reference string. If NULL is given the buffer is allocated by the function.
Returns
the object reference string

◆ ModelNode_getObjectReferenceEx()

LIB61850_API char* ModelNode_getObjectReferenceEx ( ModelNode *  node,
char *  objectReference,
bool  withoutIedName 
)

Return the IEC 61850 object reference of a model node.

Parameters
selfthe model node instance
objectReferencepointer to a buffer where to write the object reference string. If NULL is given the buffer is allocated by the function.
withoutIedNamecreate object reference without IED name part
Returns
the object reference string

◆ ModelNode_getParent()

LIB61850_API ModelNode* ModelNode_getParent ( ModelNode *  self)

Get the parent ModelNode of this ModelNode instance.

Parameters
selfthe ModelNode instance
Returns
the parent instance, or NULL when the ModelNode has no parent

◆ ModelNode_getType()

LIB61850_API ModelNodeType ModelNode_getType ( ModelNode *  self)

Get the type of the ModelNode.

Parameters
selfthe ModelNode instance
Returns
the type of the ModelNode (one of LD, LN, DO, DA)