libiec61850  1.6.0
Typedefs | Functions
Client side data set service functions and data types

Typedefs

typedef void(* IedConnection_ReadDataSetHandler) (uint32_t invokeId, void *parameter, IedClientError err, ClientDataSet dataSet)
 
typedef void(* IedConnection_GetDataSetDirectoryHandler) (uint32_t invokeId, void *parameter, IedClientError err, LinkedList dataSetDirectory, bool isDeletable)
 GetDataSetDirectory response or timeout callback. More...
 
typedef void(* IedConnection_WriteDataSetHandler) (uint32_t invokeId, void *parameter, IedClientError err, LinkedList accessResults)
 Callback handler for asynchronous write data set values services (set data set) More...
 

Functions

LIB61850_API ClientDataSet IedConnection_readDataSetValues (IedConnection self, IedClientError *error, const char *dataSetReference, ClientDataSet dataSet)
 get data set values from the server More...
 
LIB61850_API uint32_t IedConnection_readDataSetValuesAsync (IedConnection self, IedClientError *error, const char *dataSetReference, ClientDataSet dataSet, IedConnection_ReadDataSetHandler handler, void *parameter)
 get data set values from the server - async version More...
 
LIB61850_API void IedConnection_createDataSet (IedConnection self, IedClientError *error, const char *dataSetReference, LinkedList dataSetElements)
 create a new data set at the connected server device More...
 
LIB61850_API uint32_t IedConnection_createDataSetAsync (IedConnection self, IedClientError *error, const char *dataSetReference, LinkedList dataSetElements, IedConnection_GenericServiceHandler handler, void *parameter)
 create a new data set at the connected server device More...
 
LIB61850_API bool IedConnection_deleteDataSet (IedConnection self, IedClientError *error, const char *dataSetReference)
 delete a deletable data set at the connected server device More...
 
LIB61850_API uint32_t IedConnection_deleteDataSetAsync (IedConnection self, IedClientError *error, const char *dataSetReference, IedConnection_GenericServiceHandler handler, void *parameter)
 delete a deletable data set at the connected server device - asynchronous version More...
 
LIB61850_API LinkedList IedConnection_getDataSetDirectory (IedConnection self, IedClientError *error, const char *dataSetReference, bool *isDeletable)
 read the data set directory More...
 
LIB61850_API uint32_t IedConnection_getDataSetDirectoryAsync (IedConnection self, IedClientError *error, const char *dataSetReference, IedConnection_GetDataSetDirectoryHandler handler, void *parameter)
 read the data set directory - asynchronous version More...
 
LIB61850_API void IedConnection_writeDataSetValues (IedConnection self, IedClientError *error, const char *dataSetReference, LinkedList values, LinkedList *accessResults)
 Write the data set values to the server. More...
 
LIB61850_API uint32_t IedConnection_writeDataSetValuesAsync (IedConnection self, IedClientError *error, const char *dataSetReference, LinkedList values, IedConnection_WriteDataSetHandler handler, void *parameter)
 Write the data set values to the server - async version. More...
 
LIB61850_API void ClientDataSet_destroy (ClientDataSet self)
 destroy an ClientDataSet instance. Has to be called by the application. More...
 
LIB61850_API MmsValueClientDataSet_getValues (ClientDataSet self)
 get the data set values locally stored in the ClientDataSet instance. More...
 
LIB61850_API char * ClientDataSet_getReference (ClientDataSet self)
 Get the object reference of the data set. More...
 
LIB61850_API int ClientDataSet_getDataSetSize (ClientDataSet self)
 get the size of the data set (number of members) More...
 

Detailed Description

Typedef Documentation

◆ IedConnection_GetDataSetDirectoryHandler

typedef void(* IedConnection_GetDataSetDirectoryHandler) (uint32_t invokeId, void *parameter, IedClientError err, LinkedList dataSetDirectory, bool isDeletable)

GetDataSetDirectory response or timeout callback.

Parameters
dataSetDirectorya linked list containing the object references of FCDs or FCDAs. The format of this object references is LDName/LNodeName.item(arrayIndex)component[FC].
isDeletablethis is an output parameter indicating that the requested data set is deletable by clients.

◆ IedConnection_ReadDataSetHandler

typedef void(* IedConnection_ReadDataSetHandler) (uint32_t invokeId, void *parameter, IedClientError err, ClientDataSet dataSet)

◆ IedConnection_WriteDataSetHandler

typedef void(* IedConnection_WriteDataSetHandler) (uint32_t invokeId, void *parameter, IedClientError err, LinkedList accessResults)

Callback handler for asynchronous write data set values services (set data set)

Parameters
invokeIdthe invoke ID of the service request
parameterused provided parameter
errthe error code if an error occurs
accessResultsthe list of access results for the data set entries.

Function Documentation

◆ ClientDataSet_destroy()

LIB61850_API void ClientDataSet_destroy ( ClientDataSet  self)

destroy an ClientDataSet instance. Has to be called by the application.

Note: A ClientDataSet cannot be created directly by the application but only by the IedConnection_readDataSetValues function. Therefore there is no public ClientDataSet_create function.

Parameters
selfthe ClientDataSet instance

◆ ClientDataSet_getDataSetSize()

LIB61850_API int ClientDataSet_getDataSetSize ( ClientDataSet  self)

get the size of the data set (number of members)

Parameters
selfthe ClientDataSet instance
Returns
the number of member contained in the data set.

◆ ClientDataSet_getReference()

LIB61850_API char* ClientDataSet_getReference ( ClientDataSet  self)

Get the object reference of the data set.

Parameters
selfthe ClientDataSet instance
Returns
the object reference of the data set.

◆ ClientDataSet_getValues()

LIB61850_API MmsValue* ClientDataSet_getValues ( ClientDataSet  self)

get the data set values locally stored in the ClientDataSet instance.

This function returns a pointer to the locally stored MmsValue instance of this ClientDataSet instance. The MmsValue instance is of type MMS_ARRAY and contains one array element for each data set member. Note: This call does not invoke any interaction with the associated server. It will only provide access to already stored value. To update the values with the current values of the server the IecConnection_readDataSetValues function has to be called!

Parameters
selfthe ClientDataSet instance
Returns
the locally stored data set values as MmsValue object of type MMS_ARRAY.

◆ IedConnection_createDataSet()

LIB61850_API void IedConnection_createDataSet ( IedConnection  self,
IedClientError error,
const char *  dataSetReference,
LinkedList  dataSetElements 
)

create a new data set at the connected server device

This function creates a new data set at the server. The parameter dataSetReference is the name of the new data set to create. It is either in the form LDName/LNodeName.dataSetName for permanent domain or VMD scope data sets or @dataSetName for an association specific data set. If the LDName part of the reference is missing the resulting data set will be of VMD scope.

The dataSetElements parameter contains a linked list containing the object references of FCDs or FCDAs. The format of this object references is LDName/LNodeName.item(arrayIndex)component[FC].

Parameters
connectionthe connection object
errorthe error code if an error occurs
dataSetReferenceobject reference of the data set
dataSetElementsa list of object references defining the members of the new data set

◆ IedConnection_createDataSetAsync()

LIB61850_API uint32_t IedConnection_createDataSetAsync ( IedConnection  self,
IedClientError error,
const char *  dataSetReference,
LinkedList  dataSetElements,
IedConnection_GenericServiceHandler  handler,
void *  parameter 
)

create a new data set at the connected server device

This function creates a new data set at the server. The parameter dataSetReference is the name of the new data set to create. It is either in the form LDName/LNodeName.dataSetName for permanent domain or VMD scope data sets or @dataSetName for an association specific data set. If the LDName part of the reference is missing the resulting data set will be of VMD scope.

The dataSetElements parameter contains a linked list containing the object references of FCDs or FCDAs. The format of this object references is LDName/LNodeName.item(arrayIndex)component[FC].

Parameters
connectionthe connection object
errorthe error code if an error occurs
dataSetReferenceobject reference of the data set
dataSetElementsa list of object references defining the members of the new data set
handlerthe callback handler that is called when the response is received or timeout
parameteruser provided parameter that is passed to the callback handler
Returns
the invoke ID of the request

◆ IedConnection_deleteDataSet()

LIB61850_API bool IedConnection_deleteDataSet ( IedConnection  self,
IedClientError error,
const char *  dataSetReference 
)

delete a deletable data set at the connected server device

This function deletes a data set at the server. The parameter dataSetReference is the name of the data set to delete. It is either in the form LDName/LNodeName.dataSetName or @dataSetName for an association specific data set.

Parameters
connectionthe connection object
errorthe error code if an error occurs
dataSetReferenceobject reference of the data set
Returns
true if data set has been deleted, false otherwise

◆ IedConnection_deleteDataSetAsync()

LIB61850_API uint32_t IedConnection_deleteDataSetAsync ( IedConnection  self,
IedClientError error,
const char *  dataSetReference,
IedConnection_GenericServiceHandler  handler,
void *  parameter 
)

delete a deletable data set at the connected server device - asynchronous version

This function deletes a data set at the server. The parameter dataSetReference is the name of the data set to delete. It is either in the form LDName/LNodeName.dataSetName or @dataSetName for an association specific data set.

The data set was deleted successfully when the callback parameter "error" is IED_ERROR_OK. Otherwise the "error" parameter contains a particular error code.

Parameters
connectionthe connection object
errorthe error code if an error occurs
dataSetReferenceobject reference of the data set
handlerthe callback handler that is called when the response is received or timeout
parameteruser provided parameter that is passed to the callback handler
Returns
the invoke ID of the request

◆ IedConnection_getDataSetDirectory()

LIB61850_API LinkedList IedConnection_getDataSetDirectory ( IedConnection  self,
IedClientError error,
const char *  dataSetReference,
bool *  isDeletable 
)

read the data set directory

The return value contains a linked list containing the object references of FCDs or FCDAs. The format of this object references is LDName/LNodeName.item(arrayIndex)component[FC].

Parameters
connectionthe connection object
[out]errorthe error code if an error occurs
dataSetReferenceobject reference of the data set
[out]isDeletablethis is an output parameter indicating that the requested data set is deletable by clients. If this information is not required a NULL pointer can be used.
Returns
LinkedList containing the data set elements as char* strings.

◆ IedConnection_getDataSetDirectoryAsync()

LIB61850_API uint32_t IedConnection_getDataSetDirectoryAsync ( IedConnection  self,
IedClientError error,
const char *  dataSetReference,
IedConnection_GetDataSetDirectoryHandler  handler,
void *  parameter 
)

read the data set directory - asynchronous version

The result data is a linked list containing the object references of FCDs or FCDAs. The format of this object references is LDName/LNodeName.item(arrayIndex)component[FC].

Parameters
connectionthe connection object
[out]errorthe error code if an error occurs
dataSetReferenceobject reference of the data set
handlerthe callback handler that is called when the response is received or timeout
parameteruser provided parameter that is passed to the callback handler
Returns
the invoke ID of the request

◆ IedConnection_readDataSetValues()

LIB61850_API ClientDataSet IedConnection_readDataSetValues ( IedConnection  self,
IedClientError error,
const char *  dataSetReference,
ClientDataSet  dataSet 
)

get data set values from the server

The parameter dataSetReference is the name of the data set to read. It is either in the form LDName/LNodeName.dataSetName for permanent domain or VMD scope data sets or @dataSetName for an association specific data set. If the LDName part of the reference is missing the resulting data set will be of VMD scope. The received data set values are stored in a container object of type ClientDataSet that can be reused in a further read request.

Parameters
connectionthe connection object
errorthe error code if an error occurs
dataSetReferenceobject reference of the data set
dataSeta data set instance where to store the retrieved values or NULL if a new instance shall be created.
Returns
data set instance with retrieved values of NULL if an error occurred.

◆ IedConnection_readDataSetValuesAsync()

LIB61850_API uint32_t IedConnection_readDataSetValuesAsync ( IedConnection  self,
IedClientError error,
const char *  dataSetReference,
ClientDataSet  dataSet,
IedConnection_ReadDataSetHandler  handler,
void *  parameter 
)

get data set values from the server - async version

The parameter dataSetReference is the name of the data set to read. It is either in the form LDName/LNodeName.dataSetName for permanent domain or VMD scope data sets or @dataSetName for an association specific data set. If the LDName part of the reference is missing the resulting data set will be of VMD scope. The received data set values are stored in a container object of type ClientDataSet that can be reused in a further service request.

Parameters
connectionthe connection object
errorthe error code if an error occurs
dataSetReferenceobject reference of the data set
dataSeta data set instance where to store the retrieved values or NULL if a new instance shall be created.
handlerthe user provided callback handler
parameteruser provided parameter that is passed to the callback handler
Returns
the invoke ID of the request

◆ IedConnection_writeDataSetValues()

LIB61850_API void IedConnection_writeDataSetValues ( IedConnection  self,
IedClientError error,
const char *  dataSetReference,
LinkedList  values,
LinkedList *  accessResults 
)

Write the data set values to the server.

The parameter dataSetReference is the name of the data set to write. It is either in the form LDName/LNodeName.dataSetName for permanent domain or VMD scope data sets or @dataSetName for an association specific data set. If the LDName part of the reference is missing the resulting data set will be of VMD scope. The values parameter has to be the same number of elements as are members in the data set. The accessResult return parameter contains a value for each data set member.

Parameters
connectionthe connection object
[out]errorthe error code if an error occurs
dataSetReferenceobject reference of the data set
valuesthe new data set values
[out]accessResultsthe access results for each data set member

◆ IedConnection_writeDataSetValuesAsync()

LIB61850_API uint32_t IedConnection_writeDataSetValuesAsync ( IedConnection  self,
IedClientError error,
const char *  dataSetReference,
LinkedList  values,
IedConnection_WriteDataSetHandler  handler,
void *  parameter 
)

Write the data set values to the server - async version.

The parameter dataSetReference is the name of the data set to write. It is either in the form LDName/LNodeName.dataSetName for permanent domain or VMD scope data sets or @dataSetName for an association specific data set. If the LDName part of the reference is missing the resulting data set will be of VMD scope. The values parameter has to be the same number of elements as are members in the data set.

When the service call had been successful the IedConnection_WriteDataSetHandler is called with an error value of IED_ERROR_OK and a list of MmsValue instances of type data access error. These describe the access results of the individual data set entries.

Parameters
connectionthe connection object
[out]errorthe error code if an error occurs
dataSetReferenceobject reference of the data set
valuesthe new data set values
handlerthe user provided callback handler
parameteruser provided parameter that is passed to the callback handler
Returns
the invoke ID of the request