libiec61850  1.5.3
Functions
Data model access and data update

Functions

LIB61850_API void IedServer_lockDataModel (IedServer self)
 Lock the data model for data update. More...
 
LIB61850_API void IedServer_unlockDataModel (IedServer self)
 Unlock the data model and process pending client requests. More...
 
LIB61850_API MmsValueIedServer_getAttributeValue (IedServer self, DataAttribute *dataAttribute)
 Get data attribute value. More...
 
LIB61850_API bool IedServer_getBooleanAttributeValue (IedServer self, const DataAttribute *dataAttribute)
 Get data attribute value of a boolean data attribute. More...
 
LIB61850_API int32_t IedServer_getInt32AttributeValue (IedServer self, const DataAttribute *dataAttribute)
 Get data attribute value of an integer data attribute. More...
 
LIB61850_API int64_t IedServer_getInt64AttributeValue (IedServer self, const DataAttribute *dataAttribute)
 Get data attribute value of an integer data attribute. More...
 
LIB61850_API uint32_t IedServer_getUInt32AttributeValue (IedServer self, const DataAttribute *dataAttribute)
 Get data attribute value of an unsigned integer data attribute. More...
 
LIB61850_API float IedServer_getFloatAttributeValue (IedServer self, const DataAttribute *dataAttribute)
 Get data attribute value of a floating point data attribute. More...
 
LIB61850_API uint64_t IedServer_getUTCTimeAttributeValue (IedServer self, const DataAttribute *dataAttribute)
 Get data attribute value of a UTC time data attribute. More...
 
LIB61850_API uint32_t IedServer_getBitStringAttributeValue (IedServer self, const DataAttribute *dataAttribute)
 Get data attribute value of a bit string data attribute as integer value. More...
 
LIB61850_API const char * IedServer_getStringAttributeValue (IedServer self, const DataAttribute *dataAttribute)
 Get data attribute value of a string type data attribute. More...
 
LIB61850_API MmsValueIedServer_getFunctionalConstrainedData (IedServer self, DataObject *dataObject, FunctionalConstraint fc)
 Get the MmsValue object related to a functional constrained data object (FCD) More...
 
LIB61850_API void IedServer_updateAttributeValue (IedServer self, DataAttribute *dataAttribute, MmsValue *value)
 Update the MmsValue object of an IEC 61850 data attribute. More...
 
LIB61850_API void IedServer_updateFloatAttributeValue (IedServer self, DataAttribute *dataAttribute, float value)
 Update the value of an IEC 61850 float data attribute. More...
 
LIB61850_API void IedServer_updateInt32AttributeValue (IedServer self, DataAttribute *dataAttribute, int32_t value)
 Update the value of an IEC 61850 integer32 data attribute. More...
 
LIB61850_API void IedServer_updateDbposValue (IedServer self, DataAttribute *dataAttribute, Dbpos value)
 Update the value of an IEC 61850 Dbpos (double point/position) data attribute. More...
 
LIB61850_API void IedServer_updateInt64AttributeValue (IedServer self, DataAttribute *dataAttribute, int64_t value)
 Update the value of an IEC 61850 integer64 data attribute (like BCR actVal) More...
 
LIB61850_API void IedServer_updateUnsignedAttributeValue (IedServer self, DataAttribute *dataAttribute, uint32_t value)
 Update the value of an IEC 61850 unsigned integer data attribute. More...
 
LIB61850_API void IedServer_updateBitStringAttributeValue (IedServer self, DataAttribute *dataAttribute, uint32_t value)
 Update the value of an IEC 61850 bit string data attribute. More...
 
LIB61850_API void IedServer_updateBooleanAttributeValue (IedServer self, DataAttribute *dataAttribute, bool value)
 Update the value of an IEC 61850 boolean data attribute. More...
 
LIB61850_API void IedServer_updateVisibleStringAttributeValue (IedServer self, DataAttribute *dataAttribute, char *value)
 Update the value of an IEC 61850 visible string data attribute. More...
 
LIB61850_API void IedServer_updateUTCTimeAttributeValue (IedServer self, DataAttribute *dataAttribute, uint64_t value)
 Update the value of an IEC 61850 UTC time (timestamp) data attribute. More...
 
LIB61850_API void IedServer_updateTimestampAttributeValue (IedServer self, DataAttribute *dataAttribute, Timestamp *timestamp)
 Update the value of an IEC 61850 UTC time (timestamp) data attribute. More...
 
LIB61850_API void IedServer_updateQuality (IedServer self, DataAttribute *dataAttribute, Quality quality)
 Update a quality ("q") IEC 61850 data attribute. More...
 

Detailed Description

Function Documentation

◆ IedServer_getAttributeValue()

LIB61850_API MmsValue* IedServer_getAttributeValue ( IedServer  self,
DataAttribute *  dataAttribute 
)

Get data attribute value.

Get the MmsValue object of an MMS Named Variable that is part of the device model. You should not manipulate the received object directly. Instead you should use the IedServer_updateValue method.

Parameters
selfthe instance of IedServer to operate on.
dataAttributethe data attribute handle
Returns
MmsValue object of the MMS Named Variable or NULL if the value does not exist.

◆ IedServer_getBitStringAttributeValue()

LIB61850_API uint32_t IedServer_getBitStringAttributeValue ( IedServer  self,
const DataAttribute *  dataAttribute 
)

Get data attribute value of a bit string data attribute as integer value.

Get the value of a data attribute of type MMS_BIT_STRING. If the data attribute is of a different type the returned value is undefined. NOTE: The returned integer is determined by calculating the according the follwing formula: bit0^0 + bit1^1 + ... + bitn^n It is not specified in the IEC 61850 specifications how a bit string can be interpreted as an integer. Therefore this function has to be used with care.

Parameters
selfthe instance of IedServer to operate on.
dataAttributethe data attribute handle
Returns
the value a 32 bit integer.

◆ IedServer_getBooleanAttributeValue()

LIB61850_API bool IedServer_getBooleanAttributeValue ( IedServer  self,
const DataAttribute *  dataAttribute 
)

Get data attribute value of a boolean data attribute.

Get the value of a data attribute of type MMS_BOOLEAN. If the data attribute is of a different type the returned value is undefined.

Parameters
selfthe instance of IedServer to operate on.
dataAttributethe data attribute handle
Returns
true or false

◆ IedServer_getFloatAttributeValue()

LIB61850_API float IedServer_getFloatAttributeValue ( IedServer  self,
const DataAttribute *  dataAttribute 
)

Get data attribute value of a floating point data attribute.

Get the value of a data attribute of type MMS_FLOAT. If the data attribute is of a different type the returned value is undefined.

Parameters
selfthe instance of IedServer to operate on.
dataAttributethe data attribute handle
Returns
the value as 32 bit float

◆ IedServer_getFunctionalConstrainedData()

LIB61850_API MmsValue* IedServer_getFunctionalConstrainedData ( IedServer  self,
DataObject *  dataObject,
FunctionalConstraint  fc 
)

Get the MmsValue object related to a functional constrained data object (FCD)

Get the MmsValue from the server cache that is associated with the Functional Constrained Data (FCD) object that is specified by the DataObject and the given Function Constraint (FC). Accessing the value will directly influence the values presented by the server. This kind of direct access will also bypass the report notification mechanism (i.e. changes will not cause a report!). Therefore this function should be used with care. It could be useful to access arrays of DataObjects.

Parameters
selfthe instance of IedServer to operate on.
dataObjectthe data object to specify the FCD
fcthe FC to specify the FCD
Returns
MmsValue object cached by the server.

◆ IedServer_getInt32AttributeValue()

LIB61850_API int32_t IedServer_getInt32AttributeValue ( IedServer  self,
const DataAttribute *  dataAttribute 
)

Get data attribute value of an integer data attribute.

Get the value of a data attribute of type MMS_INTEGER. If the data attribute is of a different type the returned value is undefined.

Parameters
selfthe instance of IedServer to operate on.
dataAttributethe data attribute handle
Returns
the value as 32 bit integer

◆ IedServer_getInt64AttributeValue()

LIB61850_API int64_t IedServer_getInt64AttributeValue ( IedServer  self,
const DataAttribute *  dataAttribute 
)

Get data attribute value of an integer data attribute.

Get the value of a data attribute of type MMS_INTEGER. If the data attribute is of a different type the returned value is undefined.

Parameters
selfthe instance of IedServer to operate on.
dataAttributethe data attribute handle
Returns
the value as 64 bit integer

◆ IedServer_getStringAttributeValue()

LIB61850_API const char* IedServer_getStringAttributeValue ( IedServer  self,
const DataAttribute *  dataAttribute 
)

Get data attribute value of a string type data attribute.

Get the value of a data attribute of type MMS_STRING or MMS_VISIBLE_STRING. If the data attribute is of a different type the returned value is undefined.

Parameters
selfthe instance of IedServer to operate on.
dataAttributethe data attribute handle
Returns
the value as a C string (null terminated string)

◆ IedServer_getUInt32AttributeValue()

LIB61850_API uint32_t IedServer_getUInt32AttributeValue ( IedServer  self,
const DataAttribute *  dataAttribute 
)

Get data attribute value of an unsigned integer data attribute.

Get the value of a data attribute of type MMS_UNSIGNED. If the data attribute is of a different type the returned value is undefined.

Parameters
selfthe instance of IedServer to operate on.
dataAttributethe data attribute handle
Returns
the value as 32 bit unsigned integer

◆ IedServer_getUTCTimeAttributeValue()

LIB61850_API uint64_t IedServer_getUTCTimeAttributeValue ( IedServer  self,
const DataAttribute *  dataAttribute 
)

Get data attribute value of a UTC time data attribute.

Get the value of a data attribute of type MMS_UTC_TIME. If the data attribute is of a different type the returned value is undefined.

Parameters
selfthe instance of IedServer to operate on.
dataAttributethe data attribute handle
Returns
the value as 64 bit unsigned integer representing the time in milliseconds since Epoch

◆ IedServer_lockDataModel()

LIB61850_API void IedServer_lockDataModel ( IedServer  self)

Lock the data model for data update.

This function should be called before the data model is updated. After updating the data model the function IedServer_unlockDataModel should be called. Client requests will be postponed until the lock is removed.

NOTE: This method should never be called inside of a library callback function. In the context of a library callback the data model is always already locked! Calling this function inside of a library callback may lead to a deadlock condition.

Parameters
selfthe instance of IedServer to operate on.

◆ IedServer_unlockDataModel()

LIB61850_API void IedServer_unlockDataModel ( IedServer  self)

Unlock the data model and process pending client requests.

NOTE: This method should never be called inside of a library callback function. In the context of a library callback the data model is always already locked!

Parameters
selfthe instance of IedServer to operate on.

◆ IedServer_updateAttributeValue()

LIB61850_API void IedServer_updateAttributeValue ( IedServer  self,
DataAttribute *  dataAttribute,
MmsValue value 
)

Update the MmsValue object of an IEC 61850 data attribute.

The data attribute handle of type DataAttribute* are imported with static_model.h in the case when the static data model is used. You should use this function instead of directly operating on the MmsValue instance that is hold by the MMS server. Otherwise the IEC 61850 server is not aware of the changed value and will e.g. not generate a report.

This function will also check if a trigger condition is satisfied in the case when a report or GOOSE control block is enabled.

Parameters
selfthe instance of IedServer to operate on.
dataAttributethe data attribute handle
valueMmsValue object used to update the value cached by the server.

◆ IedServer_updateBitStringAttributeValue()

LIB61850_API void IedServer_updateBitStringAttributeValue ( IedServer  self,
DataAttribute *  dataAttribute,
uint32_t  value 
)

Update the value of an IEC 61850 bit string data attribute.

Update the value of a bit string data attribute without handling with MmsValue instances.

This function will also check if a trigger condition is satisfied in the case when a report or GOOSE control block is enabled.

Parameters
selfthe instance of IedServer to operate on.
dataAttributethe data attribute handle
valuethe new bit string integer value of the data attribute.

◆ IedServer_updateBooleanAttributeValue()

LIB61850_API void IedServer_updateBooleanAttributeValue ( IedServer  self,
DataAttribute *  dataAttribute,
bool  value 
)

Update the value of an IEC 61850 boolean data attribute.

Update the value of a boolean data attribute without handling with MmsValue instances.

This function will also check if a trigger condition is satisfied in the case when a report or GOOSE control block is enabled.

Parameters
selfthe instance of IedServer to operate on.
dataAttributethe data attribute handle
valuethe new boolean value of the data attribute.

◆ IedServer_updateDbposValue()

LIB61850_API void IedServer_updateDbposValue ( IedServer  self,
DataAttribute *  dataAttribute,
Dbpos  value 
)

Update the value of an IEC 61850 Dbpos (double point/position) data attribute.

Update the value of a integer data attribute without handling with MmsValue instances.

This function will also check if a trigger condition is satisfied in the case when a report or GOOSE control block is enabled.

Parameters
selfthe instance of IedServer to operate on.
dataAttributethe data attribute handle
valuethe new Dbpos value of the data attribute.

◆ IedServer_updateFloatAttributeValue()

LIB61850_API void IedServer_updateFloatAttributeValue ( IedServer  self,
DataAttribute *  dataAttribute,
float  value 
)

Update the value of an IEC 61850 float data attribute.

Update the value of a float data attribute without handling with MmsValue instances.

This function will also check if a trigger condition is satisfied in the case when a report or GOOSE control block is enabled.

Parameters
selfthe instance of IedServer to operate on.
dataAttributethe data attribute handle
valuethe new float value of the data attribute.

◆ IedServer_updateInt32AttributeValue()

LIB61850_API void IedServer_updateInt32AttributeValue ( IedServer  self,
DataAttribute *  dataAttribute,
int32_t  value 
)

Update the value of an IEC 61850 integer32 data attribute.

Update the value of a integer data attribute without handling with MmsValue instances.

This function will also check if a trigger condition is satisfied in the case when a report or GOOSE control block is enabled.

Parameters
selfthe instance of IedServer to operate on.
dataAttributethe data attribute handle
valuethe new integer value of the data attribute.

◆ IedServer_updateInt64AttributeValue()

LIB61850_API void IedServer_updateInt64AttributeValue ( IedServer  self,
DataAttribute *  dataAttribute,
int64_t  value 
)

Update the value of an IEC 61850 integer64 data attribute (like BCR actVal)

Update the value of a integer data attribute without handling with MmsValue instances.

This function will also check if a trigger condition is satisfied in the case when a report or GOOSE control block is enabled.

Parameters
selfthe instance of IedServer to operate on.
dataAttributethe data attribute handle
valuethe new 64 bit integer value of the data attribute.

◆ IedServer_updateQuality()

LIB61850_API void IedServer_updateQuality ( IedServer  self,
DataAttribute *  dataAttribute,
Quality  quality 
)

Update a quality ("q") IEC 61850 data attribute.

This is a specialized function to handle Quality data attributes. It can be used instead of the more generic IedServer_updateAttributeValue function.

This function will also check if the quality change (qchg) trigger condition is satisfied and inform a report control block accordingly.

Parameters
selfthe instance of IedServer to operate on.
dataAttributethe data attribute handle
qualitythe new quality value

◆ IedServer_updateTimestampAttributeValue()

LIB61850_API void IedServer_updateTimestampAttributeValue ( IedServer  self,
DataAttribute *  dataAttribute,
Timestamp timestamp 
)

Update the value of an IEC 61850 UTC time (timestamp) data attribute.

Update the value of a UTC time data attribute without handling MmsValue instances.

This function will also check if a trigger condition is satisfied in the case when a report or GOOSE control block is enabled.

Parameters
selfthe instance of IedServer to operate on.
dataAttributethe data attribute handle
valuethe new UTC time value of the data attribute as a Timestamp

◆ IedServer_updateUnsignedAttributeValue()

LIB61850_API void IedServer_updateUnsignedAttributeValue ( IedServer  self,
DataAttribute *  dataAttribute,
uint32_t  value 
)

Update the value of an IEC 61850 unsigned integer data attribute.

Update the value of a unsigned data attribute without handling with MmsValue instances.

This function will also check if a trigger condition is satisfied in the case when a report or GOOSE control block is enabled.

Parameters
selfthe instance of IedServer to operate on.
dataAttributethe data attribute handle
valuethe new unsigned integer value of the data attribute.

◆ IedServer_updateUTCTimeAttributeValue()

LIB61850_API void IedServer_updateUTCTimeAttributeValue ( IedServer  self,
DataAttribute *  dataAttribute,
uint64_t  value 
)

Update the value of an IEC 61850 UTC time (timestamp) data attribute.

Update the value of a UTC time data attribute without handling MmsValue instances.

This function will also check if a trigger condition is satisfied in the case when a report or GOOSE control block is enabled.

Parameters
selfthe instance of IedServer to operate on.
dataAttributethe data attribute handle
valuethe new UTC time value of the data attribute as a ms timestamp

◆ IedServer_updateVisibleStringAttributeValue()

LIB61850_API void IedServer_updateVisibleStringAttributeValue ( IedServer  self,
DataAttribute *  dataAttribute,
char *  value 
)

Update the value of an IEC 61850 visible string data attribute.

Update the value of a visible string data attribute without handling MmsValue instances.

This function will also check if a trigger condition is satisfied in the case when a report or GOOSE control block is enabled.

Parameters
selfthe instance of IedServer to operate on.
dataAttributethe data attribute handle
valuethe new visible string value of the data attribute.