lib60870.NET  2.2.0
IEC 60870-5-101/104 Protocol Source Code Library for C#/.NET
lib60870.CS104 Namespace Reference

Classes

class  APCIParameters
 Parameters for the CS 104 APCI (Application Protocol Control Information) More...
 
class  ASDUQueue
 
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  ConnectionEvent {
  ConnectionEvent.OPENED = 0, ConnectionEvent.CLOSED = 1, ConnectionEvent.STARTDT_CON_RECEIVED = 2, ConnectionEvent.STOPDT_CON_RECEIVED = 3,
  ConnectionEvent.CONNECT_FAILED = 4
}
 Connection event for CS 104 client (Connection) More...
 
enum  ClientConnectionEvent { ClientConnectionEvent.OPENED, ClientConnectionEvent.ACTIVE, ClientConnectionEvent.INACTIVE, ClientConnectionEvent.CLOSED }
 Connection events for the Server More...
 
enum  ServerMode { ServerMode.SINGLE_REDUNDANCY_GROUP, ServerMode.CONNECTION_IS_REDUNDANCY_GROUP, ServerMode.MULTIPLE_REDUNDANCY_GROUPS }
 Server mode (redundancy group support) More...
 
enum  EnqueueMode { EnqueueMode.REMOVE_OLDEST, EnqueueMode.IGNORE, EnqueueMode.THROW_EXCEPTION }
 Specifies queue behavior when queue is full More...
 

Functions

delegate bool ASDUReceivedHandler (object parameter, ASDU asdu)
 ASDU received handler. More...
 
delegate void ConnectionHandler (object parameter, ConnectionEvent connectionEvent)
 Callback handler for connection events More...
 
delegate bool ConnectionRequestHandler (object parameter, IPAddress ipAddress)
 Connection request handler is called when a client tries to connect to the server. More...
 
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 enterend 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

◆ ASDUReceivedHandler()

delegate bool lib60870.CS104.ASDUReceivedHandler ( object  parameter,
ASDU  asdu 
)

ASDU received handler.

◆ ConnectionHandler()

delegate void lib60870.CS104.ConnectionHandler ( object  parameter,
ConnectionEvent  connectionEvent 
)

Callback handler for connection events

◆ 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