https://github.com/minhdtb/iec-60870
.NET implementation of IEC-60870 104
https://github.com/minhdtb/iec-60870
60870 c-sharp csharp dot-net iec iec-60870-5-104 iec61850
Last synced: 13 days ago
JSON representation
.NET implementation of IEC-60870 104
- Host: GitHub
- URL: https://github.com/minhdtb/iec-60870
- Owner: minhdtb
- License: gpl-3.0
- Archived: true
- Created: 2015-11-23T04:45:57.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2019-08-20T07:09:57.000Z (about 6 years ago)
- Last Synced: 2025-08-20T13:37:57.826Z (about 2 months ago)
- Topics: 60870, c-sharp, csharp, dot-net, iec, iec-60870-5-104, iec61850
- Language: C#
- Homepage:
- Size: 122 KB
- Stars: 48
- Watchers: 18
- Forks: 37
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: license.txt
Awesome Lists containing this project
README
# [IEC-60870](https://github.com/minhdtb/IEC-60870/)
IEC-60870 is C# version of [OpenMUC IEC-60870 library](https://www.openmuc.org/)
## Installation
A [nuget package](https://www.nuget.org/packages/IEC60870/) is available for the library. To install `IEC60870 Library`, run the following command in the Package Manager Console:PM> Install-Package IEC60870
## Examples (updated for version 1.2)
### Client
Write your simple client application (master) like this
```csharp
var client = new ClientSAP("127.0.0.1", 2404);
client.NewASdu += asdu => {
// process received Asdu
client.SendASdu(asdu);
};client.ConnectionClosed += e =>
{
Console.WriteLine(e);
};client.Connect();
```### Server
and if you want to create server application (slave), you must use ServerSAP instead of ClientSAP
```csharp
var server = new ServerSAP("127.0.0.1", 2405);
server.StartListen(10);
server.SendASdu(asdu);
server.NewASdu += asdu =>
{
Console.WriteLine(asdu);
};
```