|
libiec61850.NET 1.6.1
IEC 61850 .NET API for libiec61850 protocol library
|
This class acts as the entry point for the IEC 61850 client API. It represents a single (MMS) connection to a server. More...
Public Member Functions | |||
| delegate void | ConnectionClosedHandler (IedConnection connection) | ||
| Called when the connection is closed. | |||
| delegate void | StateChangedHandler (IedConnection connection, IedConnectionState newState) | ||
| Called when there is a change in the connection state. | |||
| IedConnection () | |||
| Initializes a new instance of the IEC61850.Client.IedConnection class. | |||
| IedConnection (TLSConfiguration tlsConfig) | |||
| Initializes a new instance of the IEC61850.Client.IedConnection class. | |||
| void | Dispose () | ||
| Releases all resource used by the IEC61850.Client.IedConnection object. | |||
| IsoConnectionParameters | GetConnectionParameters () | ||
| Gets the connection parameters. | |||
| void | SetMaxOutstandingCalls (int calling, int called) | ||
| Set the maximum number outstanding calls allowed for this connection. | |||
| void | SetTimeQuality (bool leapSecondKnown, bool clockFailure, bool clockNotSynchronized, int subsecondPrecision) | ||
| Set the time quality for all timestamps generated by this IedConnection instance. | |||
| MmsConnection | GetMmsConnection () | ||
| Gets the underlying MmsConnection instance. | |||
| void | Connect (string hostname, int tcpPort) | ||
| Establish an MMS connection to a server. | |||
| void | ConnectAsync (string hostname, int tcpPort) | ||
| IedConnectionState | GetState () | ||
| Gets the current state of the connection. | |||
| void | Connect (string hostname) | ||
| Establish an MMS connection to a server. | |||
| void | SetLocalAddress (string localIpAddress, int localPort) | ||
| Set the local IP address and port to be used by the client. | |||
| void | SetLocalAddress (string localIpAddress) | ||
| Set the local IP address to be used by the client. | |||
| ControlObject | CreateControlObject (string objectReference) | ||
| |||
| SampledValuesControlBlock | GetSvControlBlock (string svcbObjectReference) | ||
| Creates a new SampledValuesControlBlock instance. | |||
| GooseControlBlock | GetGooseControlBlock (string gocbObjectReference) | ||
| Creates a new SampledValuesControlBlock instance. | |||
| void | UpdateDeviceModel () | ||
| Updates the device model by quering the server. | |||
| List< string > | GetServerDirectory (bool fileDirectory=false) | ||
| Gets the server directory (Logical devices or file objects) | |||
| List< string > | GetLogicalDeviceDirectory (string logicalDeviceName) | ||
| |||
| List< string > | GetLogicalNodeDirectory (string logicalNodeName, ACSIClass acsiClass) | ||
| Get the directory of a logical node (LN) | |||
| List< string > | GetDataDirectory (string dataReference) | ||
| Get a list of attributes (with functional constraints) of a DO, SDO, or DA. | |||
| List< string > | GetDataDirectory (string dataReference, FunctionalConstraint fc) | ||
| Get the list of attributes with the specified FC of a DO, SDO, or DA. | |||
| List< string > | GetDataDirectoryFC (string dataReference) | ||
| Get a list of attributes (with functional constraints) of a DO, SDO, or DA. | |||
| List< MmsJournalEntry > | QueryLogAfter (string logRef, byte[] entryID, ulong timestamp, out bool moreFollows) | ||
| Queries all log entries after the entry with the given entryID and timestamp. | |||
| List< MmsJournalEntry > | QueryLogByTime (string logRef, ulong startTime, ulong stopTime, out bool moreFollows) | ||
| Queries all log entries of the given time range. | |||
| List< MmsJournalEntry > | QueryLogByTime (string logRef, DateTime startTime, DateTime stopTime, out bool moreFollows) | ||
| Queries all log entries of the given time range. | |||
| MmsVariableSpecification | GetVariableSpecification (string objectReference, FunctionalConstraint fc) | ||
| Read the variable specification (type description of a DA or FCDO. | |||
| MmsValue | ReadValue (String objectReference, FunctionalConstraint fc) | ||
| Read the value of a data attribute (DA) or functional constraint data object (FCDO). | |||
| bool | ReadBooleanValue (string objectReference, FunctionalConstraint fc) | ||
| Read the value of a basic data attribute (BDA) of type boolean. | |||
| float | ReadFloatValue (string objectReference, FunctionalConstraint fc) | ||
| Read the value of a basic data attribute (BDA) of type float. | |||
| string | ReadStringValue (string objectReference, FunctionalConstraint fc) | ||
| Read the value of a basic data attribute (BDA) of type string (VisibleString or MmsString). | |||
| Quality | ReadQualityValue (string objectReference, FunctionalConstraint fc) | ||
| Read the value of a basic data attribute (BDA) of type quality. | |||
| int | ReadBitStringValue (string objectReference, FunctionalConstraint fc) | ||
| Read the value of a basic data attribute (BDA) of type bit string. | |||
| Timestamp | ReadTimestampValue (string objectReference, FunctionalConstraint fc) | ||
| Read the value of a basic data attribute (BDA) of type timestamp (MMS_UTC_TIME). | |||
| Int64 | ReadIntegerValue (string objectReference, FunctionalConstraint fc) | ||
| Read the value of a basic data attribute (BDA) of type integer (MMS_INTEGER). | |||
| void | WriteValue (string objectReference, FunctionalConstraint fc, MmsValue value) | ||
| Write the value of a data attribute (DA) or functional constraint data object (FCDO). | |||
| void | DeleteFile (string fileName) | ||
| Delete file. | |||
| UInt32 | DeleteFileAsync (string filename, GenericServiceHandler handler, object parameter) | ||
| Delete file- asynchronous version. | |||
| List< FileDirectoryEntry > | GetFileDirectory (string directoryName) | ||
| Read the content of a file directory. | |||
| List< FileDirectoryEntry > | GetFileDirectoryEx (string directoryName, string continueAfter, out bool moreFollows) | ||
| Read the content of a file directory. - single request version. | |||
| delegate bool | GetFileHandler (object parameter, byte[] data) | ||
| void | GetFile (string fileName, GetFileHandler handler, object parameter) | ||
| Download a file from the server. | |||
| void | SetFilestoreBasepath (string basepath) | ||
| Set the virtual filestore basepath for the setFile service. | |||
| void | SetFile (string sourceFilename, string destinationFilename) | ||
| Upload a file to the server. | |||
| delegate bool | GetFileAsyncHandler (UInt32 invokeId, object parameter, IedClientError err, UInt32 originalInvokeId, byte[] buffer, bool moreFollows) | ||
| Callback handler for the asynchronous get file service. Will be invoked for each chunk of received data. | |||
| UInt32 | GetFileAsync (string fileName, GetFileAsyncHandler handler, object parameter) | ||
| Download a file from the server. | |||
| void | Abort () | ||
| Abort (close) the connection. | |||
| void | AbortAsync () | ||
| Abort (close) the connection - asynchronous version. | |||
| void | Release () | ||
| Release (close) the connection. | |||
| void | ReleaseAsync () | ||
| Release (close) the connection - asynchronous version. | |||
| void | Close () | ||
| Immediately close the connection. | |||
| void | InstallConnectionClosedHandler (ConnectionClosedHandler handler) | ||
| Install a callback handler that will be invoked if the connection is closed. | |||
| void | InstallStateChangedHandler (StateChangedHandler handler) | ||
| Sets the handler for StateChanged events. | |||
| void | IgnoreClientRequests (bool ignore) | ||
| Ignore all MMS requests from clients (for testing purposes) | |||
| void | IgnoreReadAccess (bool ignore) | ||
| Temporarily ignore read requests (for testing purposes) | |||
| DataSet | GetDataSetValues (string dataSetReference) | ||
| Read the values of a data set (GetDataSetValues service). | |||
| DataSet | ReadDataSetValues (string dataSetReference, DataSet dataSet) | ||
| Read the values of a data set (GetDataSetValues service). | |||
| List< MmsDataAccessError > | WriteDataSetValues (string dataSetReference, List< MmsValue > values) | ||
| Writes the values of a data set (SetDataSetValues service). | |||
| void | CreateDataSet (string dataSetReference, List< string > dataSetElements) | ||
| Create a new data set. | |||
| UInt32 | CreateDataSetAsync (string dataSetReference, List< string > dataSetElements, GenericServiceHandler handler, object parameter) | ||
| Create a new data set - asynchronous version. | |||
| bool | DeleteDataSet (string dataSetReference) | ||
| Delete a data set. | |||
| UInt32 | DeleteDataSetAsync (string dataSetReference, GenericServiceHandler handler, object parameter) | ||
| Delete a data set - asynchronous version. | |||
| List< string > | GetDataSetDirectory (string dataSetReference) | ||
| Get the directory of the data set. | |||
| List< string > | GetDataSetDirectory (string dataSetReference, out bool isDeletable) | ||
| Get the directory of the data set. | |||
| delegate void | GetDataSetDirectoryHandler (UInt32 invokeId, object parameter, IedClientError err, List< string > dataSetDirectory, bool isDeletable) | ||
| Get data set directory handler. | |||
| UInt32 | GetDataSetDirectoryAsync (string dataSetReference, GetDataSetDirectoryHandler handler, object parameter) | ||
| Read the data set directory - asynchronous version. | |||
| delegate void | ReadValueHandler (UInt32 invokeId, object parameter, IedClientError err, MmsValue value) | ||
| Read object handler. | |||
| UInt32 | ReadValueAsync (string objectReference, FunctionalConstraint fc, ReadValueHandler handler, object parameter) | ||
| Asynchronously read the value of a data attribute (DA) or functional constraint data object (FCDO) - GetData service. | |||
| delegate void | GetVariableSpecifcationHandler (UInt32 invokeId, object parameter, IedClientError err, MmsVariableSpecification spec) | ||
| UInt32 | GetVariableSpecificationAsync (string objectReference, FunctionalConstraint fc, GetVariableSpecifcationHandler handler, object parameter) | ||
| Read the variable specification (type description of a DA or FCDO. | |||
| delegate void | ReadDataSetHandler (UInt32 invokeId, object parameter, IedClientError err, DataSet dataSet) | ||
| UInt32 | ReadDataSetValuesAsync (string dataSetReference, DataSet dataSet, ReadDataSetHandler handler, object parameter) | ||
| Read the values of a data set (GetDataSetValues service) - asynchronous version. | |||
| delegate void | WriteValueHandler (UInt32 invokeId, object parameter, IedClientError err) | ||
| Write value handler. | |||
| UInt32 | WriteValueAsync (string objectReference, FunctionalConstraint fc, MmsValue value, WriteValueHandler handler, object parameter) | ||
| delegate void | GetNameListHandler (UInt32 invokeId, object parameter, IedClientError err, List< string > nameList, bool moreFollows) | ||
| UInt32 | GetServerDirectoryAsync (List< string > result, string continueAfter, GetNameListHandler handler, object parameter) | ||
| Gets the server directory (Logical devices or file objects) | |||
| UInt32 | GetLogicalDeviceVariablesAsync (string ldName, string continueAfter, GetNameListHandler handler, object parameter) | ||
| UInt32 | GetLogicalDeviceVariablesAsync (List< string > result, string ldName, string continueAfter, GetNameListHandler handler, object parameter) | ||
| UInt32 | GetLogicalDeviceDataSetsAsync (string ldName, string continueAfter, GetNameListHandler handler, object parameter) | ||
| UInt32 | GetLogicalDeviceDataSetsAsync (List< string > result, string ldName, string continueAfter, GetNameListHandler handler, object parameter) | ||
| delegate void | QueryLogHandler (UInt32 invokeId, object parameter, IedClientError err, List< MmsJournalEntry > journalEntries, bool moreFollows) | ||
| UInt32 | QueryLogByTimeAsync (string logRef, ulong startTime, ulong stopTime, QueryLogHandler handler, object parameter) | ||
| Queries all log entries of the given time range (asynchronous version) | |||
| UInt32 | QueryLogByTimeAsync (string logRef, DateTime startTime, DateTime stopTime, QueryLogHandler handler, object parameter) | ||
| Queries all log entries of the given time range (asynchronous version) | |||
| UInt32 | QueryLogAfterAsync (string logRef, byte[] entryID, ulong timestamp, QueryLogHandler handler, object parameter) | ||
| Queries all log entries after the entry with the given entryID and timestamp (asynchronous version) | |||
| ReportControlBlock | GetReportControlBlock (string rcbObjectReference) | ||
Properties | |
| UInt32 | ConnectTimeout [get, set] |
| Gets or sets the timeout used for connection attempts. | |
| UInt32 | RequestTimeout [get, set] |
| Gets or sets the request timeout for this connection. | |
| int | MaxPduSize [get, set] |
| Gets or sets the maximum size if a PDU (has to be set before calling connect!). | |
| StateChangedHandler | StateChanged [set] |
| Sets the handler for StateChanged events. | |
This class acts as the entry point for the IEC 61850 client API. It represents a single (MMS) connection to a server.
| IEC61850.Client.IedConnection.IedConnection | ( | ) |
Initializes a new instance of the IEC61850.Client.IedConnection class.
| IEC61850.Client.IedConnection.IedConnection | ( | TLSConfiguration | tlsConfig | ) |
Initializes a new instance of the IEC61850.Client.IedConnection class.
| tlsConfig | TLS configuration to use |
| void IEC61850.Client.IedConnection.Abort | ( | ) |
Abort (close) the connection.
This function will send an abort request to the server. This will immediately interrupt the connection.
| IedConnectionException | This exception is thrown if there is a connection or service error |
| void IEC61850.Client.IedConnection.AbortAsync | ( | ) |
Abort (close) the connection - asynchronous version.
This function will send an abort request to the server. This will immediately interrupt the connection.
| IedConnectionException | This exception is thrown if there is a connection or service error |
| void IEC61850.Client.IedConnection.Close | ( | ) |
Immediately close the connection.
This function will close the connnection to the server by closing the TCP connection. The client will not send an abort or release request as required by the specification!
| IedConnectionException | This exception is thrown if there is a connection or service error |
| void IEC61850.Client.IedConnection.Connect | ( | string | hostname | ) |
Establish an MMS connection to a server.
| IedConnectionException | This exception is thrown if there is a connection or service error. |
| void IEC61850.Client.IedConnection.Connect | ( | string | hostname, |
| int | tcpPort ) |
Establish an MMS connection to a server.
| IedConnectionException | This exception is thrown if there is a connection or service error |
| void IEC61850.Client.IedConnection.ConnectAsync | ( | string | hostname, |
| int | tcpPort ) |
| delegate void IEC61850.Client.IedConnection.ConnectionClosedHandler | ( | IedConnection | connection | ) |
Called when the connection is closed.
| ControlObject IEC61850.Client.IedConnection.CreateControlObject | ( | string | objectReference | ) |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| void IEC61850.Client.IedConnection.CreateDataSet | ( | string | dataSetReference, |
| List< string > | dataSetElements ) |
Create a new data set.
This function creates a new data set at the server. The data set consists of the members defined by the list of object references provided.
| dataSetReference | The object reference of the data set |
| dataSetElements | A list of object references of the data set elements |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| UInt32 IEC61850.Client.IedConnection.CreateDataSetAsync | ( | string | dataSetReference, |
| List< string > | dataSetElements, | ||
| GenericServiceHandler | handler, | ||
| object | parameter ) |
Create a new data set - asynchronous version.
This function creates a new data set at the server. The data set consists of the members defined by the list of object references provided.
| dataSetReference | The object reference of the data set |
| dataSetElements | A list of object references of the data set elements |
| handler | Callback function to handle the received response or service timeout |
| parameter | User provided callback parameter. Will be passed to the callback function |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| bool IEC61850.Client.IedConnection.DeleteDataSet | ( | string | dataSetReference | ) |
Delete a data set.
This function will delete a data set at the server. This function may fail if the data set is not deletable.
| dataSetReference | The object reference of the data set |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| UInt32 IEC61850.Client.IedConnection.DeleteDataSetAsync | ( | string | dataSetReference, |
| GenericServiceHandler | handler, | ||
| object | parameter ) |
Delete a data set - asynchronous version.
This function will delete a data set at the server. This function may fail if the data set is not deletable.
| dataSetReference | The object reference of the data set |
| handler | Callback function to handle the received response or service timeout |
| parameter | User provided callback parameter. Will be passed to the callback function |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| void IEC61850.Client.IedConnection.DeleteFile | ( | string | fileName | ) |
Delete file.
| fileName | The name of the file. |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| UInt32 IEC61850.Client.IedConnection.DeleteFileAsync | ( | string | filename, |
| GenericServiceHandler | handler, | ||
| object | parameter ) |
Delete file- asynchronous version.
| fileName | The name of the file. |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| void IEC61850.Client.IedConnection.Dispose | ( | ) |
Releases all resource used by the IEC61850.Client.IedConnection object.
Call Dispose when you are finished using the IEC61850.Client.IedConnection. The Dispose method leaves the IEC61850.Client.IedConnection in an unusable state. After calling Dispose, you must release all references to the IEC61850.Client.IedConnection so the garbage collector can reclaim the memory that the IEC61850.Client.IedConnection was occupying.
| IsoConnectionParameters IEC61850.Client.IedConnection.GetConnectionParameters | ( | ) |
Gets the connection parameters.
| List< string > IEC61850.Client.IedConnection.GetDataDirectory | ( | string | dataReference | ) |
Get a list of attributes (with functional constraints) of a DO, SDO, or DA.
| dataReference | The object reference of a DO, SDO, or DA. |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| List< string > IEC61850.Client.IedConnection.GetDataDirectory | ( | string | dataReference, |
| FunctionalConstraint | fc ) |
Get the list of attributes with the specified FC of a DO, SDO, or DA.
| dataReference | The object reference of a DO, SDO, or DA. |
| fc | Functional constraint |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| List< string > IEC61850.Client.IedConnection.GetDataDirectoryFC | ( | string | dataReference | ) |
Get a list of attributes (with functional constraints) of a DO, SDO, or DA.
This function is similar to the GetDataDirectory except that the returned element names have the functional contraint (FC) appended.
| dataReference | The object reference of a DO, SDO, or DA. |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| List< string > IEC61850.Client.IedConnection.GetDataSetDirectory | ( | string | dataSetReference | ) |
Get the directory of the data set.
This function returns a list of object references with appended functional constraints (FC) of the data set elemenents.
| dataSetReference | The object reference of the data set |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| List< string > IEC61850.Client.IedConnection.GetDataSetDirectory | ( | string | dataSetReference, |
| out bool | isDeletable ) |
Get the directory of the data set.
This function returns a list of object references with appended functional constraints (FC) of the data set elemenents.
| dataSetReference | The object reference of the data set |
| isDeletable | Indication if this data set is permanent or deletable. |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| UInt32 IEC61850.Client.IedConnection.GetDataSetDirectoryAsync | ( | string | dataSetReference, |
| GetDataSetDirectoryHandler | handler, | ||
| object | parameter ) |
Read the data set directory - asynchronous version.
| dataSetReference | Data set reference. |
| handler | Callback function to handle the received response or service timeout |
| parameter | User provided callback parameter. Will be passed to the callback function |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| delegate void IEC61850.Client.IedConnection.GetDataSetDirectoryHandler | ( | UInt32 | invokeId, |
| object | parameter, | ||
| IedClientError | err, | ||
| List< string > | dataSetDirectory, | ||
| bool | isDeletable ) |
Get data set directory handler.
| invokeId | The invoke ID of the reqeust triggering this callback |
| parameter | user provided callback parameter |
| err | Error code of response or timeout error in case of a response timeout |
| dataSetDirectory | the list of data set entry references |
| isDeletable | data set can be deleted by a client (dynamic data set) |
| DataSet IEC61850.Client.IedConnection.GetDataSetValues | ( | string | dataSetReference | ) |
Read the values of a data set (GetDataSetValues service).
This function will invoke a readDataSetValues service and return a new DataSet value containing the received values.
| dataSetReference | The object reference of the data set |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| void IEC61850.Client.IedConnection.GetFile | ( | string | fileName, |
| GetFileHandler | handler, | ||
| object | parameter ) |
Download a file from the server.
| fileName | File name of the file (full path) |
| handler | Callback handler that is invoked for each chunk of the file received |
| parameter | User provided parameter that is passed to the callback handler |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| UInt32 IEC61850.Client.IedConnection.GetFileAsync | ( | string | fileName, |
| GetFileAsyncHandler | handler, | ||
| object | parameter ) |
Download a file from the server.
| fileName | File name of the file (full path) |
| handler | Callback handler that is invoked for each chunk of the file received |
| parameter | User provided parameter that is passed to the callback handler |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| delegate bool IEC61850.Client.IedConnection.GetFileAsyncHandler | ( | UInt32 | invokeId, |
| object | parameter, | ||
| IedClientError | err, | ||
| UInt32 | originalInvokeId, | ||
| byte[] | buffer, | ||
| bool | moreFollows ) |
Callback handler for the asynchronous get file service. Will be invoked for each chunk of received data.
| invokeId | The invoke ID of the reqeust triggering this callback |
| parameter | user provided callback parameter |
| err | Error code of response or timeout error in case of a response timeout |
| originalInvokeId | the invokeId of the first (file open) request |
| buffer | the file data received with the last response, or null if no file data available |
| moreFollows | indicates that more file data follows |
| List< FileDirectoryEntry > IEC61850.Client.IedConnection.GetFileDirectory | ( | string | directoryName | ) |
Read the content of a file directory.
| directoryName | The name of the directory. |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| List< FileDirectoryEntry > IEC61850.Client.IedConnection.GetFileDirectoryEx | ( | string | directoryName, |
| string | continueAfter, | ||
| out bool | moreFollows ) |
Read the content of a file directory. - single request version.
| directoryName | The name of the directory. |
| continueAfter | the filename that defines the continuation point, or null for the first request |
| moreFollows | true, when more files are available, false otherwise |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| delegate bool IEC61850.Client.IedConnection.GetFileHandler | ( | object | parameter, |
| byte[] | data ) |
| GooseControlBlock IEC61850.Client.IedConnection.GetGooseControlBlock | ( | string | gocbObjectReference | ) |
Creates a new SampledValuesControlBlock instance.
| gocbObjectReference | The object reference of the GoCB (e.g. "simpleIOGenericIO/LLN0.gcbAnalogValues") |
| UInt32 IEC61850.Client.IedConnection.GetLogicalDeviceDataSetsAsync | ( | List< string > | result, |
| string | ldName, | ||
| string | continueAfter, | ||
| GetNameListHandler | handler, | ||
| object | parameter ) |
| UInt32 IEC61850.Client.IedConnection.GetLogicalDeviceDataSetsAsync | ( | string | ldName, |
| string | continueAfter, | ||
| GetNameListHandler | handler, | ||
| object | parameter ) |
| List< string > IEC61850.Client.IedConnection.GetLogicalDeviceDirectory | ( | string | logicalDeviceName | ) |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| UInt32 IEC61850.Client.IedConnection.GetLogicalDeviceVariablesAsync | ( | List< string > | result, |
| string | ldName, | ||
| string | continueAfter, | ||
| GetNameListHandler | handler, | ||
| object | parameter ) |
| UInt32 IEC61850.Client.IedConnection.GetLogicalDeviceVariablesAsync | ( | string | ldName, |
| string | continueAfter, | ||
| GetNameListHandler | handler, | ||
| object | parameter ) |
| List< string > IEC61850.Client.IedConnection.GetLogicalNodeDirectory | ( | string | logicalNodeName, |
| ACSIClass | acsiClass ) |
Get the directory of a logical node (LN)
This function returns the directory contents of a LN. Depending on the provided ACSI class The function returns either data object references, or references of other objects like data sets, report control blocks, ...
| logicalNodeName | The object reference of a DO, SDO, or DA. |
| acsiClass | the ACSI class of the requested directory elements. |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| MmsConnection IEC61850.Client.IedConnection.GetMmsConnection | ( | ) |
Gets the underlying MmsConnection instance.
| delegate void IEC61850.Client.IedConnection.GetNameListHandler | ( | UInt32 | invokeId, |
| object | parameter, | ||
| IedClientError | err, | ||
| List< string > | nameList, | ||
| bool | moreFollows ) |
| ReportControlBlock IEC61850.Client.IedConnection.GetReportControlBlock | ( | string | rcbObjectReference | ) |
| List< string > IEC61850.Client.IedConnection.GetServerDirectory | ( | bool | fileDirectory = false | ) |
Gets the server directory (Logical devices or file objects)
| fileDirectory | If set to true the file directory is returned, otherwise the LD names |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| UInt32 IEC61850.Client.IedConnection.GetServerDirectoryAsync | ( | List< string > | result, |
| string | continueAfter, | ||
| GetNameListHandler | handler, | ||
| object | parameter ) |
Gets the server directory (Logical devices or file objects)
| result | list where to store the result or null to create a new list for the result |
| continueAfter | continuation value (last received name) |
| handler | user provided callback function |
| parameter | user provided callback parameter |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| IedConnectionState IEC61850.Client.IedConnection.GetState | ( | ) |
Gets the current state of the connection.
| SampledValuesControlBlock IEC61850.Client.IedConnection.GetSvControlBlock | ( | string | svcbObjectReference | ) |
Creates a new SampledValuesControlBlock instance.
> This function will also read the SVCB values from the server.
| svcbObjectReference | The object reference of the SVCB |
| delegate void IEC61850.Client.IedConnection.GetVariableSpecifcationHandler | ( | UInt32 | invokeId, |
| object | parameter, | ||
| IedClientError | err, | ||
| MmsVariableSpecification | spec ) |
| MmsVariableSpecification IEC61850.Client.IedConnection.GetVariableSpecification | ( | string | objectReference, |
| FunctionalConstraint | fc ) |
Read the variable specification (type description of a DA or FCDO.
| objectReference | The object reference of a DA or FCDO. |
| fc | The functional constraint (FC) of the object |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| UInt32 IEC61850.Client.IedConnection.GetVariableSpecificationAsync | ( | string | objectReference, |
| FunctionalConstraint | fc, | ||
| GetVariableSpecifcationHandler | handler, | ||
| object | parameter ) |
Read the variable specification (type description of a DA or FCDO.
| objectReference | The object reference of a DA or FCDO. |
| fc | The functional constraint (FC) of the object |
| handler | Callback function to handle the received response or service timeout |
| parameter | User provided callback parameter. Will be passed to the callback function |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| void IEC61850.Client.IedConnection.IgnoreClientRequests | ( | bool | ignore | ) |
Ignore all MMS requests from clients (for testing purposes)
| ignore | when true all requests from clients will be ignored |
| void IEC61850.Client.IedConnection.IgnoreReadAccess | ( | bool | ignore | ) |
Temporarily ignore read requests (for testing purposes)
| ignore | true to ignore read requests, false to handle read requests. |
| void IEC61850.Client.IedConnection.InstallConnectionClosedHandler | ( | ConnectionClosedHandler | handler | ) |
Install a callback handler that will be invoked if the connection is closed.
The handler is called when the connection is closed no matter if the connection was closed by the client or by the server. Any new call to this function will replace the callback handler installed by a prior function call.
| handler | The user provided callback handler |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| void IEC61850.Client.IedConnection.InstallStateChangedHandler | ( | StateChangedHandler | handler | ) |
Sets the handler for StateChanged events.
| handler | The state changed event handler |
| List< MmsJournalEntry > IEC61850.Client.IedConnection.QueryLogAfter | ( | string | logRef, |
| byte[] | entryID, | ||
| ulong | timestamp, | ||
| out bool | moreFollows ) |
Queries all log entries after the entry with the given entryID and timestamp.
| logRef | The object reference of the log (e.g. "simpleIOGenericIO/LLN0$EventLog") |
| entryID | EntryID of the last received MmsJournalEntry |
| timestamp | Timestamp of the last received MmsJournalEntry |
| moreFollows | Indicates that more log entries are available |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| UInt32 IEC61850.Client.IedConnection.QueryLogAfterAsync | ( | string | logRef, |
| byte[] | entryID, | ||
| ulong | timestamp, | ||
| QueryLogHandler | handler, | ||
| object | parameter ) |
Queries all log entries after the entry with the given entryID and timestamp (asynchronous version)
| logRef | The object reference of the log (e.g. "simpleIOGenericIO/LLN0$EventLog") |
| entryID | EntryID of the last received MmsJournalEntry |
| handler | user provided callback function |
| parameter | user provided callback parameter |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| List< MmsJournalEntry > IEC61850.Client.IedConnection.QueryLogByTime | ( | string | logRef, |
| DateTime | startTime, | ||
| DateTime | stopTime, | ||
| out bool | moreFollows ) |
Queries all log entries of the given time range.
| logRef | The object reference of the log (e.g. "simpleIOGenericIO/LLN0$EventLog") |
| startTime | Start time of the time range |
| stopTime | End time of the time range |
| moreFollows | Indicates that more log entries are available |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| List< MmsJournalEntry > IEC61850.Client.IedConnection.QueryLogByTime | ( | string | logRef, |
| ulong | startTime, | ||
| ulong | stopTime, | ||
| out bool | moreFollows ) |
Queries all log entries of the given time range.
| logRef | The object reference of the log (e.g. "simpleIOGenericIO/LLN0$EventLog") |
| startTime | Start time of the time range |
| stopTime | End time of the time range |
| moreFollows | Indicates that more log entries are available |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| UInt32 IEC61850.Client.IedConnection.QueryLogByTimeAsync | ( | string | logRef, |
| DateTime | startTime, | ||
| DateTime | stopTime, | ||
| QueryLogHandler | handler, | ||
| object | parameter ) |
Queries all log entries of the given time range (asynchronous version)
| logRef | The object reference of the log (e.g. "simpleIOGenericIO/LLN0$EventLog") |
| startTime | Start time of the time range |
| stopTime | End time of the time range |
| handler | user provided callback function |
| parameter | user provided callback parameter |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| UInt32 IEC61850.Client.IedConnection.QueryLogByTimeAsync | ( | string | logRef, |
| ulong | startTime, | ||
| ulong | stopTime, | ||
| QueryLogHandler | handler, | ||
| object | parameter ) |
Queries all log entries of the given time range (asynchronous version)
| logRef | The object reference of the log (e.g. "simpleIOGenericIO/LLN0$EventLog") |
| startTime | Start time of the time range |
| stopTime | End time of the time range |
| handler | user provided callback function |
| parameter | user provided callback parameter |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| delegate void IEC61850.Client.IedConnection.QueryLogHandler | ( | UInt32 | invokeId, |
| object | parameter, | ||
| IedClientError | err, | ||
| List< MmsJournalEntry > | journalEntries, | ||
| bool | moreFollows ) |
| int IEC61850.Client.IedConnection.ReadBitStringValue | ( | string | objectReference, |
| FunctionalConstraint | fc ) |
Read the value of a basic data attribute (BDA) of type bit string.
| objectReference | The object reference of a BDA. |
| fc | The functional constraint (FC) of the object |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| bool IEC61850.Client.IedConnection.ReadBooleanValue | ( | string | objectReference, |
| FunctionalConstraint | fc ) |
Read the value of a basic data attribute (BDA) of type boolean.
| objectReference | The object reference of a BDA. |
| fc | The functional constraint (FC) of the object |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| delegate void IEC61850.Client.IedConnection.ReadDataSetHandler | ( | UInt32 | invokeId, |
| object | parameter, | ||
| IedClientError | err, | ||
| DataSet | dataSet ) |
| DataSet IEC61850.Client.IedConnection.ReadDataSetValues | ( | string | dataSetReference, |
| DataSet | dataSet ) |
Read the values of a data set (GetDataSetValues service).
This function will invoke a readDataSetValues service and return a new DataSet value containing the received values. If an existing instance of DataSet is provided to the function the existing instance will be updated by the new values.
| dataSetReference | The object reference of the data set |
| dataSet | The object reference of an existing data set instance or null |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| UInt32 IEC61850.Client.IedConnection.ReadDataSetValuesAsync | ( | string | dataSetReference, |
| DataSet | dataSet, | ||
| ReadDataSetHandler | handler, | ||
| object | parameter ) |
Read the values of a data set (GetDataSetValues service) - asynchronous version.
This function will invoke a readDataSetValues service and in case of success returns a new DataSet value containing the received values by the callback function. If an existing instance of DataSet is provided to the function the existing instance will be updated by the new values.
| dataSetReference | The object reference of the data set |
| dataSet | The object reference of an existing data set instance or null |
| handler | Callback function to handle the received response or service timeout |
| parameter | User provided callback parameter. Will be passed to the callback function |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| float IEC61850.Client.IedConnection.ReadFloatValue | ( | string | objectReference, |
| FunctionalConstraint | fc ) |
Read the value of a basic data attribute (BDA) of type float.
| objectReference | The object reference of a BDA. |
| fc | The functional constraint (FC) of the object |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| Int64 IEC61850.Client.IedConnection.ReadIntegerValue | ( | string | objectReference, |
| FunctionalConstraint | fc ) |
Read the value of a basic data attribute (BDA) of type integer (MMS_INTEGER).
This function should also be used if enumerations are beeing read. Because enumerations are mapped to integer types for the MMS mapping
| objectReference | The object reference of a BDA. |
| fc | The functional constraint (FC) of the object |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| Quality IEC61850.Client.IedConnection.ReadQualityValue | ( | string | objectReference, |
| FunctionalConstraint | fc ) |
Read the value of a basic data attribute (BDA) of type quality.
| objectReference | The object reference of a BDA. |
| fc | The functional constraint (FC) of the object |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| string IEC61850.Client.IedConnection.ReadStringValue | ( | string | objectReference, |
| FunctionalConstraint | fc ) |
Read the value of a basic data attribute (BDA) of type string (VisibleString or MmsString).
| objectReference | The object reference of a BDA. |
| fc | The functional constraint (FC) of the object |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| Timestamp IEC61850.Client.IedConnection.ReadTimestampValue | ( | string | objectReference, |
| FunctionalConstraint | fc ) |
Read the value of a basic data attribute (BDA) of type timestamp (MMS_UTC_TIME).
| objectReference | The object reference of a BDA. |
| fc | The functional constraint (FC) of the object |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| MmsValue IEC61850.Client.IedConnection.ReadValue | ( | String | objectReference, |
| FunctionalConstraint | fc ) |
Read the value of a data attribute (DA) or functional constraint data object (FCDO).
| objectReference | The object reference of a DA or FCDO. |
| fc | The functional constraint (FC) of the object |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| UInt32 IEC61850.Client.IedConnection.ReadValueAsync | ( | string | objectReference, |
| FunctionalConstraint | fc, | ||
| ReadValueHandler | handler, | ||
| object | parameter ) |
Asynchronously read the value of a data attribute (DA) or functional constraint data object (FCDO) - GetData service.
| objectReference | The object reference of a DA or FCDO. |
| fc | The functional constraint (FC) of the object |
| handler | Callback function to handle the received response or service timeout |
| parameter | User provided callback parameter. Will be passed to the callback function |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| delegate void IEC61850.Client.IedConnection.ReadValueHandler | ( | UInt32 | invokeId, |
| object | parameter, | ||
| IedClientError | err, | ||
| MmsValue | value ) |
Read object handler.
| invokeId | The invoke ID of the reqeust triggering this callback |
| parameter | user provided callback parameter |
| err | Error code of response or timeout error in case of a response timeout |
| value | The read result value or null in case of an error |
| void IEC61850.Client.IedConnection.Release | ( | ) |
Release (close) the connection.
This function will send an release request to the server. The function will block until the connection is released or an error occured.
| IedConnectionException | This exception is thrown if there is a connection or service error |
| void IEC61850.Client.IedConnection.ReleaseAsync | ( | ) |
Release (close) the connection - asynchronous version.
This function will send an release request to the server. The function will block until the connection is released or an error occured.
| IedConnectionException | This exception is thrown if there is a connection or service error |
| void IEC61850.Client.IedConnection.SetFile | ( | string | sourceFilename, |
| string | destinationFilename ) |
Upload a file to the server.
| sourceFilename | The filename of the local (client side) file |
| destinationFilename | The filename of the remote (service side) file |
| void IEC61850.Client.IedConnection.SetFilestoreBasepath | ( | string | basepath | ) |
Set the virtual filestore basepath for the setFile service.
| basepath | The new virtual filestore basepath |
| void IEC61850.Client.IedConnection.SetLocalAddress | ( | string | localIpAddress | ) |
Set the local IP address to be used by the client.
| localIpAddress | the local IP address or hostname |
| void IEC61850.Client.IedConnection.SetLocalAddress | ( | string | localIpAddress, |
| int | localPort ) |
Set the local IP address and port to be used by the client.
| localIpAddress | the local IP address or hostname |
| localPort | the local TCP port to use. When 0 the OS will chose the TCP port to use. |
| void IEC61850.Client.IedConnection.SetMaxOutstandingCalls | ( | int | calling, |
| int | called ) |
Set the maximum number outstanding calls allowed for this connection.
| calling | the maximum outstanding calls allowed by the caller (client) |
| called | the maximum outstanding calls allowed by the called endpoint (server) |
| void IEC61850.Client.IedConnection.SetTimeQuality | ( | bool | leapSecondKnown, |
| bool | clockFailure, | ||
| bool | clockNotSynchronized, | ||
| int | subsecondPrecision ) |
Set the time quality for all timestamps generated by this IedConnection instance.
| leapSecondKnown | set or unset leap seconds known flag |
| clockFailure | set or unset clock failure flag |
| clockNotSynchronized | set or unset clock not synchronized flag |
| subsecondPrecision | set the subsecond precision (number of significant bits of the fractionOfSecond part of the time stamp) |
| delegate void IEC61850.Client.IedConnection.StateChangedHandler | ( | IedConnection | connection, |
| IedConnectionState | newState ) |
Called when there is a change in the connection state.
| void IEC61850.Client.IedConnection.UpdateDeviceModel | ( | ) |
Updates the device model by quering the server.
| List< MmsDataAccessError > IEC61850.Client.IedConnection.WriteDataSetValues | ( | string | dataSetReference, |
| List< MmsValue > | values ) |
Writes the values of a data set (SetDataSetValues service).
| dataSetReference | The object reference of the data set |
| values | The new values for the data set members. The values have to be of the same number and type as the data set members |
| void IEC61850.Client.IedConnection.WriteValue | ( | string | objectReference, |
| FunctionalConstraint | fc, | ||
| MmsValue | value ) |
Write the value of a data attribute (DA) or functional constraint data object (FCDO).
This function can be used to write simple or complex variables (setpoints, parameters, descriptive values...) of the server.
| objectReference | The object reference of a BDA. |
| fc | The functional constraint (FC) of the object |
| value | MmsValue object representing asimple or complex variable data |
| IedConnectionException | This exception is thrown if there is a connection or service error |
| UInt32 IEC61850.Client.IedConnection.WriteValueAsync | ( | string | objectReference, |
| FunctionalConstraint | fc, | ||
| MmsValue | value, | ||
| WriteValueHandler | handler, | ||
| object | parameter ) |
| delegate void IEC61850.Client.IedConnection.WriteValueHandler | ( | UInt32 | invokeId, |
| object | parameter, | ||
| IedClientError | err ) |
Write value handler.
| invokeId | The invoke ID of the reqeust triggering this callback |
| parameter | user provided callback parameter |
| err | Error code of response or timeout error in case of a response timeout |
|
getset |
Gets or sets the timeout used for connection attempts.
The connect timeout in milliseconds
|
getset |
Gets or sets the maximum size if a PDU (has to be set before calling connect!).
The maximum allowed size of an MMS PDU.
|
getset |
Gets or sets the request timeout for this connection.
The request timeout in milliseconds
|
set |
Sets the handler for StateChanged events.
The state changed event handler