Skip to content

Commit 8f9f194

Browse files
committed
- updated user guide
1 parent 8987d53 commit 8f9f194

File tree

1 file changed

+57
-6
lines changed

1 file changed

+57
-6
lines changed

user_guide_dotnet.adoc

Lines changed: 57 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
= lib60870.NET 2.1 User Guide
1+
= lib60870.NET 2.2 User Guide
22
Michael Zillgith
33

44
== Introduction
55

6-
lib60870.NET is a new implementation of the IEC 60870-5 protocol for client (master station) and server (controlled station). The library implements all data types of the IEC 60870-5-101/104 specifications. *lib60870.NET* is a pure C#/.NET implementation. It is designed to be as easy to use as possible. Since it is using only standardized .NET features it is compatible with Windows systems and the Microsoft .NET implementation as well as on Linux and other operating systems running with Mono.
6+
lib60870.NET is an implementation of the IEC 60870-5 protocol for client (master station) and server (controlled station).
7+
The library implements all data types of the IEC 60870-5-101/104 specifications. *lib60870.NET* is a pure C#/.NET implementation.
8+
It is designed to be as easy to use as possible. Since it is using only standardized .NET features it is compatible with Windows systems
9+
and the Microsoft .NET implementation as well as on Linux and other operating systems running with Mono.
710

811
The client/server API is strictly asynchronous. You send the requests with non-blocking functions and will have to handle the response and other events in callback functions.
912

@@ -13,12 +16,14 @@ The list of supported features:
1316
* CS 104 (IEC 60870-5-104) client and server TCP/IP communication
1417
* CS 104 supports encrypted and authenticated TLS communication
1518
* CS 104 uses the CS 101 application layer
19+
* CS 104 slave supports multiple redundancy groups
1620
* Master/Client supports sending system commands, process commands, parameter commands, and data messages in reverse direction.
1721
* Slave/Server supports sending data messages in monitoring direction and commands in reverse direction
1822
* The list of supported ASDU types can be found in the annex
1923
* The library supports user defined private ASDU types
2024
* transmission of transparent files
2125
* CS 101 protocol over TCP/IP (client/server)
26+
* Support for .NET Standard, Mono, and .NET core 2.0
2227

2328
*NOTE:* CS stands for "companion standard" and specifies variants of the communication protocols and services defined in the IEC 60870-5 standard series.
2429

@@ -227,15 +232,61 @@ After the server instance is created it can be configured
227232

228233
=== Server mode
229234

230-
The server provides two different modes.
235+
The server provides three different modes.
231236

232-
The default mode (_SINGLE_REDUNDANCY_GROUP_) allows only a *single active client connection*. An active client connection is a connection where ASDUs are sent. All other connections are standby connections. There is a single queue for events. Events are also stored when no client is connected or when no connection is active.
237+
The default mode (_SINGLE_REDUNDANCY_GROUP_) allows only a *single active client connection*. An active client connection is a connection
238+
where ASDUs (application data units) are sent. All other connections are only standby connections that don't send application layer data.
239+
There is a single queue for events. Events are also stored when no client is connected or when no connection is active.
240+
241+
242+
The second mode (_CONNECTION_IS_REDUNDANCY_GROUP_) allows *multiple active client connections*. Every connection has its own event queue.
243+
The event queue will be deleted when the client connection is closed. This mode can be used when more than one client has to access the
244+
application data. This mode is easy to use. But the drawback of this mode is that events are lost when no client is connected.
245+
246+
The third mode (_MULTIPLE_REDUNDANCY_GROUPS_) allows *multiple active client connections* while preserving events when no client is
247+
connected. In this mode clients can be assigned to specific redundancy groups. The assignment is based on the IP address of the client.
248+
A redundancy group can have multiple simultaneous connections but only one of these connections can be active. The number of activated
249+
connections is restricted by the number of redundancy groups. Each redundancy group has a dedicated event queue.
233250

234-
The second mode (_CONNECION_IS_REDUNDANCY_GROUP_) allows *multiple active client connections*. Every connection has its own event queue. The event queue will be deleted when the client connection is closed. This mode has to be used when more then one client has to access the application data.
235251

236252
The server mode can be set with the _ServerMode_ property of the _Server_ class.
237253

238-
server.ServerMode = ServerMode.CONNECION_IS_REDUNDANCY_GROUP;
254+
server.ServerMode = ServerMode.CONNECTION_IS_REDUNDANCY_GROUP;
255+
256+
=== Define multiple redundancy groups
257+
258+
Redundancy groups only have to be created explicitly when using the servermode _MULTIPLE_REDUNDANCY_GROUPS_. You can assign multiple
259+
IP addresses to a redundancy group. Incoming connections from one of these IP addresses will then automatically be assigned to this
260+
redundancy group.
261+
262+
When a redundancy group has no assigned IP address it works as a "catch all" group. This means that all incoming connections that
263+
are not assigned to one of the other groups will end up in this group.
264+
265+
[[app-listing]]
266+
[source, csharp]
267+
.Example how to define multipe redundancy groups
268+
----
269+
/* Configure a server with three redundancy groups */
270+
271+
server.ServerMode = ServerMode.MULTIPLE_REDUNDANCY_GROUPS;
272+
273+
RedundancyGroup redGroup1 = new RedundancyGroup("red-group-1");
274+
redGroup1.AddAllowedClient("192.168.2.9");
275+
276+
RedundancyGroup redGroup2 = new RedundancyGroup("red-group-2");
277+
redGroup2.AddAllowedClient("192.168.2.223");
278+
redGroup2.AddAllowedClient("192.168.2.222");
279+
280+
/* add a "catch all" redundancy groups - all other connections are handled by this group */
281+
RedundancyGroup redGroup3 = new RedundancyGroup("catch all");
282+
283+
server.AddRedundancyGroup(redGroup1);
284+
server.AddRedundancyGroup(redGroup2);
285+
server.AddRedundancyGroup(redGroup3);
286+
----
287+
288+
289+
239290

240291
=== Restrict the number of client connections
241292

0 commit comments

Comments
 (0)