libiec61850  1.6.0
Data Structures | Macros | Functions
Server configuration related functions

Functions to handle server independent configuration settings to define services, features, and other behavior of IEC 61850 server instances. More...

Data Structures

struct  IedServerConfig
 Configuration object to configure IEC 61850 stack features. More...
 

Macros

#define IEC61850_REPORTSETTINGS_RPT_ID   1
 
#define IEC61850_REPORTSETTINGS_BUF_TIME   2
 
#define IEC61850_REPORTSETTINGS_DATSET   4
 
#define IEC61850_REPORTSETTINGS_TRG_OPS   8
 
#define IEC61850_REPORTSETTINGS_OPT_FIELDS   16
 
#define IEC61850_REPORTSETTINGS_INTG_PD   32
 

Functions

LIB61850_API IedServerConfig IedServerConfig_create (void)
 Create a new configuration object. More...
 
LIB61850_API void IedServerConfig_destroy (IedServerConfig self)
 Destroy the configuration object. More...
 
LIB61850_API void IedServerConfig_setEdition (IedServerConfig self, uint8_t edition)
 Set the IEC 61850 standard edition to use (default is edition 2) More...
 
LIB61850_API uint8_t IedServerConfig_getEdition (IedServerConfig self)
 Get the configued IEC 61850 standard edition. More...
 
LIB61850_API void IedServerConfig_setReportBufferSize (IedServerConfig self, int reportBufferSize)
 Set the report buffer size for buffered reporting. More...
 
LIB61850_API int IedServerConfig_getReportBufferSize (IedServerConfig self)
 Gets the report buffer size for buffered reporting. More...
 
LIB61850_API void IedServerConfig_setReportBufferSizeForURCBs (IedServerConfig self, int reportBufferSize)
 Set the report buffer size for unbuffered reporting. More...
 
LIB61850_API int IedServerConfig_getReportBufferSizeForURCBs (IedServerConfig self)
 Gets the report buffer size for unbuffered reporting. More...
 
LIB61850_API void IedServerConfig_setMaxMmsConnections (IedServerConfig self, int maxConnections)
 Set the maximum number of MMS (TCP) connections the server accepts. More...
 
LIB61850_API int IedServerConfig_getMaxMmsConnections (IedServerConfig self)
 Get the maximum number of MMS (TCP) connections the server accepts. More...
 
LIB61850_API void IedServerConfig_setSyncIntegrityReportTimes (IedServerConfig self, bool enable)
 Enable synchronized integrity report times. More...
 
LIB61850_API bool IedServerConfig_getSyncIntegrityReportTimes (IedServerConfig self)
 Check if synchronized integrity report times are enabled. More...
 
LIB61850_API void IedServerConfig_setFileServiceBasePath (IedServerConfig self, const char *basepath)
 Set the basepath of the file services. More...
 
LIB61850_API const char * IedServerConfig_getFileServiceBasePath (IedServerConfig self)
 Get the basepath of the file services. More...
 
LIB61850_API void IedServerConfig_enableFileService (IedServerConfig self, bool enable)
 Enable/disable the MMS file service support. More...
 
LIB61850_API bool IedServerConfig_isFileServiceEnabled (IedServerConfig self)
 Is the MMS file service enabled or disabled. More...
 
LIB61850_API void IedServerConfig_enableDynamicDataSetService (IedServerConfig self, bool enable)
 Enable/disable the dynamic data set service for MMS. More...
 
LIB61850_API bool IedServerConfig_isDynamicDataSetServiceEnabled (IedServerConfig self)
 Is the dynamic data set service for MMS enabled or disabled. More...
 
LIB61850_API void IedServerConfig_setMaxAssociationSpecificDataSets (IedServerConfig self, int maxDataSets)
 Set the maximum allowed number of association specific (non-permanent) data sets. More...
 
LIB61850_API int IedServerConfig_getMaxAssociationSpecificDataSets (IedServerConfig self)
 Get the maximum allowed number of association specific (non-permanent) data sets. More...
 
LIB61850_API void IedServerConfig_setMaxDomainSpecificDataSets (IedServerConfig self, int maxDataSets)
 Set the maximum allowed number of domain specific (permanent) data sets. More...
 
LIB61850_API int IedServerConfig_getMaxDomainSpecificDataSets (IedServerConfig self)
 Get the maximum allowed number of domain specific (permanent) data sets. More...
 
LIB61850_API void IedServerConfig_setMaxDataSetEntries (IedServerConfig self, int maxDataSetEntries)
 Set the maximum number of entries in dynamic data sets. More...
 
LIB61850_API int IedServerConfig_getMaxDatasSetEntries (IedServerConfig self)
 Get the maximum number of entries in dynamic data sets. More...
 
LIB61850_API void IedServerConfig_enableLogService (IedServerConfig self, bool enable)
 Enable/disable the log service for MMS. More...
 
LIB61850_API void IedServerConfig_enableEditSG (IedServerConfig self, bool enable)
 Enable/disable the EditSG service to allow clients to change setting groups (default is enabled) More...
 
LIB61850_API void IedServerConfig_enableResvTmsForSGCB (IedServerConfig self, bool enable)
 Enable/disable the SGCB.ResvTms when EditSG is enabled. More...
 
LIB61850_API void IedServerConfig_enableResvTmsForBRCB (IedServerConfig self, bool enable)
 Enable/disable the presence of BRCB.ResvTms (default value is true) More...
 
LIB61850_API bool IedServerConfig_isResvTmsForBRCBEnabled (IedServerConfig self)
 ResvTms for BRCB enabled (visible) More...
 
LIB61850_API void IedServerConfig_enableOwnerForRCB (IedServerConfig self, bool enable)
 Enable/disable the presence of owner in report control blocks (default value is false);. More...
 
LIB61850_API bool IedServerConfig_isOwnerForRCBEnabled (IedServerConfig self)
 Owner for RCBs enabled (visible) More...
 
LIB61850_API void IedServerConfig_useIntegratedGoosePublisher (IedServerConfig self, bool enable)
 Enable/disable using the integrated GOOSE publisher for configured GoCBs. More...
 
LIB61850_API bool IedServerConfig_isLogServiceEnabled (IedServerConfig self)
 Is the log service for MMS enabled or disabled. More...
 
LIB61850_API void IedServerConfig_setReportSetting (IedServerConfig self, uint8_t setting, bool isDyn)
 Make a configurable report setting writeable or read-only. More...
 
LIB61850_API bool IedServerConfig_getReportSetting (IedServerConfig self, uint8_t setting)
 Check if a configurable report setting is writable or read-only. More...
 

Detailed Description

Functions to handle server independent configuration settings to define services, features, and other behavior of IEC 61850 server instances.

Macro Definition Documentation

◆ IEC61850_REPORTSETTINGS_BUF_TIME

#define IEC61850_REPORTSETTINGS_BUF_TIME   2

◆ IEC61850_REPORTSETTINGS_DATSET

#define IEC61850_REPORTSETTINGS_DATSET   4

◆ IEC61850_REPORTSETTINGS_INTG_PD

#define IEC61850_REPORTSETTINGS_INTG_PD   32

◆ IEC61850_REPORTSETTINGS_OPT_FIELDS

#define IEC61850_REPORTSETTINGS_OPT_FIELDS   16

◆ IEC61850_REPORTSETTINGS_RPT_ID

#define IEC61850_REPORTSETTINGS_RPT_ID   1

◆ IEC61850_REPORTSETTINGS_TRG_OPS

#define IEC61850_REPORTSETTINGS_TRG_OPS   8

Function Documentation

◆ IedServerConfig_create()

LIB61850_API IedServerConfig IedServerConfig_create ( void  )

Create a new configuration object.

Returns
a new configuration object with default configuration values

◆ IedServerConfig_destroy()

LIB61850_API void IedServerConfig_destroy ( IedServerConfig  self)

Destroy the configuration object.

◆ IedServerConfig_enableDynamicDataSetService()

LIB61850_API void IedServerConfig_enableDynamicDataSetService ( IedServerConfig  self,
bool  enable 
)

Enable/disable the dynamic data set service for MMS.

Parameters
[in]enableset true to enable dynamic data set service, otherwise false

◆ IedServerConfig_enableEditSG()

LIB61850_API void IedServerConfig_enableEditSG ( IedServerConfig  self,
bool  enable 
)

Enable/disable the EditSG service to allow clients to change setting groups (default is enabled)

NOTE: When disabled SGCB.ResvTms is not available online and the setting of IedServerConfig_enableResvTmsForSGCB is ignored.

Parameters
[in]enableset true to enable, otherwise false (default value it true)

◆ IedServerConfig_enableFileService()

LIB61850_API void IedServerConfig_enableFileService ( IedServerConfig  self,
bool  enable 
)

Enable/disable the MMS file service support.

Parameters
[in]enableset true to enable the file services, otherwise false

◆ IedServerConfig_enableLogService()

LIB61850_API void IedServerConfig_enableLogService ( IedServerConfig  self,
bool  enable 
)

Enable/disable the log service for MMS.

Parameters
[in]enableset true to enable log service, otherwise false

◆ IedServerConfig_enableOwnerForRCB()

LIB61850_API void IedServerConfig_enableOwnerForRCB ( IedServerConfig  self,
bool  enable 
)

Enable/disable the presence of owner in report control blocks (default value is false);.

Parameters
[in]enableset true to enable, otherwise false

◆ IedServerConfig_enableResvTmsForBRCB()

LIB61850_API void IedServerConfig_enableResvTmsForBRCB ( IedServerConfig  self,
bool  enable 
)

Enable/disable the presence of BRCB.ResvTms (default value is true)

Parameters
[in]enableset true to enable, otherwise false

◆ IedServerConfig_enableResvTmsForSGCB()

LIB61850_API void IedServerConfig_enableResvTmsForSGCB ( IedServerConfig  self,
bool  enable 
)

Enable/disable the SGCB.ResvTms when EditSG is enabled.

NOTE: When EditSG is disabled (see IedServerConfig_enableEditSG) then this setting is ignored.

Parameters
[in]enableset true to enable, otherwise false (default value it true)

◆ IedServerConfig_getEdition()

LIB61850_API uint8_t IedServerConfig_getEdition ( IedServerConfig  self)

Get the configued IEC 61850 standard edition.

Returns
IEC_61850_EDITION_1, IEC_61850_EDITION_2, or IEC_61850_EDITION_2_1

◆ IedServerConfig_getFileServiceBasePath()

LIB61850_API const char* IedServerConfig_getFileServiceBasePath ( IedServerConfig  self)

Get the basepath of the file services.

◆ IedServerConfig_getMaxAssociationSpecificDataSets()

LIB61850_API int IedServerConfig_getMaxAssociationSpecificDataSets ( IedServerConfig  self)

Get the maximum allowed number of association specific (non-permanent) data sets.

Returns
maximum number of allowed data sets.

◆ IedServerConfig_getMaxDatasSetEntries()

LIB61850_API int IedServerConfig_getMaxDatasSetEntries ( IedServerConfig  self)

Get the maximum number of entries in dynamic data sets.

Returns
the maximum number of entries allowed in a data sets

◆ IedServerConfig_getMaxDomainSpecificDataSets()

LIB61850_API int IedServerConfig_getMaxDomainSpecificDataSets ( IedServerConfig  self)

Get the maximum allowed number of domain specific (permanent) data sets.

Returns
maximum number of allowed data sets.

◆ IedServerConfig_getMaxMmsConnections()

LIB61850_API int IedServerConfig_getMaxMmsConnections ( IedServerConfig  self)

Get the maximum number of MMS (TCP) connections the server accepts.

Returns
maximum number of TCP connections

◆ IedServerConfig_getReportBufferSize()

LIB61850_API int IedServerConfig_getReportBufferSize ( IedServerConfig  self)

Gets the report buffer size for buffered reporting.

Returns
the buffer size for each buffered report control block

◆ IedServerConfig_getReportBufferSizeForURCBs()

LIB61850_API int IedServerConfig_getReportBufferSizeForURCBs ( IedServerConfig  self)

Gets the report buffer size for unbuffered reporting.

Returns
the buffer size for each unbuffered report control block

◆ IedServerConfig_getReportSetting()

LIB61850_API bool IedServerConfig_getReportSetting ( IedServerConfig  self,
uint8_t  setting 
)

Check if a configurable report setting is writable or read-only.

Parameters
[in]settingone of IEC61850_REPORTSETTINGS_RPT_ID, _BUF_TIME, _DATSET, _TRG_OPS, _OPT_FIELDS, _INTG_PD
Returns
true, when setting is writable ("Dyn") or false, when read-only

◆ IedServerConfig_getSyncIntegrityReportTimes()

LIB61850_API bool IedServerConfig_getSyncIntegrityReportTimes ( IedServerConfig  self)

Check if synchronized integrity report times are enabled.

NOTE: When this flag is enabled the integrity report generation times are aligned with the UTC epoch. Then the unix time stamps are straight multiples of the integrity interval.

Returns
true, when enabled, false otherwise

◆ IedServerConfig_isDynamicDataSetServiceEnabled()

LIB61850_API bool IedServerConfig_isDynamicDataSetServiceEnabled ( IedServerConfig  self)

Is the dynamic data set service for MMS enabled or disabled.

Returns
true if enabled, false otherwise

◆ IedServerConfig_isFileServiceEnabled()

LIB61850_API bool IedServerConfig_isFileServiceEnabled ( IedServerConfig  self)

Is the MMS file service enabled or disabled.

Returns
true if enabled, false otherwise

◆ IedServerConfig_isLogServiceEnabled()

LIB61850_API bool IedServerConfig_isLogServiceEnabled ( IedServerConfig  self)

Is the log service for MMS enabled or disabled.

Returns
true if enabled, false otherwise

◆ IedServerConfig_isOwnerForRCBEnabled()

LIB61850_API bool IedServerConfig_isOwnerForRCBEnabled ( IedServerConfig  self)

Owner for RCBs enabled (visible)

Returns
true if enabled, false otherwise

◆ IedServerConfig_isResvTmsForBRCBEnabled()

LIB61850_API bool IedServerConfig_isResvTmsForBRCBEnabled ( IedServerConfig  self)

ResvTms for BRCB enabled (visible)

Returns
true if enabled, false otherwise

◆ IedServerConfig_setEdition()

LIB61850_API void IedServerConfig_setEdition ( IedServerConfig  self,
uint8_t  edition 
)

Set the IEC 61850 standard edition to use (default is edition 2)

Parameters
editionIEC_61850_EDITION_1, IEC_61850_EDITION_2, or IEC_61850_EDITION_2_1

◆ IedServerConfig_setFileServiceBasePath()

LIB61850_API void IedServerConfig_setFileServiceBasePath ( IedServerConfig  self,
const char *  basepath 
)

Set the basepath of the file services.

NOTE: the basepath specifies the local directory that is served by MMS file services

Parameters
basepathnew file service base path

◆ IedServerConfig_setMaxAssociationSpecificDataSets()

LIB61850_API void IedServerConfig_setMaxAssociationSpecificDataSets ( IedServerConfig  self,
int  maxDataSets 
)

Set the maximum allowed number of association specific (non-permanent) data sets.

NOTE: This specifies the maximum number of non-permanent data sets per connection. When the connection is closed these data sets are deleted automatically.

Parameters
maxDataSetsmaximum number of allowed data sets.

◆ IedServerConfig_setMaxDataSetEntries()

LIB61850_API void IedServerConfig_setMaxDataSetEntries ( IedServerConfig  self,
int  maxDataSetEntries 
)

Set the maximum number of entries in dynamic data sets.

NOTE: this comprises the base data set entries (can be simple or complex variables). When the client tries to create a data set with more member the request will be rejected and the data set will not be created.

Parameters
maxDataSetEntriesthe maximum number of entries allowed in a data set

◆ IedServerConfig_setMaxDomainSpecificDataSets()

LIB61850_API void IedServerConfig_setMaxDomainSpecificDataSets ( IedServerConfig  self,
int  maxDataSets 
)

Set the maximum allowed number of domain specific (permanent) data sets.

Parameters
maxDataSetsmaximum number of allowed data sets.

◆ IedServerConfig_setMaxMmsConnections()

LIB61850_API void IedServerConfig_setMaxMmsConnections ( IedServerConfig  self,
int  maxConnections 
)

Set the maximum number of MMS (TCP) connections the server accepts.

NOTE: Parameter has to be smaller than CONFIG_MAXIMUM_TCP_CLIENT_CONNECTIONS if CONFIG_MAXIMUM_TCP_CLIENT_CONNECTIONS != -1

Parameters
maxConnectionmaximum number of TCP connections

◆ IedServerConfig_setReportBufferSize()

LIB61850_API void IedServerConfig_setReportBufferSize ( IedServerConfig  self,
int  reportBufferSize 
)

Set the report buffer size for buffered reporting.

Parameters
reportBufferSizethe buffer size for each buffered report control block

◆ IedServerConfig_setReportBufferSizeForURCBs()

LIB61850_API void IedServerConfig_setReportBufferSizeForURCBs ( IedServerConfig  self,
int  reportBufferSize 
)

Set the report buffer size for unbuffered reporting.

Parameters
reportBufferSizethe buffer size for each unbuffered report control block

◆ IedServerConfig_setReportSetting()

LIB61850_API void IedServerConfig_setReportSetting ( IedServerConfig  self,
uint8_t  setting,
bool  isDyn 
)

Make a configurable report setting writeable or read-only.

Note
Can be used to implement some of Services\ReportSettings options
Parameters
[in]settingone of IEC61850_REPORTSETTINGS_RPT_ID, _BUF_TIME, _DATSET, _TRG_OPS, _OPT_FIELDS, _INTG_PD
[in]isDyntrue, when setting is writable ("Dyn") or false, when read-only

◆ IedServerConfig_setSyncIntegrityReportTimes()

LIB61850_API void IedServerConfig_setSyncIntegrityReportTimes ( IedServerConfig  self,
bool  enable 
)

Enable synchronized integrity report times.

NOTE: When this flag is enabled the integrity report generation times are aligned with the UTC epoch. Then the unix time stamps are straight multiples of the integrity interval.

Parameters
enablewhen true synchronized integrity report times are enabled

◆ IedServerConfig_useIntegratedGoosePublisher()

LIB61850_API void IedServerConfig_useIntegratedGoosePublisher ( IedServerConfig  self,
bool  enable 
)

Enable/disable using the integrated GOOSE publisher for configured GoCBs.

This is enabled by default. Disable it when you want to use a separate GOOSE publisher

Parameters
[in]enableset true to enable the integrated GOOSE publisher, otherwise false