lib60870.NET 2.3.0
IEC 60870-5-101/104 Protocol Source Code Library for C#/.NET
Loading...
Searching...
No Matches
lib60870.CS104 Namespace Reference

Classes

class  APCIParameters
 Parameters for the CS 104 APCI (Application Protocol Control Information) More...
 
class  ClientConnection
 Represents a client (master) connection. More...
 
class  Connection
 A single connection to a CS 104 (IEC 60870-5-104) server. Implements the Master interface. More...
 
class  ConnectionStatistics
 Provides some Connection statistics. More...
 
class  RedundancyGroup
 Representation of a redundancy group. A redundancy group is a group of connections that share a unique event queue. Only one connection in a redundancy group can be active. More...
 
class  Server
 This class represents a single IEC 60870-5 server (slave or controlled station). It is also the main access to the CS 104 server API. More...
 
class  TlsSecurityInformation
 

Enumerations

enum  MasterConnectionState { M_CON_STATE_STOPPED = 0 , M_CON_STATE_STARTED = 1 , M_CON_STATE_UNCONFIRMED_STOPPED = 2 }
 
enum  ConnectionEvent {
  OPENED = 0 , CLOSED = 1 , STARTDT_CON_RECEIVED = 2 , STOPDT_CON_RECEIVED = 3 ,
  CONNECT_FAILED = 4
}
 Connection event for CS 104 client (Connection) More...
 
enum  CS104_ConState {
  STATE_IDLE = 0 , STATE_INACTIVE = 1 , STATE_ACTIVE = 2 , STATE_WAITING_FOR_STARTDT_CON = 3 ,
  STATE_WAITING_FOR_STOPDT_CON = 4
}
 
enum  ClientConnectionEvent { OPENED , ACTIVE , INACTIVE , CLOSED }
 Connection events for the Server. More...
 
enum  ServerMode { SINGLE_REDUNDANCY_GROUP , CONNECTION_IS_REDUNDANCY_GROUP , MULTIPLE_REDUNDANCY_GROUPS }
 Server mode (redundancy group support) More...
 
enum  EnqueueMode { REMOVE_OLDEST , IGNORE , THROW_EXCEPTION }
 Specifies queue behavior when queue is full. More...
 

Functions

delegate bool ASDUReceivedHandler (object parameter, ASDU asdu)
 ASDU received handler.
 
delegate void ConnectionHandler (object parameter, ConnectionEvent connectionEvent)
 Callback handler for connection events.
 
delegate bool ConnectionRequestHandler (object parameter, IPAddress ipAddress)
 Connection request handler is called when a client tries to connect to the server.
 
delegate void ConnectionEventHandler (object parameter, ClientConnection connection, ClientConnectionEvent eventType)
 

Enumeration Type Documentation

◆ ClientConnectionEvent

Connection events for the Server.

Enumerator
OPENED 

A new connection is opened.

ACTIVE 

The connection entered active state.

INACTIVE 

The connection entered inactive state.

CLOSED 

The connection is closed.

◆ ConnectionEvent

Connection event for CS 104 client (Connection)

Enumerator
OPENED 

The connection has been opened.

CLOSED 

The connection has been closed.

STARTDT_CON_RECEIVED 

Conformation of START DT command received (server will send and accept application layer messages)

STOPDT_CON_RECEIVED 

Conformation of STOP DT command received (server will no longer send or accept application layer messages)

CONNECT_FAILED 

The connect attempt has failed.

◆ EnqueueMode

Specifies queue behavior when queue is full.

Enumerator
REMOVE_OLDEST 

Remove the oldest ASDU from the queue and add the new ASDU.

IGNORE 

Don't add the new ASDU when the queue is full.

THROW_EXCEPTION 

Don't add the new ASDU when the queue is full and throw an exception.

◆ ServerMode

Server mode (redundancy group support)

Enumerator
SINGLE_REDUNDANCY_GROUP 

There is only one redundancy group. There can only be one active connections. All other connections are standy connections.

CONNECTION_IS_REDUNDANCY_GROUP 

Every connection is an own redundancy group. This enables simple multi-client server.

MULTIPLE_REDUNDANCY_GROUPS 

Mutliple redundancy groups. Each redundancy group can have only a single active connection. Each redundancy group has its own event queue.

Function Documentation

◆ ConnectionRequestHandler()

delegate bool lib60870.CS104.ConnectionRequestHandler ( object parameter,
IPAddress ipAddress )

Connection request handler is called when a client tries to connect to the server.

Parameters
parameterUser provided parameter
ipAddressIP address of the connecting client
Returns
true if the connection has to be accepted, false otherwise