Skip to main content
summaryrefslogtreecommitdiffstats
stat options
Period:
Authors:

Commits per author per week (path 'plugins/org.eclipse.osee.ats.presenter.test')

AuthorW11 2020W12 2020W13 2020W14 2020Total
Total00000

Back to the top

s='mode'>-rw-r--r--org.eclipse.scada.da.server.exporter.iec60870/.gitignore3
-rw-r--r--org.eclipse.scada.da.server.exporter.iec60870/.project33
-rw-r--r--org.eclipse.scada.da.server.exporter.iec60870/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--org.eclipse.scada.da.server.exporter.iec60870/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--org.eclipse.scada.da.server.exporter.iec60870/META-INF/MANIFEST.MF38
-rw-r--r--org.eclipse.scada.da.server.exporter.iec60870/OSGI-INF/factory.xml9
-rw-r--r--org.eclipse.scada.da.server.exporter.iec60870/about.html28
-rw-r--r--org.eclipse.scada.da.server.exporter.iec60870/build.properties16
-rw-r--r--org.eclipse.scada.da.server.exporter.iec60870/pom.xml13
-rw-r--r--org.eclipse.scada.da.server.exporter.iec60870/src/org/eclipse/scada/da/server/exporter/iec60870/DataModelImpl.java707
-rw-r--r--org.eclipse.scada.da.server.exporter.iec60870/src/org/eclipse/scada/da/server/exporter/iec60870/ExportConfiguration.java281
-rw-r--r--org.eclipse.scada.da.server.exporter.iec60870/src/org/eclipse/scada/da/server/exporter/iec60870/ExporterFactoryImpl.java82
-rw-r--r--org.eclipse.scada.da.server.exporter.iec60870/src/org/eclipse/scada/da/server/exporter/iec60870/IecExport.java141
-rw-r--r--org.eclipse.scada.da.server.exporter.iec60870/src/org/eclipse/scada/da/server/exporter/iec60870/InformationBean.java87
-rw-r--r--org.eclipse.scada.da.server.exporter.iec60870/src/org/eclipse/scada/da/server/exporter/iec60870/MappingEntry.java117
-rw-r--r--org.eclipse.scada.da.server.exporter.iec60870/test/test.ca.txt10
-rw-r--r--org.eclipse.scada.da.server.iec60870/.classpath7
-rw-r--r--org.eclipse.scada.da.server.iec60870/.gitignore2
-rw-r--r--org.eclipse.scada.da.server.iec60870/.project33
-rw-r--r--org.eclipse.scada.da.server.iec60870/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--org.eclipse.scada.da.server.iec60870/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--org.eclipse.scada.da.server.iec60870/META-INF/MANIFEST.MF43
-rw-r--r--org.eclipse.scada.da.server.iec60870/OSGI-INF/hive.xml8
-rw-r--r--org.eclipse.scada.da.server.iec60870/about.html28
-rw-r--r--org.eclipse.scada.da.server.iec60870/build.properties16
-rw-r--r--org.eclipse.scada.da.server.iec60870/pom.xml13
-rw-r--r--org.eclipse.scada.da.server.iec60870/src/org/eclipse/scada/da/server/iec60870/ClientState.java32
-rw-r--r--org.eclipse.scada.da.server.iec60870/src/org/eclipse/scada/da/server/iec60870/Connection.java414
-rw-r--r--org.eclipse.scada.da.server.iec60870/src/org/eclipse/scada/da/server/iec60870/ConnectionConfiguration.java59
-rw-r--r--org.eclipse.scada.da.server.iec60870/src/org/eclipse/scada/da/server/iec60870/Hive.java198
-rw-r--r--org.eclipse.scada.da.server.iec60870/src/org/eclipse/scada/da/server/iec60870/cfg/CAConfigurationFactory.java129
-rw-r--r--org.eclipse.scada.da.server.iec60870/src/org/eclipse/scada/da/server/iec60870/cfg/ConfigurationFactory.java27
-rw-r--r--org.eclipse.scada.da.server.iec60870/test/test.ca.txt7
46 files changed, 0 insertions, 2792 deletions
diff --git a/org.eclipse.scada.core-parent/pom.xml b/org.eclipse.scada.core-parent/pom.xml
index 09247a74..f451d384 100644
--- a/org.eclipse.scada.core-parent/pom.xml
+++ b/org.eclipse.scada.core-parent/pom.xml
@@ -260,12 +260,6 @@
<module>../org.eclipse.scada.core.common.feature</module>
<module>../org.eclipse.scada.core.server.feature</module>
- <!-- iec 60870 -->
-
- <module>../org.eclipse.scada.da.server.iec60870</module>
- <module>../org.eclipse.scada.da.server.exporter.iec60870</module>
- <module>../org.eclipse.scada.core.common.iec60870</module>
-
<!-- testing -->
<module>../org.eclipse.scada.ae.tests</module>
diff --git a/org.eclipse.scada.core.common.iec60870/.classpath b/org.eclipse.scada.core.common.iec60870/.classpath
deleted file mode 100644
index 098194ca..00000000
--- a/org.eclipse.scada.core.common.iec60870/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.scada.core.common.iec60870/.gitignore b/org.eclipse.scada.core.common.iec60870/.gitignore
deleted file mode 100644
index bb5e943d..00000000
--- a/org.eclipse.scada.core.common.iec60870/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/bin
-/target \ No newline at end of file
diff --git a/org.eclipse.scada.core.common.iec60870/.project b/org.eclipse.scada.core.common.iec60870/.project
deleted file mode 100644
index c72bb65d..00000000
--- a/org.eclipse.scada.core.common.iec60870/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.scada.core.common.iec60870</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.scada.core.common.iec60870/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.scada.core.common.iec60870/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f42de363..00000000
--- a/org.eclipse.scada.core.common.iec60870/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
diff --git a/org.eclipse.scada.core.common.iec60870/.settings/org.eclipse.pde.core.prefs b/org.eclipse.scada.core.common.iec60870/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index e8ff8be0..00000000
--- a/org.eclipse.scada.core.common.iec60870/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-eclipse.preferences.version=1
-pluginProject.equinox=false
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/org.eclipse.scada.core.common.iec60870/META-INF/MANIFEST.MF b/org.eclipse.scada.core.common.iec60870/META-INF/MANIFEST.MF
deleted file mode 100644
index f72fb7d1..00000000
--- a/org.eclipse.scada.core.common.iec60870/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,11 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Common Core Functionality for IEC60870
-Bundle-SymbolicName: org.eclipse.scada.core.common.iec60870
-Bundle-Version: 0.2.0.qualifier
-Bundle-Vendor: Eclipse SCADA Project
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Import-Package: org.eclipse.scada.ca;version="0.2.0",
- org.eclipse.scada.protocol.iec60870;version="0.2.0",
- org.eclipse.scada.utils.beans;version="0.2.0"
-Export-Package: org.eclipse.scada.core.common.iec60870;version="0.2.0";uses:="org.eclipse.scada.ca,org.eclipse.scada.protocol.iec60870"
diff --git a/org.eclipse.scada.core.common.iec60870/about.html b/org.eclipse.scada.core.common.iec60870/about.html
deleted file mode 100644
index 4e235c8e..00000000
--- a/org.eclipse.scada.core.common.iec60870/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>September 10, 2013</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/org.eclipse.scada.core.common.iec60870/build.properties b/org.eclipse.scada.core.common.iec60870/build.properties
deleted file mode 100644
index b745a4f0..00000000
--- a/org.eclipse.scada.core.common.iec60870/build.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-###############################################################################
-# Copyright (c) 2014 IBH SYSTEMS GmbH and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBH SYSTEMS GmbH - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html
diff --git a/org.eclipse.scada.core.common.iec60870/pom.xml b/org.eclipse.scada.core.common.iec60870/pom.xml
deleted file mode 100644
index c761651f..00000000
--- a/org.eclipse.scada.core.common.iec60870/pom.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-<modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.scada.core-parent</artifactId>
- <groupId>org.eclipse.scada.core</groupId>
- <version>0.2.0-SNAPSHOT</version>
- <relativePath>../org.eclipse.scada.core-parent</relativePath>
- </parent>
- <groupId>org.eclipse.scada.core</groupId>
- <artifactId>org.eclipse.scada.core.common.iec60870</artifactId>
- <version>0.2.0-SNAPSHOT</version>
- <packaging>eclipse-plugin</packaging>
-</project> \ No newline at end of file
diff --git a/org.eclipse.scada.core.common.iec60870/src/org/eclipse/scada/core/common/iec60870/Configurations.java b/org.eclipse.scada.core.common.iec60870/src/org/eclipse/scada/core/common/iec60870/Configurations.java
deleted file mode 100644
index 08210803..00000000
--- a/org.eclipse.scada.core.common.iec60870/src/org/eclipse/scada/core/common/iec60870/Configurations.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 IBH SYSTEMS GmbH and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBH SYSTEMS GmbH - initial API and implementation
- *******************************************************************************/
-package org.eclipse.scada.core.common.iec60870;
-
-import org.eclipse.scada.ca.ConfigurationDataHelper;
-import org.eclipse.scada.protocol.iec60870.ASDUAddressType;
-import org.eclipse.scada.protocol.iec60870.CauseOfTransmissionType;
-import org.eclipse.scada.protocol.iec60870.InformationObjectAddressType;
-import org.eclipse.scada.protocol.iec60870.ProtocolOptions;
-import org.eclipse.scada.protocol.iec60870.ProtocolOptions.Builder;
-
-public final class Configurations
-{
-
- public static ProtocolOptions.Builder parseProtocolOptions ( final ConfigurationDataHelper cfg )
- {
- final ProtocolOptions.Builder optionsBuilder = new Builder ();
-
- optionsBuilder.setTimeout1 ( cfg.getInteger ( "t1", optionsBuilder.getTimeout1 () ) ); //$NON-NLS-1$
- optionsBuilder.setTimeout2 ( cfg.getInteger ( "t2", optionsBuilder.getTimeout2 () ) ); //$NON-NLS-1$
- optionsBuilder.setTimeout3 ( cfg.getInteger ( "t3", optionsBuilder.getTimeout3 () ) ); //$NON-NLS-1$
- optionsBuilder.setAdsuAddressType ( cfg.getEnum ( "asduAddressType", ASDUAddressType.class, ASDUAddressType.SIZE_2 ) ); //$NON-NLS-1$
- optionsBuilder.setCauseOfTransmissionType ( cfg.getEnum ( "causeOfTransmissionType", CauseOfTransmissionType.class, CauseOfTransmissionType.SIZE_2 ) ); //$NON-NLS-1$
- optionsBuilder.setInformationObjectAddressType ( cfg.getEnum ( "informationObjectAddressType", InformationObjectAddressType.class, InformationObjectAddressType.SIZE_3 ) ); //$NON-NLS-1$
- optionsBuilder.setAcknowledgeWindow ( (short)cfg.getInteger ( "w", optionsBuilder.getAcknowledgeWindow () ) ); //$NON-NLS-1$
- optionsBuilder.setMaxUnacknowledged ( (short)cfg.getInteger ( "k", optionsBuilder.getMaxUnacknowledged () ) ); //$NON-NLS-1$
- optionsBuilder.setTimeZone ( cfg.getTimeZone ( "timeZone", null ) ); //$NON-NLS-1$
- optionsBuilder.setIgnoreDaylightSavingTime ( cfg.getBoolean ( "ignoreDaylightSavingTime", false ) ); //$NON-NLS-1$
-
- return optionsBuilder;
- }
-
-}
diff --git a/org.eclipse.scada.core.server.feature/feature.xml b/org.eclipse.scada.core.server.feature/feature.xml
index 1892d30a..23f76d09 100644
--- a/org.eclipse.scada.core.server.feature/feature.xml
+++ b/org.eclipse.scada.core.server.feature/feature.xml
@@ -823,26 +823,6 @@
unpack="false"/>
<plugin
- id="org.eclipse.scada.da.server.exporter.iec60870"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.scada.core.common.iec60870"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.scada.da.server.iec60870"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
id="org.eclipse.scada.ae.server.injector"
download-size="0"
install-size="0"
diff --git a/org.eclipse.scada.da.server.exporter.iec60870/.classpath b/org.eclipse.scada.da.server.exporter.iec60870/.classpath
deleted file mode 100644
index 098194ca..00000000
--- a/org.eclipse.scada.da.server.exporter.iec60870/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.scada.da.server.exporter.iec60870/.gitignore b/org.eclipse.scada.da.server.exporter.iec60870/.gitignore
deleted file mode 100644
index 19a6cd23..00000000
--- a/org.eclipse.scada.da.server.exporter.iec60870/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-/bin
-/target
-/test.ca.txt
diff --git a/org.eclipse.scada.da.server.exporter.iec60870/.project b/org.eclipse.scada.da.server.exporter.iec60870/.project
deleted file mode 100644
index 31a29114..00000000
--- a/org.eclipse.scada.da.server.exporter.iec60870/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.scada.da.server.exporter.iec60870</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ds.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.scada.da.server.exporter.iec60870/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.scada.da.server.exporter.iec60870/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f42de363..00000000
--- a/org.eclipse.scada.da.server.exporter.iec60870/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
diff --git a/org.eclipse.scada.da.server.exporter.iec60870/.settings/org.eclipse.pde.core.prefs b/org.eclipse.scada.da.server.exporter.iec60870/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index e8ff8be0..00000000
--- a/org.eclipse.scada.da.server.exporter.iec60870/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-eclipse.preferences.version=1
-pluginProject.equinox=false
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/org.eclipse.scada.da.server.exporter.iec60870/META-INF/MANIFEST.MF b/org.eclipse.scada.da.server.exporter.iec60870/META-INF/MANIFEST.MF
deleted file mode 100644
index f1b31367..00000000
--- a/org.eclipse.scada.da.server.exporter.iec60870/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,38 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: IEC6870-5-104 Exporter
-Bundle-SymbolicName: org.eclipse.scada.da.server.exporter.iec60870
-Bundle-Version: 0.2.0.qualifier
-Bundle-Vendor: Eclipse SCADA Project
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Import-Package: com.google.common.base;version="12.0.0",
- com.google.common.util.concurrent;version="12.0.0",
- org.eclipse.scada.ca;version="0.2.0",
- org.eclipse.scada.ca.common.factory;version="0.1.0",
- org.eclipse.scada.core;version="0.1.0",
- org.eclipse.scada.core.common.iec60870;version="0.2.0",
- org.eclipse.scada.core.data;version="0.1.0",
- org.eclipse.scada.core.server;version="0.1.0",
- org.eclipse.scada.da.client;version="0.1.0",
- org.eclipse.scada.da.core;version="0.1.0",
- org.eclipse.scada.da.core.server;version="0.1.0",
- org.eclipse.scada.da.server.common;version="0.1.0",
- org.eclipse.scada.da.server.common.exporter;version="0.1.0",
- org.eclipse.scada.da.server.common.item.factory;version="0.1.0",
- org.eclipse.scada.da.server.common.osgi.factory;version="0.1.0",
- org.eclipse.scada.da.server.exporter.common;version="0.2.0",
- org.eclipse.scada.protocol.iec60870;version="0.2.0",
- org.eclipse.scada.protocol.iec60870.asdu;version="0.2.0",
- org.eclipse.scada.protocol.iec60870.asdu.types;version="0.2.0",
- org.eclipse.scada.protocol.iec60870.io;version="0.2.0",
- org.eclipse.scada.protocol.iec60870.server;version="0.2.0",
- org.eclipse.scada.protocol.iec60870.server.data;version="0.2.0",
- org.eclipse.scada.protocol.iec60870.server.data.event;version="0.2.0",
- org.eclipse.scada.sec;version="0.1.0",
- org.eclipse.scada.sec.osgi;version="0.1.0",
- org.eclipse.scada.utils.beans;version="0.1.0",
- org.eclipse.scada.utils.concurrent;version="0.1.0",
- org.eclipse.scada.utils.osgi.pool;version="0.1.0",
- org.osgi.framework;version="1.7.0",
- org.slf4j;version="1.7.2"
-Service-Component: OSGI-INF/factory.xml
diff --git a/org.eclipse.scada.da.server.exporter.iec60870/OSGI-INF/factory.xml b/org.eclipse.scada.da.server.exporter.iec60870/OSGI-INF/factory.xml
deleted file mode 100644
index ca4665f4..00000000
--- a/org.eclipse.scada.da.server.exporter.iec60870/OSGI-INF/factory.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" deactivate="dispose" immediate="false" name="org.eclipse.scada.da.server.exporter.iec60870">
- <implementation class="org.eclipse.scada.da.server.exporter.iec60870.ExporterFactoryImpl"/>
- <property name="factoryId" type="String" value="org.eclipse.scada.da.server.exporter.iec60870.device"/>
- <service>
- <provide interface="org.eclipse.scada.ca.ConfigurationFactory"/>
- </service>
- <property name="service.description" type="String" value="An IEC 60870-5-104 connection endpoint as controlled station."/>
-</scr:component>
diff --git a/org.eclipse.scada.da.server.exporter.iec60870/about.html b/org.eclipse.scada.da.server.exporter.iec60870/about.html
deleted file mode 100644
index 4e235c8e..00000000
--- a/org.eclipse.scada.da.server.exporter.iec60870/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>September 10, 2013</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/org.eclipse.scada.da.server.exporter.iec60870/build.properties b/org.eclipse.scada.da.server.exporter.iec60870/build.properties
deleted file mode 100644
index db26f0c4..00000000
--- a/org.eclipse.scada.da.server.exporter.iec60870/build.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2014 IBH SYSTEMS GmbH and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBH SYSTEMS GmbH - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- OSGI-INF/,\
- about.html
diff --git a/org.eclipse.scada.da.server.exporter.iec60870/pom.xml b/org.eclipse.scada.da.server.exporter.iec60870/pom.xml
deleted file mode 100644
index 0076492f..00000000
--- a/org.eclipse.scada.da.server.exporter.iec60870/pom.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-<modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.scada.core-parent</artifactId>
- <groupId>org.eclipse.scada.core</groupId>
- <version>0.2.0-SNAPSHOT</version>
- <relativePath>../org.eclipse.scada.core-parent</relativePath>
- </parent>
- <groupId>org.eclipse.scada.core</groupId>
- <artifactId>org.eclipse.scada.da.server.exporter.iec60870</artifactId>
- <version>0.2.0-SNAPSHOT</version>
- <packaging>eclipse-plugin</packaging>
-</project> \ No newline at end of file
diff --git a/org.eclipse.scada.da.server.exporter.iec60870/src/org/eclipse/scada/da/server/exporter/iec60870/DataModelImpl.java b/org.eclipse.scada.da.server.exporter.iec60870/src/org/eclipse/scada/da/server/exporter/iec60870/DataModelImpl.java
deleted file mode 100644
index b9160cc5..00000000
--- a/org.eclipse.scada.da.server.exporter.iec60870/src/org/eclipse/scada/da/server/exporter/iec60870/DataModelImpl.java
+++ /dev/null
@@ -1,707 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 IBH SYSTEMS GmbH and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBH SYSTEMS GmbH - initial API and implementation
- *******************************************************************************/
-package org.eclipse.scada.da.server.exporter.iec60870;
-
-import java.io.Serializable;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Properties;
-import java.util.Set;
-import java.util.SortedMap;
-import java.util.TreeMap;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-
-import org.eclipse.scada.core.NotConvertableException;
-import org.eclipse.scada.core.NullValueException;
-import org.eclipse.scada.core.Variant;
-import org.eclipse.scada.da.client.DataItemValue;
-import org.eclipse.scada.da.core.WriteResult;
-import org.eclipse.scada.da.server.exporter.common.HiveSource;
-import org.eclipse.scada.da.server.exporter.common.SingleSubscriptionManager;
-import org.eclipse.scada.da.server.exporter.common.SingleSubscriptionManager.Listener;
-import org.eclipse.scada.protocol.iec60870.asdu.ASDUHeader;
-import org.eclipse.scada.protocol.iec60870.asdu.types.ASDUAddress;
-import org.eclipse.scada.protocol.iec60870.asdu.types.CauseOfTransmission;
-import org.eclipse.scada.protocol.iec60870.asdu.types.InformationObjectAddress;
-import org.eclipse.scada.protocol.iec60870.asdu.types.QualityInformation;
-import org.eclipse.scada.protocol.iec60870.asdu.types.Value;
-import org.eclipse.scada.protocol.iec60870.io.MirrorCommand;
-import org.eclipse.scada.protocol.iec60870.server.data.AbstractBaseDataModel;
-import org.eclipse.scada.protocol.iec60870.server.data.BackgroundIterator;
-import org.eclipse.scada.protocol.iec60870.server.data.DataListener;
-import org.eclipse.scada.protocol.iec60870.server.data.DefaultSubscription;
-import org.eclipse.scada.protocol.iec60870.server.data.Subscription;
-import org.eclipse.scada.protocol.iec60870.server.data.event.MessageBuilder;
-import org.eclipse.scada.protocol.iec60870.server.data.event.SimpleBooleanBuilder;
-import org.eclipse.scada.protocol.iec60870.server.data.event.SimpleFloatBuilder;
-import org.eclipse.scada.utils.concurrent.NamedThreadFactory;
-import org.eclipse.scada.utils.concurrent.NotifyFuture;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.base.Function;
-import com.google.common.util.concurrent.ListenableFuture;
-
-/**
- * An IEC60870-5 data model for Eclipse SCADA <br/>
- * <h1>Implementation details</h1>
- * <p>
- * All entries are initialized with {@link DataItemValue#DISCONNECTED} in order
- * to populate the caches. This will allow the background transfer to already
- * have data before changes came in. And also prevent the cache structures to
- * change, so the background transmission may hold the iterators.
- * </p>
- */
-public class DataModelImpl extends AbstractBaseDataModel
-{
- private static final SimpleFloatBuilder FLOAT_BUILDER = new SimpleFloatBuilder ( false );
-
- private static final SimpleBooleanBuilder BOOLEAN_BUILDER = new SimpleBooleanBuilder ( false );
-
- private final static class BackgroundState
- {
- public Entry<Integer, SortedMap<Integer, Value<?>>> asduAddress;
-
- public Iterator<Entry<Integer, SortedMap<Integer, Value<?>>>> asduAddressIterator;
-
- public Iterator<Entry<Integer, Value<?>>> addressIterator;
-
- public SortedMap<Integer, Value<?>> addressMap;
-
- @Override
- public String toString ()
- {
- return String.format ( "[asduAddress: %s, asduAddressIterator: %s, addressMap: %s, addressIterator: %s]", this.asduAddress, this.asduAddressIterator, this.addressMap, this.addressIterator );
- }
- }
-
- private final static class AddressKey
- {
- private final int asduAddress;
-
- private final int address;
-
- public AddressKey ( final int asduAddress, final int address )
- {
- this.asduAddress = asduAddress;
- this.address = address;
- }
-
- @Override
- public int hashCode ()
- {
- final int prime = 31;
- int result = 1;
- result = prime * result + this.address;
- result = prime * result + this.asduAddress;
- return result;
- }
-
- @Override
- public boolean equals ( final Object obj )
- {
- if ( this == obj )
- {
- return true;
- }
- if ( obj == null )
- {
- return false;
- }
- if ( getClass () != obj.getClass () )
- {
- return false;
- }
- final AddressKey other = (AddressKey)obj;
- if ( this.address != other.address )
- {
- return false;
- }
- if ( this.asduAddress != other.asduAddress )
- {
- return false;
- }
- return true;
- }
-
- }
-
- private final class BackgroundIteratorImpl implements BackgroundIterator
- {
- private final BackgroundState state = new BackgroundState ();
-
- @Override
- public Object nextMessage ()
- {
- return proceedBackgroundScan ( this.state );
- }
- }
-
- private final static Logger logger = LoggerFactory.getLogger ( DataModelImpl.class );
-
- private final SingleSubscriptionManager manager;
-
- /*
- * we use a sorted map, so that the addresses are sorted and we
- * can generate continuous addresses in the message builders
- */
- private final Map<Integer, SortedMap<Integer, Value<?>>> cache;
-
- private final InformationBean info;
-
- private final ExecutorService backgroundExecutor;
-
- private final Map<AddressKey, String> addressMap = new HashMap<> ();
-
- public DataModelImpl ( final HiveSource hiveSource, final Set<MappingEntry> entries, final Properties hiveProperties, final InformationBean info )
- {
- super ( "org.eclipse.scada.da.server.exporter.iec60870.DataModel" );
-
- this.backgroundExecutor = Executors.newSingleThreadExecutor ( new NamedThreadFactory ( "org.eclipse.scada.da.server.exporter.iec60870.DataModel/background" ) );
-
- this.info = info;
-
- for ( final MappingEntry entry : entries )
- {
- this.addressMap.put ( new AddressKey ( entry.getAsduAddress (), entry.getAddress () ), entry.getItemId () );
- }
-
- this.cache = new HashMap<> ();
-
- this.manager = new SingleSubscriptionManager ( this.executor, hiveSource, hiveProperties, "IEC60870/DataModel" );
- this.manager.start ();
-
- attach ( entries );
- }
-
- @Override
- public synchronized Subscription subscribe ( final DataListener listener )
- {
- final Subscription result = super.subscribe ( listener );
- this.info.setNumberOfSubscriptions ( getNumberOfSubscriptions () );
- return result;
- }
-
- @Override
- protected synchronized ListenableFuture<Void> disposeSubscription ( final DefaultSubscription subscription )
- {
- final ListenableFuture<Void> result = super.disposeSubscription ( subscription );
- this.info.setNumberOfSubscriptions ( getNumberOfSubscriptions () );
- return result;
- }
-
- private void attach ( final Set<MappingEntry> entries )
- {
- for ( final MappingEntry entry : entries )
- {
- logger.debug ( "Attaching to: {}", entry );
- handleStateChanged ( entry, DataItemValue.DISCONNECTED, false );
- this.manager.addListener ( entry.getItemId (), new Listener () {
-
- @Override
- public void stateChanged ( final String itemId, final DataItemValue value )
- {
- handleStateChanged ( entry, value, true );
- }
- } );
- }
- }
-
- protected synchronized void handleStateChanged ( final MappingEntry entry, final DataItemValue value, final boolean notify )
- {
- logger.trace ( "Handle state change - entry: {}, value: {}", entry, value );
-
- SortedMap<Integer, Value<?>> unit = this.cache.get ( entry.getAsduAddress () );
- if ( unit == null )
- {
- unit = new TreeMap<> ();
- this.cache.put ( entry.getAsduAddress (), unit );
- }
-
- final Value<?> iecValue = convert ( entry, value );
- logger.trace ( "Converted to: {}", iecValue );
- unit.put ( entry.getAddress (), iecValue );
-
- notifyChange ( entry, iecValue );
- }
-
- private Value<?> convert ( final MappingEntry entry, final DataItemValue value )
- {
- Variant v = value.getValue ();
- if ( v == null )
- {
- v = Variant.NULL;
- }
-
- try
- {
- final Object cv;
- if ( value.getValue () == null || value.getValue ().isNull () )
- {
- // VariantType#NULL is null
- cv = null;
- }
- else
- {
- cv = convertValue ( entry, value );
- }
-
- if ( cv == null )
- {
- return errorValue ( entry );
- }
- return new Value<Object> ( cv, convertTimestamp ( value ), convertQuality ( value ) );
- }
- catch ( final Exception e )
- {
- logger.debug ( "Conversion error", e );
- return errorValue ( entry );
- }
- }
-
- private long convertTimestamp ( final DataItemValue value )
- {
- if ( value == null )
- {
- return System.currentTimeMillis ();
- }
- final Variant ts = value.getAttributes ().get ( "timestamp" );
- if ( ts == null || ts.isNull () )
- {
- return System.currentTimeMillis ();
- }
- return ts.asLong ( System.currentTimeMillis () );
- }
-
- private Object convertValue ( final MappingEntry entry, final DataItemValue value ) throws NullValueException, NotConvertableException
- {
- Variant v = value.getValue ();
-
- if ( v == null )
- {
- v = Variant.NULL;
- }
-
- if ( entry.getValueType () == null )
- {
- // don't convert ... well ...
- final Serializable ov = v.getValue ();
-
- if ( ov instanceof Number )
- {
- return ( (Number)ov ).floatValue ();
- }
- else if ( ov instanceof String )
- {
- return Double.parseDouble ( (String)ov );
- }
-
- // could be only be NULL or BOOLEAN
- return ov;
- }
-
- switch ( entry.getValueType () )
- {
- case BOOLEAN:
- return v.asBoolean ();
- case FLOAT:
- return (float)v.asDouble ();
- default:
- throw new IllegalStateException ( String.format ( "Value type %s unknown", entry.getValueType () ) );
- }
- }
-
- private QualityInformation convertQuality ( final DataItemValue value )
- {
- final boolean valid = value.isConnected () && !value.isError ();
- final boolean substituted = value.isManual ();
- final boolean blocked = value.isBlocked ();
- final boolean topical = true;
- return new QualityInformation ( blocked, substituted, topical, valid );
- }
-
- private Value<?> errorValue ( final MappingEntry entry )
- {
- switch ( entry.getValueType () )
- {
- case FLOAT:
- return new Value<Float> ( 0.0f, System.currentTimeMillis (), QualityInformation.INVALID );
- case BOOLEAN:
- default:
- return new Value<Boolean> ( false, System.currentTimeMillis (), QualityInformation.INVALID );
- }
- }
-
- @Override
- public void dispose ()
- {
- this.manager.stop ();
- this.backgroundExecutor.shutdown ();
- super.dispose ();
- }
-
- @Override
- public void disposeAndWait () throws InterruptedException
- {
- super.disposeAndWait ();
- this.backgroundExecutor.awaitTermination ( Long.MAX_VALUE, TimeUnit.MILLISECONDS );
- }
-
- @Override
- public ListenableFuture<Value<?>> read ( final ASDUAddress asduAddress, final InformationObjectAddress address )
- {
- return this.executor.submit ( new Callable<Value<?>> () {
-
- @Override
- public Value<?> call () throws Exception
- {
- return performRead ( asduAddress, address );
- }
- } );
- }
-
- protected synchronized Value<?> performRead ( final ASDUAddress asduAddress, final InformationObjectAddress address )
- {
- final Map<Integer, Value<?>> map = this.cache.get ( asduAddress.getAddress () );
- if ( map == null )
- {
- return null;
- }
-
- return map.get ( address.getAddress () );
- }
-
- @Override
- public synchronized ListenableFuture<Void> readAll ( final ASDUAddress asduAddress, final Runnable prepare, final DataListener listener )
- {
- final Map<Integer, Value<?>> map = this.cache.get ( asduAddress.getAddress () );
- if ( map == null )
- {
- return null;
- }
-
- final Map<Integer, Value<?>> map2 = new HashMap<> ( map ); // copy
-
- this.executor.submit ( prepare );
-
- return this.executor.submit ( new Callable<Void> () {
-
- @Override
- public Void call ()
- {
- performReadAll ( asduAddress, listener, map2 );
- return null;
- }
- } );
- }
-
- protected synchronized void performReadAll ( final ASDUAddress asduAddress, final DataListener listener, final Map<Integer, Value<?>> map )
- {
- for ( final Map.Entry<Integer, Value<?>> entry : map.entrySet () )
- {
- fireListener ( asduAddress, listener, entry );
- }
- }
-
- @Override
- public void forAllAsdu ( final Function<ASDUAddress, Void> function, final Runnable ifNoneFound )
- {
- this.executor.execute ( new Runnable () {
-
- @Override
- public void run ()
- {
- performForAllAsdu ( function, ifNoneFound );
- }
- } );
- }
-
- protected synchronized void performForAllAsdu ( final Function<ASDUAddress, Void> function, final Runnable ifNoneFound )
- {
- if ( this.cache.isEmpty () )
- {
- this.executor.execute ( ifNoneFound );
- return;
- }
-
- for ( final Integer asdu : this.cache.keySet () )
- {
- this.executor.execute ( new Runnable () {
-
- @Override
- public void run ()
- {
- function.apply ( ASDUAddress.valueOf ( asdu ) );
- }
- } );
- }
- }
-
- @Override
- public BackgroundIterator createBackgroundIterator ()
- {
- return new BackgroundIteratorImpl ();
- }
-
- public Object proceedBackgroundScan ( final BackgroundState state )
- {
- try
- {
- logger.debug ( "Background scan - {}", state );
-
- final Object msg = this.backgroundExecutor.submit ( new Callable<Object> () {
- @Override
- public Object call () throws Exception
- {
- return internalBackgroundScan ( state );
- }
- } ).get ();
- logger.debug ( "Background scan result - {}", msg );
- return msg;
- }
- catch ( InterruptedException | ExecutionException e )
- {
- throw new RuntimeException ( "Failed to perform background scan", e );
- }
- }
-
- @SuppressWarnings ( { "unchecked", "rawtypes" } )
- protected synchronized Object internalBackgroundScan ( final BackgroundState state )
- {
- if ( state.asduAddressIterator == null )
- {
- state.asduAddressIterator = this.cache.entrySet ().iterator ();
- }
- if ( state.asduAddress == null )
- {
- if ( !state.asduAddressIterator.hasNext () )
- {
- return null;
- }
- else
- {
- state.asduAddress = state.asduAddressIterator.next ();
- }
- }
-
- if ( state.addressIterator == null )
- {
- state.addressMap = state.asduAddress.getValue ();
- state.addressIterator = state.addressMap.entrySet ().iterator ();
- }
-
- MessageBuilder<?, ?> builder = null;
- do
- {
- if ( !state.addressIterator.hasNext () )
- {
- // end of entries for current common asdu address
- state.addressIterator = null; // reset address iterator
- state.asduAddress = null;
-
- if ( builder != null )
- {
- return builder.build (); // end this message
- }
- else
- {
- return null; // we never had content
- }
- }
-
- final Entry<Integer, Value<?>> entry = state.addressIterator.next ();
-
- if ( builder == null )
- {
- builder = createBuilder ( entry.getValue ().getValue () );
- builder.start ( CauseOfTransmission.BACKGROUND, ASDUAddress.valueOf ( state.asduAddress.getKey () ) );
- }
- if ( !builder.accepts ( entry.getValue () ) )
- {
- // next starting point
- state.addressMap = state.asduAddress.getValue ().tailMap ( entry.getKey () );
- state.addressIterator = state.addressMap.entrySet ().iterator ();
- // stop right now
- return builder.build ();
- }
- else
- {
- if ( !builder.addEntry ( InformationObjectAddress.valueOf ( entry.getKey () ), (Value)entry.getValue () ) )
- {
- // builder is full
- return builder.build ();
- }
- }
- } while ( true );
- }
-
- @SuppressWarnings ( "unchecked" )
- private void notifyChange ( final MappingEntry entry, final Value<?> iecValue )
- {
- final Object rawValue = iecValue.getValue ();
-
- logger.trace ( "Notify raw value: {} ({})", rawValue, rawValue != null ? rawValue.getClass () : null );
-
- if ( rawValue instanceof Boolean )
- {
- notifyChangeBoolean ( ASDUAddress.valueOf ( entry.getAsduAddress () ), new InformationObjectAddress ( entry.getAddress () ), Collections.singletonList ( (Value<Boolean>)iecValue ) );
- }
- else if ( rawValue instanceof Float )
- {
- notifyChangeFloat ( ASDUAddress.valueOf ( entry.getAsduAddress () ), new InformationObjectAddress ( entry.getAddress () ), Collections.singletonList ( (Value<Float>)iecValue ) );
- }
- }
-
- @SuppressWarnings ( "unchecked" )
- private static void fireListener ( final ASDUAddress asduAddress, final DataListener listener, final Map.Entry<Integer, Value<?>> entry )
- {
- final Value<?> ve = entry.getValue ();
- final Object v = ve.getValue ();
-
- if ( v instanceof Boolean )
- {
- listener.dataChangeBoolean ( asduAddress, InformationObjectAddress.valueOf ( entry.getKey () ), Collections.singletonList ( (Value<Boolean>)ve ) );
- }
- else if ( v instanceof Float )
- {
- listener.dataChangeFloat ( asduAddress, InformationObjectAddress.valueOf ( entry.getKey () ), Collections.singletonList ( (Value<Float>)ve ) );
- }
- }
-
- private static MessageBuilder<?, ?> createBuilder ( final Object value )
- {
- if ( value instanceof Boolean )
- {
- return BOOLEAN_BUILDER.create ();
- }
- else if ( value instanceof Number )
- {
- return FLOAT_BUILDER.create ();
- }
- throw new IllegalStateException ( String.format ( "Value type %s is unsupported", value.getClass () ) );
- }
-
- private static class WriteRequest
- {
- private final ASDUAddress asduAddress;
-
- private final InformationObjectAddress address;
-
- private final Variant value;
-
- public WriteRequest ( final ASDUAddress asduAddress, final InformationObjectAddress address, final Variant value )
- {
- this.asduAddress = asduAddress;
- this.address = address;
- this.value = value;
- }
-
- public InformationObjectAddress getAddress ()
- {
- return this.address;
- }
-
- public ASDUAddress getAsduAddress ()
- {
- return this.asduAddress;
- }
-
- public Variant getValue ()
- {
- return this.value;
- }
-
- @Override
- public String toString ()
- {
- return String.format ( "[WriteRequest - asduAddress: %s, objectAddress: %s, value: %s", this.asduAddress, this.address, this.value );
- }
- }
-
- private WriteRequest convert ( final ASDUHeader header, final InformationObjectAddress informationObjectAddress, final Variant value )
- {
- return new WriteRequest ( header.getAsduAddress (), informationObjectAddress, value );
- }
-
- @Override
- public void writeCommand ( final ASDUHeader header, final InformationObjectAddress informationObjectAddress, final boolean state, final byte type, final MirrorCommand mirrorCommand, final boolean execute )
- {
- performWrite ( header, informationObjectAddress, Variant.valueOf ( state ), mirrorCommand, execute );
- }
-
- @Override
- public void writeValue ( final ASDUHeader header, final InformationObjectAddress informationObjectAddress, final float value, final byte type, final MirrorCommand mirrorCommand, final boolean execute )
- {
- performWrite ( header, informationObjectAddress, Variant.valueOf ( value ), mirrorCommand, execute );
- }
-
- @Override
- public void writeScaledValue ( final ASDUHeader header, final InformationObjectAddress informationObjectAddress, final short value, final byte type, final MirrorCommand mirrorCommand, final boolean execute )
- {
- performWrite ( header, informationObjectAddress, Variant.valueOf ( value ), mirrorCommand, execute );
- }
-
- private void performWrite ( final ASDUHeader header, final InformationObjectAddress informationObjectAddress, final Variant value, final MirrorCommand mirrorCommand, final boolean execute )
- {
- final WriteRequest request = convert ( header, informationObjectAddress, value );
- this.executor.execute ( new Runnable () {
-
- @Override
- public void run ()
- {
- if ( !performWrite ( request, mirrorCommand, execute ) )
- {
- mirrorCommand.sendActivationConfirm ( false );
- }
- // actterm will be sent be the write method itself
- }
- } );
- }
-
- protected synchronized boolean performWrite ( final WriteRequest request, final MirrorCommand mirrorCommand, final boolean execute )
- {
- logger.debug ( "Request to write - request: {}, execute: {}", request, execute );
-
- final String itemId = this.addressMap.get ( new AddressKey ( request.getAsduAddress ().getAddress (), request.getAddress ().getAddress () ) );
- if ( itemId == null )
- {
- logger.info ( "Item for request not found - request: {}", request );
- return false;
- }
-
- logger.debug ( "Request to write to item: {}", itemId );
-
- mirrorCommand.sendActivationConfirm ( true );
-
- if ( execute )
- {
- final NotifyFuture<WriteResult> future = this.manager.writeValue ( itemId, request.getValue (), null, null );
- future.addListener ( new Runnable () {
-
- @Override
- public void run ()
- {
- logger.debug ( "Write command completed - request: {}, item: {}", request, itemId );
- mirrorCommand.sendActivationTermination ();
- }
- } );
- }
-
- return true;
- }
-}
diff --git a/org.eclipse.scada.da.server.exporter.iec60870/src/org/eclipse/scada/da/server/exporter/iec60870/ExportConfiguration.java b/org.eclipse.scada.da.server.exporter.iec60870/src/org/eclipse/scada/da/server/exporter/iec60870/ExportConfiguration.java
deleted file mode 100644
index 0475e164..00000000
--- a/org.eclipse.scada.da.server.exporter.iec60870/src/org/eclipse/scada/da/server/exporter/iec60870/ExportConfiguration.java
+++ /dev/null
@@ -1,281 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 IBH SYSTEMS GmbH and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBH SYSTEMS GmbH - initial API and implementation
- *******************************************************************************/
-package org.eclipse.scada.da.server.exporter.iec60870;
-
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import org.eclipse.scada.ca.ConfigurationDataHelper;
-import org.eclipse.scada.core.common.iec60870.Configurations;
-import org.eclipse.scada.da.server.exporter.iec60870.MappingEntry.ValueType;
-import org.eclipse.scada.protocol.iec60870.ProtocolOptions;
-import org.eclipse.scada.protocol.iec60870.server.data.DataModuleOptions;
-
-public class ExportConfiguration
-{
- private short port = 2404;
-
- private boolean spontaneous = true;
-
- private final int backgroundScanPeriod = 60_000;
-
- private ProtocolOptions protocolOptions;
-
- private DataModuleOptions dataModuleOptions;
-
- private Set<MappingEntry> entries = new HashSet<> ();
-
- private Properties hiveProperties = new Properties ();
-
- public ExportConfiguration ()
- {
- }
-
- public void setDataModuleOptions ( final DataModuleOptions dataModuleOptions )
- {
- this.dataModuleOptions = dataModuleOptions;
- }
-
- public DataModuleOptions getDataModuleOptions ()
- {
- return this.dataModuleOptions;
- }
-
- public void setHiveProperties ( final Properties hiveProperties )
- {
- this.hiveProperties = hiveProperties;
- }
-
- public Properties getHiveProperties ()
- {
- return this.hiveProperties;
- }
-
- public void setEntries ( final Set<MappingEntry> entries )
- {
- this.entries = entries;
- }
-
- public Set<MappingEntry> getEntries ()
- {
- return this.entries;
- }
-
- public void setProtocolOptions ( final ProtocolOptions options )
- {
- this.protocolOptions = options;
- }
-
- public ProtocolOptions getProtocolOptions ()
- {
- return this.protocolOptions;
- }
-
- public short getPort ()
- {
- return this.port;
- }
-
- public void setPort ( final short port )
- {
- this.port = port;
- }
-
- public void setSpontaneous ( final boolean spontaneous )
- {
- this.spontaneous = spontaneous;
- }
-
- public boolean isSpontaneous ()
- {
- return this.spontaneous;
- }
-
- /**
- * Parse the configuration from the CA properties <br/>
- * <code>
- * entry.1.1=INT32#data.item.1
- * </code>
- *
- * @param parameters
- * the parameters
- * @return the exporter configuration
- */
- public static ExportConfiguration parse ( final Map<String, String> parameters )
- {
- final ConfigurationDataHelper cfg = new ConfigurationDataHelper ( parameters );
- final ExportConfiguration result = new ExportConfiguration ();
-
- result.setPort ( (short)cfg.getInteger ( "port", 2404 /* IEC 60870-5-104 default */) ); //$NON-NLS-1$
- result.setSpontaneous ( cfg.getBoolean ( "spontaneous", true ) ); //$NON-NLS-1$
-
- final ProtocolOptions.Builder optionsBuilder = Configurations.parseProtocolOptions ( cfg );
-
- result.setProtocolOptions ( optionsBuilder.build () );
-
- final DataModuleOptions.Builder dataModuleOptions = new DataModuleOptions.Builder ();
- dataModuleOptions.setBackgroundScanPeriod ( cfg.getInteger ( "backgroundScanPeriod", 60_000 ) ); //$NON-NLS-1$
- dataModuleOptions.setSpontaneousDuplicates ( cfg.getInteger ( "spontaneousItemBuffer", 100 ) ); //$NON-NLS-1$
- dataModuleOptions.setFloatsWithTimestamp ( cfg.getBoolean ( "withTimestamp.float", true ) ); //$NON-NLS-1$
- dataModuleOptions.setBooleansWithTimestamp ( cfg.getBoolean ( "withTimestamp.boolean", true ) ); //$NON-NLS-1$
-
- result.setDataModuleOptions ( dataModuleOptions.build () );
-
- final Set<MappingEntry> entries = new HashSet<> ();
-
- for ( final Map.Entry<String, String> entry : cfg.getPrefixed ( "entry." ).entrySet () ) //$NON-NLS-1$
- {
- entries.add ( createEntry ( entry.getKey (), entry.getValue () ) );
- }
-
- result.setEntries ( entries );
- result.setHiveProperties ( cfg.getPrefixedProperties ( "hive." ) ); //$NON-NLS-1$
-
- return result;
- }
-
- private static MappingEntry createEntry ( final String key, final String value )
- {
- final String addr[] = key.split ( "\\." ); //$NON-NLS-1$
- final String item[] = value.split ( "#", 2 ); //$NON-NLS-1$
-
- if ( addr.length != 2 )
- {
- throw new IllegalArgumentException ( String.format ( "Address must be of the format '<asduAddress>.<informationObjectAddress>': '%s'", key ) );
- }
-
- final int asduAddress = convertAddress ( addr[0] );
- final int infoAddress = convertAddress ( addr[1] );
-
- final ValueType type;
- final String itemId;
- if ( item.length > 1 )
- {
- type = ValueType.valueOf ( item[0] );
- itemId = item[1];
- }
- else
- {
- type = null;
- itemId = item[0];
- }
-
- return new MappingEntry ( itemId, asduAddress, infoAddress, type );
- }
-
- private static int convertAddress ( final String string )
- {
- final String toks[] = string.split ( "[\\s-]" );
- int value = 0;
-
- for ( final String tok : toks )
- {
- final int v = Integer.parseInt ( tok );
- value = value << 8;
- value |= v;
- }
-
- return value;
- }
-
- @Override
- public int hashCode ()
- {
- final int prime = 31;
- int result = 1;
- result = prime * result + this.backgroundScanPeriod;
- result = prime * result + ( this.dataModuleOptions == null ? 0 : this.dataModuleOptions.hashCode () );
- result = prime * result + ( this.entries == null ? 0 : this.entries.hashCode () );
- result = prime * result + ( this.hiveProperties == null ? 0 : this.hiveProperties.hashCode () );
- result = prime * result + this.port;
- result = prime * result + ( this.protocolOptions == null ? 0 : this.protocolOptions.hashCode () );
- result = prime * result + ( this.spontaneous ? 1231 : 1237 );
- return result;
- }
-
- @Override
- public boolean equals ( final Object obj )
- {
- if ( this == obj )
- {
- return true;
- }
- if ( obj == null )
- {
- return false;
- }
- if ( getClass () != obj.getClass () )
- {
- return false;
- }
- final ExportConfiguration other = (ExportConfiguration)obj;
- if ( this.backgroundScanPeriod != other.backgroundScanPeriod )
- {
- return false;
- }
- if ( this.dataModuleOptions == null )
- {
- if ( other.dataModuleOptions != null )
- {
- return false;
- }
- }
- else if ( !this.dataModuleOptions.equals ( other.dataModuleOptions ) )
- {
- return false;
- }
- if ( this.entries == null )
- {
- if ( other.entries != null )
- {
- return false;
- }
- }
- else if ( !this.entries.equals ( other.entries ) )
- {
- return false;
- }
- if ( this.hiveProperties == null )
- {
- if ( other.hiveProperties != null )
- {
- return false;
- }
- }
- else if ( !this.hiveProperties.equals ( other.hiveProperties ) )
- {
- return false;
- }
- if ( this.port != other.port )
- {
- return false;
- }
- if ( this.protocolOptions == null )
- {
- if ( other.protocolOptions != null )
- {
- return false;
- }
- }
- else if ( !this.protocolOptions.equals ( other.protocolOptions ) )
- {
- return false;
- }
- if ( this.spontaneous != other.spontaneous )
- {
- return false;
- }
- return true;
- }
-
-}
diff --git a/org.eclipse.scada.da.server.exporter.iec60870/src/org/eclipse/scada/da/server/exporter/iec60870/ExporterFactoryImpl.java b/org.eclipse.scada.da.server.exporter.iec60870/src/org/eclipse/scada/da/server/exporter/iec60870/ExporterFactoryImpl.java
deleted file mode 100644
index 58c98cd7..00000000
--- a/org.eclipse.scada.da.server.exporter.iec60870/src/org/eclipse/scada/da/server/exporter/iec60870/ExporterFactoryImpl.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 IBH SYSTEMS GmbH and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBH SYSTEMS GmbH - initial API and implementation
- *******************************************************************************/
-package org.eclipse.scada.da.server.exporter.iec60870;
-
-import java.util.Map;
-
-import org.eclipse.scada.ca.common.factory.AbstractServiceConfigurationFactory;
-import org.eclipse.scada.da.server.common.DataItem;
-import org.eclipse.scada.da.server.exporter.common.ServiceListenerHiveSource;
-import org.eclipse.scada.sec.UserInformation;
-import org.eclipse.scada.utils.concurrent.ScheduledExportedExecutorService;
-import org.eclipse.scada.utils.osgi.pool.ObjectPoolHelper;
-import org.eclipse.scada.utils.osgi.pool.ObjectPoolImpl;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.FrameworkUtil;
-import org.osgi.framework.ServiceRegistration;
-
-public class ExporterFactoryImpl extends AbstractServiceConfigurationFactory<IecExport>
-{
-
- private final ScheduledExportedExecutorService executor;
-
- private final ServiceListenerHiveSource hiveSource;
-
- private final ObjectPoolImpl<DataItem> itemPool;
-
- private final ServiceRegistration<?> itemPoolHandle;
-
- public ExporterFactoryImpl ()
- {
- super ( FrameworkUtil.getBundle ( ExporterFactoryImpl.class ).getBundleContext () );
-
- this.executor = new ScheduledExportedExecutorService ( FrameworkUtil.getBundle ( ExporterFactoryImpl.class ).getSymbolicName (), 1 );
-
- this.hiveSource = new ServiceListenerHiveSource ( FrameworkUtil.getBundle ( ExporterFactoryImpl.class ).getBundleContext (), this.executor );
- this.hiveSource.open ();
-
- this.itemPool = new ObjectPoolImpl<> ();
- this.itemPoolHandle = ObjectPoolHelper.registerObjectPool ( FrameworkUtil.getBundle ( ExporterFactoryImpl.class ).getBundleContext (), this.itemPool, DataItem.class );
- }
-
- @Override
- protected Entry<IecExport> createService ( final UserInformation userInformation, final String configurationId, final BundleContext context, final Map<String, String> parameters ) throws Exception
- {
- final IecExport service = new IecExport ( configurationId, parameters, this.executor, this.itemPool, this.hiveSource );
- return new Entry<IecExport> ( configurationId, service );
- }
-
- @Override
- protected void disposeService ( final UserInformation userInformation, final String configurationId, final IecExport service )
- {
- service.dispose ();
- }
-
- @Override
- protected Entry<IecExport> updateService ( final UserInformation userInformation, final String configurationId, final Entry<IecExport> entry, final Map<String, String> parameters ) throws Exception
- {
- entry.getService ().update ( parameters );
- return null; // no change
- }
-
- @Override
- public synchronized void dispose ()
- {
- super.dispose ();
-
- this.itemPoolHandle.unregister ();
- this.itemPool.dispose ();
-
- this.hiveSource.close ();
- this.executor.shutdown ();
- }
-
-}
diff --git a/org.eclipse.scada.da.server.exporter.iec60870/src/org/eclipse/scada/da/server/exporter/iec60870/IecExport.java b/org.eclipse.scada.da.server.exporter.iec60870/src/org/eclipse/scada/da/server/exporter/iec60870/IecExport.java
deleted file mode 100644
index 6485c555..00000000
--- a/org.eclipse.scada.da.server.exporter.iec60870/src/org/eclipse/scada/da/server/exporter/iec60870/IecExport.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 IBH SYSTEMS GmbH and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBH SYSTEMS GmbH - initial API and implementation
- *******************************************************************************/
-package org.eclipse.scada.da.server.exporter.iec60870;
-
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ScheduledExecutorService;
-
-import org.eclipse.scada.da.server.common.DataItem;
-import org.eclipse.scada.da.server.common.exporter.ObjectExporter;
-import org.eclipse.scada.da.server.common.osgi.factory.ObjectPoolDataItemFactory;
-import org.eclipse.scada.da.server.exporter.common.HiveSource;
-import org.eclipse.scada.protocol.iec60870.server.Server;
-import org.eclipse.scada.protocol.iec60870.server.ServerModule;
-import org.eclipse.scada.protocol.iec60870.server.data.DataModule;
-import org.eclipse.scada.utils.osgi.pool.ManageableObjectPool;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class IecExport
-{
-
- private final static Logger logger = LoggerFactory.getLogger ( IecExport.class );
-
- private ExportConfiguration configuration;
-
- private Server server;
-
- private DataModule dataModule;
-
- private final InformationBean info;
-
- private final ObjectExporter exporter;
-
- private final HiveSource hiveSource;
-
- public IecExport ( final String id, final Map<String, String> parameters, final ScheduledExecutorService executor, final ManageableObjectPool<DataItem> itemObjectPool, final HiveSource hiveSource )
- {
- this.info = new InformationBean ();
- this.hiveSource = hiveSource;
-
- final ObjectPoolDataItemFactory itemFactory = new ObjectPoolDataItemFactory ( executor, itemObjectPool, String.format ( "org.eclipse.scada.da.server.exporter.iec60870.export.%s.information.", id ) ); //$NON-NLS-1$
- this.exporter = new ObjectExporter ( itemFactory, true, true );
- this.exporter.attachTarget ( this.info );
-
- synchronized ( this )
- {
- update ( parameters );
- }
- }
-
- public void dispose ()
- {
- synchronized ( this )
- {
- disposeServer ();
- disposeDataModel ();
- }
- if ( this.exporter != null )
- {
- this.exporter.dispose ();
- }
- }
-
- public synchronized void update ( final Map<String, String> parameters )
- {
- final ExportConfiguration cfg = ExportConfiguration.parse ( parameters );
- if ( this.configuration == null || !this.configuration.equals ( cfg ) )
- {
- applyConfiguration ( cfg );
- }
- }
-
- private synchronized void applyConfiguration ( final ExportConfiguration cfg )
- {
- this.configuration = cfg;
-
- this.info.setConfigured ( this.configuration != null );
-
- checkAndCreate ();
- }
-
- private void checkAndCreate ()
- {
- disposeServer ();
- disposeDataModel ();
-
- if ( this.configuration != null )
- {
- this.dataModule = new DataModule ( this.configuration.getDataModuleOptions (), new DataModelImpl ( this.hiveSource, this.configuration.getEntries (), this.configuration.getHiveProperties (), this.info ) );
- this.info.setItems ( this.configuration.getEntries ().size () );
-
- final List<ServerModule> modules = new LinkedList<ServerModule> ();
- modules.add ( this.dataModule );
-
- this.server = new Server ( this.configuration.getPort (), this.configuration.getProtocolOptions (), modules );
- }
-
- this.info.setHasDataModule ( this.dataModule != null );
- this.info.setHasServer ( this.server != null );
- }
-
- private void disposeDataModel ()
- {
- if ( this.dataModule != null )
- {
- this.dataModule.dispose ();
- this.dataModule = null;
- }
-
- this.info.setItems ( 0 );
- this.info.setHasDataModule ( this.dataModule != null );
- }
-
- private void disposeServer ()
- {
- if ( this.server != null )
- {
- try
- {
- this.server.close ();
- }
- catch ( final Exception e )
- {
- logger.warn ( "Failed to close server", e );
- }
- this.server = null;
- }
-
- this.info.setHasServer ( this.server != null );
- }
-}
diff --git a/org.eclipse.scada.da.server.exporter.iec60870/src/org/eclipse/scada/da/server/exporter/iec60870/InformationBean.java b/org.eclipse.scada.da.server.exporter.iec60870/src/org/eclipse/scada/da/server/exporter/iec60870/InformationBean.java
deleted file mode 100644
index f7a6bef5..00000000
--- a/org.eclipse.scada.da.server.exporter.iec60870/src/org/eclipse/scada/da/server/exporter/iec60870/InformationBean.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 IBH SYSTEMS GmbH and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBH SYSTEMS GmbH - initial API and implementation
- *******************************************************************************/
-package org.eclipse.scada.da.server.exporter.iec60870;
-
-import org.eclipse.scada.utils.beans.AbstractPropertyChange;
-
-public class InformationBean extends AbstractPropertyChange
-{
- public static final String PROP_CONFIGURED = "configured";
-
- public static final String PROP_HAS_SERVER = "hasServer";
-
- public static final String PROP_HAS_DATA_MODULE = "hasDataModule";
-
- public static final String PROP_ITEMS = "items";
-
- public static final String PROP_NUMBER_OF_SUBSCRIPTIONS = "numberOfSubscriptions";
-
- private boolean configured;
-
- private boolean hasServer;
-
- private boolean hasDataModule;
-
- private int items;
-
- private int numberOfSubscriptions;
-
- public boolean isConfigured ()
- {
- return this.configured;
- }
-
- public void setConfigured ( final boolean configured )
- {
- firePropertyChange ( PROP_CONFIGURED, this.configured, this.configured = configured );
- }
-
- public boolean isHasServer ()
- {
- return this.hasServer;
- }
-
- public void setHasServer ( final boolean hasServer )
- {
- firePropertyChange ( PROP_HAS_SERVER, this.hasServer, this.hasServer = hasServer );
- }
-
- public boolean isHasDataModule ()
- {
- return this.hasDataModule;
- }
-
- public void setHasDataModule ( final boolean hasDataModule )
- {
- firePropertyChange ( PROP_HAS_DATA_MODULE, this.hasDataModule, this.hasDataModule = hasDataModule );
- }
-
- public int getItems ()
- {
- return this.items;
- }
-
- public void setItems ( final int items )
- {
- firePropertyChange ( PROP_ITEMS, this.items, this.items = items );
- }
-
- public int getNumberOfSubscriptions ()
- {
- return this.numberOfSubscriptions;
- }
-
- public void setNumberOfSubscriptions ( final int numberOfSubscriptions )
- {
- firePropertyChange ( PROP_NUMBER_OF_SUBSCRIPTIONS, this.numberOfSubscriptions, this.numberOfSubscriptions = numberOfSubscriptions );
- }
-
-}
diff --git a/org.eclipse.scada.da.server.exporter.iec60870/src/org/eclipse/scada/da/server/exporter/iec60870/MappingEntry.java b/org.eclipse.scada.da.server.exporter.iec60870/src/org/eclipse/scada/da/server/exporter/iec60870/MappingEntry.java
deleted file mode 100644
index 6de5c7be..00000000
--- a/org.eclipse.scada.da.server.exporter.iec60870/src/org/eclipse/scada/da/server/exporter/iec60870/MappingEntry.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 IBH SYSTEMS GmbH and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBH SYSTEMS GmbH - initial API and implementation
- *******************************************************************************/
-package org.eclipse.scada.da.server.exporter.iec60870;
-
-public class MappingEntry
-{
- public static enum ValueType
- {
- FLOAT,
- BOOLEAN;
- }
-
- private final String itemId;
-
- private final int asduAddress;
-
- private final int address;
-
- private final ValueType valueType;
-
- public MappingEntry ( final String itemId, final int asduAddress, final int address, final ValueType valueType )
- {
- this.itemId = itemId;
- this.asduAddress = asduAddress;
- this.address = address;
- this.valueType = valueType;
- }
-
- public String getItemId ()
- {
- return this.itemId;
- }
-
- public int getAddress ()
- {
- return this.address;
- }
-
- public int getAsduAddress ()
- {
- return this.asduAddress;
- }
-
- public ValueType getValueType ()
- {
- return this.valueType;
- }
-
- @Override
- public String toString ()
- {
- return String.format ( "[%s/%s -> %s : %s]", this.asduAddress, this.address, this.itemId, this.valueType );
- }
-
- @Override
- public int hashCode ()
- {
- final int prime = 31;
- int result = 1;
- result = prime * result + this.address;
- result = prime * result + this.asduAddress;
- result = prime * result + ( this.itemId == null ? 0 : this.itemId.hashCode () );
- result = prime * result + ( this.valueType == null ? 0 : this.valueType.hashCode () );
- return result;
- }
-
- @Override
- public boolean equals ( final Object obj )
- {
- if ( this == obj )
- {
- return true;
- }
- if ( obj == null )
- {
- return false;
- }
- if ( getClass () != obj.getClass () )
- {
- return false;
- }
- final MappingEntry other = (MappingEntry)obj;
- if ( this.address != other.address )
- {
- return false;
- }
- if ( this.asduAddress != other.asduAddress )
- {
- return false;
- }
- if ( this.itemId == null )
- {
- if ( other.itemId != null )
- {
- return false;
- }
- }
- else if ( !this.itemId.equals ( other.itemId ) )
- {
- return false;
- }
- if ( this.valueType != other.valueType )
- {
- return false;
- }
- return true;
- }
-
-}
diff --git a/org.eclipse.scada.da.server.exporter.iec60870/test/test.ca.txt b/org.eclipse.scada.da.server.exporter.iec60870/test/test.ca.txt
deleted file mode 100644
index 075a457f..00000000
--- a/org.eclipse.scada.da.server.exporter.iec60870/test/test.ca.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-ca:create org.eclipse.scada.sec.osgi.manager allowAll serviceType=script priority=100000 "properties.script=true;"
-
-ca:create da.connection c1 connection.uri=da:ngp://demo.openscada.org:2101?user=admin&password=admin12
-
-ca:create da.datasource.dataitem s1 connection.id=c1 item.id=ES.DEMO.ARDUINO001.LUX.V
-ca:create master.item m1 datasource.id=s1
-ca:create da.dataitem.datasource i1 datasource.id=m1 item.id=ES.DEMO.ARDUINO001.LUX.V
-
-ca:create org.eclipse.scada.da.server.exporter.iec60870.device iec1 entry.1-1.1-1-1=FLOAT#ES.DEMO.ARDUINO001.LUX.V
-
diff --git a/org.eclipse.scada.da.server.iec60870/.classpath b/org.eclipse.scada.da.server.iec60870/.classpath
deleted file mode 100644
index 098194ca..00000000
--- a/org.eclipse.scada.da.server.iec60870/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.scada.da.server.iec60870/.gitignore b/org.eclipse.scada.da.server.iec60870/.gitignore
deleted file mode 100644
index 934e0e06..00000000
--- a/org.eclipse.scada.da.server.iec60870/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/bin
-/target
diff --git a/org.eclipse.scada.da.server.iec60870/.project b/org.eclipse.scada.da.server.iec60870/.project
deleted file mode 100644