libiec61850
1.2.0
|
Functions | |
IedModel * | IedModel_create (const char *name) |
create a new IedModel instance More... | |
void | IedModel_setIedNameForDynamicModel (IedModel *self, const char *name) |
Set the name of the IED (use only for dynamic model!) More... | |
void | IedModel_destroy (IedModel *model) |
destroy a dynamically created data model More... | |
LogicalDevice * | LogicalDevice_create (const char *name, IedModel *parent) |
Create a new logical device model and add it to the IED model. More... | |
LogicalNode * | LogicalNode_create (const char *name, LogicalDevice *parent) |
Create a new logical mode and add it to a logical device. More... | |
DataObject * | DataObject_create (const char *name, ModelNode *parent, int arrayElements) |
create a new data object and add it to a parent model node More... | |
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 More... | |
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) More... | |
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) More... | |
Log * | Log_create (const char *name, LogicalNode *parent) |
create a log (used by the IEC 61850 log service) More... | |
SettingGroupControlBlock * | SettingGroupControlBlock_create (LogicalNode *parent, uint8_t actSG, uint8_t numOfSGs) |
create a setting group control block (SGCB) More... | |
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) More... | |
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) More... | |
void | SVControlBlock_addPhyComAddress (SVControlBlock *self, PhyComAddress *phyComAddress) |
void | GSEControlBlock_addPhyComAddress (GSEControlBlock *self, PhyComAddress *phyComAddress) |
PhyComAddress * | PhyComAddress_create (uint8_t vlanPriority, uint16_t vlanId, uint16_t appId, uint8_t dstAddress[]) |
create a PhyComAddress object More... | |
DataSet * | DataSet_create (const char *name, LogicalNode *parent) |
create a new data set More... | |
int | DataSet_getSize (DataSet *self) |
returns the number of elements (entries) of the data set More... | |
DataSetEntry * | DataSet_getFirstEntry (DataSet *self) |
DataSetEntry * | DataSetEntry_getNext (DataSetEntry *self) |
DataSetEntry * | DataSetEntry_create (DataSet *dataSet, const char *variable, int index, const char *component) |
create a new data set entry (FCDA) More... | |
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
The parent model node has to be of type LogicalNode or DataObject
name | the name of the data attribute (e.g. "stVal") |
parent | the parent model node |
type | the type of the data attribute (CONSTRUCTED if the type contains sub data attributes) |
fc | the functional constraint (FC) of the data attribte |
triggerOptions | the trigger options (dupd, dchg, qchg) that cause an event notification |
arrayElements | the number of array elements if the data attribute is an array or 0 |
sAddr | an optional short address |
DataObject* DataObject_create | ( | const char * | name, |
ModelNode * | parent, | ||
int | arrayElements | ||
) |
create a new data object and add it to a parent model node
The parent model node has to be of type DataObject or LogicalNode.
name | the name of the data object (e.h. "Mod", "Health" ...) |
parent | the parent model node |
arrayElements | the number of array elements if the data object is an array or 0 |
DataSet* DataSet_create | ( | const char * | name, |
LogicalNode * | parent | ||
) |
create a new data set
name | the name of the data set |
parent | the logical node that hosts the data set (typically a LLN0) |
DataSetEntry* DataSet_getFirstEntry | ( | DataSet * | self | ) |
int DataSet_getSize | ( | DataSet * | self | ) |
returns the number of elements (entries) of the data set
self | the instance of the data set |
DataSetEntry* DataSetEntry_create | ( | DataSet * | dataSet, |
const char * | variable, | ||
int | index, | ||
const char * | component | ||
) |
create a new data set entry (FCDA)
Create a new FCDA reference and add it to the given data set as a new data set member.
Note: Be aware that data set entries are not IEC 61850 object reference but MMS variable names that have to contain the LN name, the FC and subsequent path elements separated by "$" instead of ".". This is due to efficiency reasons to avoid the creation of additional strings.
If the variable parameter does not contain a logical device name (separated from the remaining variable name by the "/" character) the logical device where the data set resides is used automatically.
dataSet | the data set to which the new entry will be added |
variable | the name of the variable as MMS variable name including FC ("$" used as separator!) |
index | the index if the FCDA is an array element, otherwise -1 |
component | the name of the component of the variable if the FCDA is a sub element of an array element. If this is not the case then NULL should be given here. |
DataSetEntry* DataSetEntry_getNext | ( | DataSetEntry * | self | ) |
void GSEControlBlock_addPhyComAddress | ( | GSEControlBlock * | self, |
PhyComAddress * | phyComAddress | ||
) |
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)
Create a new GOOSE control block (GoCB) and add it to the given logical node (LN)
name | name of the GoCB relative to the parent LN |
parent | the parent LN |
appId | the application ID of the GoCB |
dataSet | the data set reference to be used by the GoCB |
confRev | the configuration revision |
fixedOffs | indicates if GOOSE publisher shall use fixed offsets (NOT YET SUPPORTED) |
minTime | minimum GOOSE retransmission time (-1 if not specified - uses stack default then) |
maxTime | GOOSE retransmission time in stable state (-1 if not specified - uses stack default then) |
IedModel* IedModel_create | ( | const char * | name | ) |
create a new IedModel instance
The IedModel object is the root node of an IEC 61850 service data model.
name | the name of the IedModel or NULL (optional - NOT YET USED) |
void IedModel_destroy | ( | IedModel * | model | ) |
destroy a dynamically created data model
This function will free all the memory allocated for the data model.
NOTE: Do not use this function when using a static data model (static_model.c create by static model generator).
model | the model instance to destroy |
void IedModel_setIedNameForDynamicModel | ( | IedModel * | self, |
const char * | name | ||
) |
Set the name of the IED (use only for dynamic model!)
This will change the default name (usualy "TEMPLATE") to a user configured values. NOTE: This function has to be called before IedServer_create ! NOTE: For dynamic model (and configuration file date model) this function has to be used instead of IedModel_setIedName.
model | the IedModel instance |
the | name of the configured IED |
Log* Log_create | ( | const char * | name, |
LogicalNode * | parent | ||
) |
create a log (used by the IEC 61850 log service)
name | name of the LOG relative to the parent LN |
parent | the parent LN |
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)
Create a new log control block (LCB) and add it to the given logical node (LN).
name | name of the LCB relative to the parent LN |
parent | the parent LN. |
dataSetName | name (object reference) of the default data set or NULL if no data set is set by default |
logRef | name (object reference) of the default log or NULL if no log is set by default. THe LDname doesn't contain the IED name! |
trgOps | the trigger options supported by this LCB (bit set) |
intgPd | integrity period in milliseconds |
logEna | if true the log will be enabled by default, false otherwise |
reasonCode | if true the reasonCode will be included in the log (this is always true in MMS mapping) |
LogicalDevice* LogicalDevice_create | ( | const char * | name, |
IedModel * | parent | ||
) |
Create a new logical device model and add it to the IED model.
name | the name of the new logical device |
parent | the parent IED model |
LogicalNode* LogicalNode_create | ( | const char * | name, |
LogicalDevice * | parent | ||
) |
Create a new logical mode and add it to a logical device.
name | the name of the new logical node |
parent | the parent logical device |
PhyComAddress* PhyComAddress_create | ( | uint8_t | vlanPriority, |
uint16_t | vlanId, | ||
uint16_t | appId, | ||
uint8_t | dstAddress[] | ||
) |
create a PhyComAddress object
A PhyComAddress object contains all required addressing information for a GOOSE publisher.
vlanPriority | the priority field of the VLAN tag |
vlanId | the ID field of the VLAN tag |
appId | the application identifier |
dstAddress | the 6 byte multicast MAC address to specify the destination |
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)
Create a new report control block (RCB) and add it to the given logical node (LN).
name | name of the RCB relative to the parent LN |
parent | the parent LN. |
rptId | of the report. If NULL the default report ID (object reference) is used. |
isBuffered | true for a buffered RCB - false for unbuffered RCB |
dataSetName | name (object reference) of the default data set or NULL if no data set is set by default |
confRef | the configuration revision |
trgOps | the trigger options supported by this RCB (bit set) |
options | the inclusion options. Specifies what elements are included in a report (bit set) |
bufTm | the buffering time of the RCB in milliseconds (time between the first event and the preparation of the report). |
intgPd | integrity period in milliseconds |
SettingGroupControlBlock* SettingGroupControlBlock_create | ( | LogicalNode * | parent, |
uint8_t | actSG, | ||
uint8_t | numOfSGs | ||
) |
create a setting group control block (SGCB)
Create a new setting group control block (SGCB) and add it to the given logical node (LN).
parent | the parent LN. |
the | active setting group on server startup (1..N) |
the | number of setting groups (N) |
void SVControlBlock_addPhyComAddress | ( | SVControlBlock * | self, |
PhyComAddress * | phyComAddress | ||
) |
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)
Create a new Sampled Value control block (SvCB) and add it to the given logical node (LN)
name | name of the SvCB relative to the parent LN |
parent | the parent LN |
svID | the application ID of the SvCB |
dataSet | the data set reference to be used by the SVCB |
confRev | the configuration revision |
smpMod | the sampling mode used |
smpRate | the sampling rate used |
optFlds | the optional element configuration |