lib60870.NET 2.3.0
IEC 60870-5-101/104 Protocol Source Code Library for C#/.NET
|
Represents a client (master) connection. More...
Public Member Functions | |
ApplicationLayerParameters | GetApplicationLayerParameters () |
Gets the connection parameters. | |
bool | MasterConnection_hasUnconfirmedMessages () |
Checks if there are any unconfirmed messages in the low-priority or high-priority queues. | |
void | SendASDU (ASDU asdu) |
Send a response ASDU over this connection. | |
void | SendACT_CON (ASDU asdu, bool negative) |
Sends an Activation Confirmation (ACT_CON) ASDU with the specified negative flag. | |
void | SendACT_TERM (ASDU asdu) |
Sends an Activation Termination (ACT_TERM) ASDU with a negative flag set to false. | |
bool | CertificateValidationCallback (object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors sslPolicyErrors) |
Callback method to handle certificate validation in SSL/TLS communication. It checks various conditions such as certificate chain validation, specific certificate validation, and SSL policy errors to determine whether the certificate is valid for the current connection. | |
void | Close () |
void | ASDUReadyToSend () |
Properties | |
IPEndPoint | RemoteEndpoint [get] |
Gets the remote endpoint (client IP address and TCP port) | |
bool | IsActive [get, set] |
Gets or sets a value indicating whether this connection is active. The active connection is the only connection that is answering application layer requests and sends cyclic, and spontaneous messages. | |
MasterConnectionState | State [get, set] |
Represents a client (master) connection.
bool lib60870.CS104.ClientConnection.CertificateValidationCallback | ( | object | sender, |
X509Certificate | cert, | ||
X509Chain | chain, | ||
SslPolicyErrors | sslPolicyErrors ) |
Callback method to handle certificate validation in SSL/TLS communication. It checks various conditions such as certificate chain validation, specific certificate validation, and SSL policy errors to determine whether the certificate is valid for the current connection.
sender | The source of the event. This is typically the SSL/TLS connection. |
cert | The certificate being validated. |
chain | The certificate chain associated with the certificate. |
sslPolicyErrors | The SSL policy errors that occurred during certificate validation. |
true
if the certificate is considered valid based on the specified criteria; otherwise, returns false
. ApplicationLayerParameters lib60870.CS104.ClientConnection.GetApplicationLayerParameters | ( | ) |
Gets the connection parameters.
Implements lib60870.CS101.IMasterConnection.
bool lib60870.CS104.ClientConnection.MasterConnection_hasUnconfirmedMessages | ( | ) |
Checks if there are any unconfirmed messages in the low-priority or high-priority queues.
true
if there are unconfirmed messages in either the low-priority or high-priority queues; false
if no unconfirmed messages are found. void lib60870.CS104.ClientConnection.SendACT_CON | ( | ASDU | asdu, |
bool | negative ) |
Sends an Activation Confirmation (ACT_CON) ASDU with the specified negative flag.
asdu | The ASDU to be sent as an Activation Confirmation (ACT_CON). |
negative | A boolean flag indicating whether the Activation Confirmation is negative. |
Implements lib60870.CS101.IMasterConnection.
void lib60870.CS104.ClientConnection.SendACT_TERM | ( | ASDU | asdu | ) |
Sends an Activation Termination (ACT_TERM) ASDU with a negative flag set to false.
asdu | The ASDU to be sent as an Activation Termination (ACT_TERM). |
Implements lib60870.CS101.IMasterConnection.
void lib60870.CS104.ClientConnection.SendASDU | ( | ASDU | asdu | ) |
Send a response ASDU over this connection.
ConnectionException | Throws an exception if the connection is no longer active (e.g. because it has been closed by the other side). |
asdu | The ASDU to send |
Implements lib60870.CS101.IMasterConnection.
|
getset |
Gets or sets a value indicating whether this connection is active. The active connection is the only connection that is answering application layer requests and sends cyclic, and spontaneous messages.
true
if this instance is active; otherwise, false
.
|
get |
Gets the remote endpoint (client IP address and TCP port)
The remote IP endpoint