libiec61850.NET
1.5.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 More... | |||
delegate void | StateChangedHandler (IedConnection connection, IedConnectionState newState) | ||
Called when there is a change in the connection state More... | |||
IedConnection () | |||
Initializes a new instance of the IEC61850.Client.IedConnection class. More... | |||
IedConnection (TLSConfiguration tlsConfig) | |||
Initializes a new instance of the IEC61850.Client.IedConnection class. More... | |||
void | Dispose () | ||
Releases all resource used by the IEC61850.Client.IedConnection object. More... | |||
IsoConnectionParameters | GetConnectionParameters () | ||
Gets the connection parameters More... | |||
void | SetTimeQuality (bool leapSecondKnown, bool clockFailure, bool clockNotSynchronized, int subsecondPrecision) | ||
Set the time quality for all timestamps generated by this IedConnection instance More... | |||
MmsConnection | GetMmsConnection () | ||
Gets the underlying MmsConnection instance. More... | |||
void | Connect (string hostname, int tcpPort) | ||
Establish an MMS connection to a server More... | |||
void | ConnectAsync (string hostname, int tcpPort) | ||
IedConnectionState | GetState () | ||
Gets the current state of the connection More... | |||
void | Connect (string hostname) | ||
Establish an MMS connection to a server. More... | |||
ControlObject | CreateControlObject (string objectReference) | ||
| |||
SampledValuesControlBlock | GetSvControlBlock (string svcbObjectReference) | ||
Creates a new SampledValuesControlBlock instance. More... | |||
GooseControlBlock | GetGooseControlBlock (string gocbObjectReference) | ||
Creates a new SampledValuesControlBlock instance. More... | |||
void | UpdateDeviceModel () | ||
Updates the device model by quering the server. More... | |||
List< string > | GetServerDirectory (bool fileDirectory=false) | ||
Gets the server directory (Logical devices or file objects) More... | |||
List< string > | GetLogicalDeviceDirectory (string logicalDeviceName) | ||
| |||
List< string > | GetLogicalNodeDirectory (string logicalNodeName, ACSIClass acsiClass) | ||
Get the directory of a logical node (LN) More... | |||
List< string > | GetDataDirectory (string dataReference) | ||
Get a list of attributes (with functional constraints) of a DO, SDO, or DA More... | |||
List< string > | GetDataDirectory (string dataReference, FunctionalConstraint fc) | ||
Get the list of attributes with the specified FC of a DO, SDO, or DA More... | |||
List< string > | GetDataDirectoryFC (string dataReference) | ||
Get a list of attributes (with functional constraints) of a DO, SDO, or DA More... | |||
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 More... | |||
List< MmsJournalEntry > | QueryLogByTime (string logRef, ulong startTime, ulong stopTime, out bool moreFollows) | ||
Queries all log entries of the given time range More... | |||
List< MmsJournalEntry > | QueryLogByTime (string logRef, DateTime startTime, DateTime stopTime, out bool moreFollows) | ||
Queries all log entries of the given time range More... | |||
MmsVariableSpecification | GetVariableSpecification (string objectReference, FunctionalConstraint fc) | ||
Read the variable specification (type description of a DA or FCDO More... | |||
MmsValue | ReadValue (String objectReference, FunctionalConstraint fc) | ||
Read the value of a data attribute (DA) or functional constraint data object (FCDO). More... | |||
bool | ReadBooleanValue (string objectReference, FunctionalConstraint fc) | ||
Read the value of a basic data attribute (BDA) of type boolean. More... | |||
float | ReadFloatValue (string objectReference, FunctionalConstraint fc) | ||
Read the value of a basic data attribute (BDA) of type float. More... | |||
string | ReadStringValue (string objectReference, FunctionalConstraint fc) | ||
Read the value of a basic data attribute (BDA) of type string (VisibleString or MmsString). More... | |||
Quality | ReadQualityValue (string objectReference, FunctionalConstraint fc) | ||
Read the value of a basic data attribute (BDA) of type quality. More... | |||
int | ReadBitStringValue (string objectReference, FunctionalConstraint fc) | ||
Read the value of a basic data attribute (BDA) of type bit string. More... | |||
Timestamp | ReadTimestampValue (string objectReference, FunctionalConstraint fc) | ||
Read the value of a basic data attribute (BDA) of type timestamp (MMS_UTC_TIME). More... | |||
Int64 | ReadIntegerValue (string objectReference, FunctionalConstraint fc) | ||
Read the value of a basic data attribute (BDA) of type integer (MMS_INTEGER). More... | |||
void | WriteValue (string objectReference, FunctionalConstraint fc, MmsValue value) | ||
Write the value of a data attribute (DA) or functional constraint data object (FCDO). More... | |||
void | DeleteFile (string fileName) | ||
Delete file More... | |||
UInt32 | DeleteFileAsync (string filename, GenericServiceHandler handler, object parameter) | ||
Delete file- asynchronous version More... | |||
List< FileDirectoryEntry > | GetFileDirectory (string directoryName) | ||
Read the content of a file directory. More... | |||
List< FileDirectoryEntry > | GetFileDirectoryEx (string directoryName, string continueAfter, out bool moreFollows) | ||
Read the content of a file directory. - single request version More... | |||
delegate bool | GetFileHandler (object parameter, byte[] data) | ||
void | GetFile (string fileName, GetFileHandler handler, object parameter) | ||
Download a file from the server. More... | |||
void | SetFilestoreBasepath (string basepath) | ||
Set the virtual filestore basepath for the setFile service More... | |||
void | SetFile (string sourceFilename, string destinationFilename) | ||
Upload a file to the server. More... | |||
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 More... | |||
UInt32 | GetFileAsync (string fileName, GetFileAsyncHandler handler, object parameter) | ||
Download a file from the server. More... | |||
void | Abort () | ||
Abort (close) the connection. More... | |||
void | AbortAsync () | ||
Abort (close) the connection - asynchronous version More... | |||
void | Release () | ||
Release (close) the connection. More... | |||
void | ReleaseAsync () | ||
Release (close) the connection - asynchronous version More... | |||
void | Close () | ||
Immediately close the connection. More... | |||
void | InstallConnectionClosedHandler (ConnectionClosedHandler handler) | ||
Install a callback handler that will be invoked if the connection is closed. More... | |||
void | InstallStateChangedHandler (StateChangedHandler handler) | ||
Sets the handler for StateChanged events More... | |||
DataSet | GetDataSetValues (string dataSetReference) | ||
Read the values of a data set (GetDataSetValues service). More... | |||
DataSet | ReadDataSetValues (string dataSetReference, DataSet dataSet) | ||
Read the values of a data set (GetDataSetValues service). More... | |||
List< MmsDataAccessError > | WriteDataSetValues (string dataSetReference, List< MmsValue > values) | ||
Writes the values of a data set (SetDataSetValues service). More... | |||
void | CreateDataSet (string dataSetReference, List< string > dataSetElements) | ||
Create a new data set. More... | |||
UInt32 | CreateDataSetAsync (string dataSetReference, List< string > dataSetElements, GenericServiceHandler handler, object parameter) | ||
Create a new data set - asynchronous version. More... | |||
bool | DeleteDataSet (string dataSetReference) | ||
Delete a data set. More... | |||
UInt32 | DeleteDataSetAsync (string dataSetReference, GenericServiceHandler handler, object parameter) | ||
Delete a data set - asynchronous version. More... | |||
List< string > | GetDataSetDirectory (string dataSetReference) | ||
Get the directory of the data set. More... | |||
List< string > | GetDataSetDirectory (string dataSetReference, out bool isDeletable) | ||
Get the directory of the data set. More... | |||
delegate void | GetDataSetDirectoryHandler (UInt32 invokeId, object parameter, IedClientError err, List< string > dataSetDirectory, bool isDeletable) | ||
Get data set directory handler. More... | |||
UInt32 | GetDataSetDirectoryAsync (string dataSetReference, GetDataSetDirectoryHandler handler, object parameter) | ||
Read the data set directory - asynchronous version More... | |||
delegate void | ReadValueHandler (UInt32 invokeId, object parameter, IedClientError err, MmsValue value) | ||
Read object handler. More... | |||
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 More... | |||
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 More... | |||
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 More... | |||
delegate void | WriteValueHandler (UInt32 invokeId, object parameter, IedClientError err) | ||
Write value handler. More... | |||
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) More... | |||
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) More... | |||
UInt32 | QueryLogByTimeAsync (string logRef, DateTime startTime, DateTime stopTime, QueryLogHandler handler, object parameter) | ||
Queries all log entries of the given time range (asynchronous version) More... | |||
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) More... | |||
ReportControlBlock | GetReportControlBlock (string rcbObjectReference) | ||
Properties | |
UInt32 | ConnectTimeout [get, set] |
Gets or sets the timeout used for connection attempts. More... | |
UInt32 | RequestTimeout [get, set] |
Gets or sets the request timeout for this connection More... | |
int | MaxPduSize [get, set] |
Gets or sets the maximum size if a PDU (has to be set before calling connect!). More... | |
StateChangedHandler | StateChanged [set] |
Sets the handler for StateChanged events More... | |
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, |
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.Connect | ( | string | hostname | ) |
Establish an MMS connection to a server.
IedConnectionException | This exception is thrown if there is a connection or service error. |
delegate void IEC61850.Client.IedConnection.ConnectionClosedHandler | ( | IedConnection | connection | ) |
Called when the connection is closed
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 |
GooseControlBlock IEC61850.Client.IedConnection.GetGooseControlBlock | ( | string | gocbObjectReference | ) |
Creates a new SampledValuesControlBlock instance.
gocbObjectReference | The object reference of the GoCB (e.g. "simpleIOGenericIO/LLN0.gcbAnalogValues") |
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.
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 |
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.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, |
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 |
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 |
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 |
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 |
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 |
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.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 |
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