Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Lots of changes with this one:

- Added various regex matches for autotools support to .gitignore
- Renamed LICENSE to COPYING in compliance with autotools standards
- Moved Boost UTF startup code out of TestAPDU.cpp and into
  TestStartBoostUTF.cpp
- Renamed README.markdown to README to support autotools standards
  • Loading branch information...
commit 622f6fe2cda9735a4a7b9d242a597a3f4ab78665 1 parent 40c8048
@cverges cverges authored
View
34 .gitignore
@@ -22,4 +22,38 @@ TestAPL/TestSingle.tiny.xml
TestSingle.tiny.xml
/doc
/coverage-*
+*~
+*.o
+*.lo
+.deps
+.dirstamp
+.libs
+*.la
+*.so
+
+/aclocal.m4
+/autom4te.cache
+/compile
+/config.guess
+/config.h.in
+/config.sub
+/configure
+/depcomp
+/install-sh
+/ltmain.sh
+/m4/libtool.m4
+/m4/ltoptions.m4
+/m4/ltsugar.m4
+/m4/ltversion.m4
+/m4/lt~obsolete.m4
+/missing
+/config
+configure.in
+configure
+Makefile.in
+Makefile
+config.h
+config.status
+libtool
+stamp-h1
View
32 LICENSE → COPYING
@@ -1,6 +1,3 @@
-=========================================================================
-== Apache License ==
-=========================================================================
Apache License
Version 2.0, January 2004
@@ -203,32 +200,3 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-
-=========================================================================
-== Boost License ==
-=========================================================================
-
-Boost Software License - Version 1.0 - August 17th, 2003
-
-Permission is hereby granted, free of charge, to any person or organization
-obtaining a copy of the software and accompanying documentation covered by
-this license (the "Software") to use, reproduce, display, distribute,
-execute, and transmit the Software, and to prepare derivative works of the
-Software, and to permit third-parties to whom the Software is furnished to
-do so, all subject to the following:
-
-The copyright notices in the Software and this entire statement, including
-the above license grant, this restriction and the following disclaimer,
-must be included in all copies of the Software, in whole or in part, and
-all derivative works of the Software, unless such copies or derivative
-works are solely in the form of machine-executable object code generated by
-a source language processor.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
-SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
-FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
-
View
1  DNP3Test/TestAPDU.cpp
@@ -16,7 +16,6 @@
// specific language governing permissions and limitations
// under the License.
//
-#define BOOST_TEST_MODULE dnp3
#include <boost/test/unit_test.hpp>
#include <APLTestTools/TestHelpers.h>
View
36 DNP3Test/TestStartBoostUTF.cpp
@@ -0,0 +1,36 @@
+//
+// Licensed to Green Energy Corp (www.greenenergycorp.com) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. Green Enery Corp licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+/*
+ * Define the Boost UTF module name
+ */
+#define BOOST_TEST_MODULE dnp3
+
+/*
+ * If we aren't using dynamic linking, make sure a main() function
+ * is created anyway.
+ */
+#ifndef BOOST_TEST_DYN_LINK
+ #define BOOST_TEST_MAIN
+#endif
+
+/*
+ * Include the Boost UTF subsystem. The rest is automagic.
+ */
+#include <boost/test/unit_test.hpp>
View
186 README.markdown → README
@@ -1,27 +1,29 @@
DNP3 library and testset
-=====================
+========================
-The DNP3 library and testset is a portable, scalable, and rigorously tested
-implementation of the DNP3 (www.dnp.org) protocol stack written in C++ and
-provided by Green Energy Corp to the community under the Apache 2.0 license.
-The library is optimized for massively parallel front end processor
-implementations and slave device simulations, although it has been verified
-to perform very well on embedded linux ARM architectures. It includes
-a command line master/slave test set.
+The DNP3 library and testset is a portable, scalable, and rigorously
+tested implementation of the DNP3 (www.dnp.org) protocol stack written
+in C++ and provided by Green Energy Corp to the community under the
+Apache 2.0 license. The library is optimized for massively parallel
+front end processor implementations and slave device simulations,
+although it has been verified to perform very well on embedded linux ARM
+architectures. It includes a command line master/slave test set.
-The library has been verified under linux, cygwin, and windows. Two build
-systems are included:
+The library has been verified under linux, cygwin, and windows. Two
+build systems are included:
-- GNU g++ and the rake (ruby make) build system provided. This build system is
-verified under ubuntu and cygwin.
+- GNU g++ and the rake (ruby make) build system provided. This build
+ system is verified under ubuntu and cygwin.
- Visual Studio SLN and PROJ files
-The repository is organized as a set of projects of libraries and executables.
+The repository is organized as a set of projects of libraries and
+executables.
The main libraries are:
-- APL - Portable functionality for things like parsing, physical layers, logging
+- APL - Portable functionality for things like parsing, physical layers,
+ logging
- APLTestTools - Library of tools/mocks uses for testing
- DNP3 - Protocol library for dnp3
- Terminal - Extensible library for creating command line driven UI
@@ -37,24 +39,36 @@ The main executable targets are:
# Building Instructions #
+The OpenDNP3 library uses the GNU autotools and the GNU libtool. Most
+Linux systems already have support for these utilities. Windows users
+may need to install a few packages to enable support.
+
+ # The GnuWin32 project
+ http://gnuwin32.sourceforge.net
+
+ # Direct download link
+ http://sourceforge.net/projects/getgnuwin32/files
+
## Common Dependencies for all platforms ##
-Set the TOOLS_HOME environment variable to an appropraite path for installing
-tools and libraries. Reasonable choices are C:\Tools or ~/tools.
+Set the TOOLS_HOME environment variable to an appropraite path for
+installing tools and libraries. Reasonable choices are C:\Tools or
+~/tools.
- On cygwin/windows this variable is set via:
-> ControlPanel->System->Advanced->EnvironmentVariables
+ Start Menu > ControlPanel > System > Advanced > EnvironmentVariables
- On Linux systems its common to add the following line to ~/.bashrc
-> export TOOLS_HOME=~/tools
+ export TOOLS_HOME=~/tools
## Configuring CYGWIN ##
-Get a copy of setup.exe from www.cygwin.com. Hold onto setup.exe as you may
-need it to install additional packages.
+Get a copy of setup.exe from www.cygwin.com. Hold onto setup.exe as you
+may need it to install additional packages.
-You will need the following additional packages to build the C++ libraries
-and tests. Please be careful to get the correct version if noted below:
+You will need the following additional packages to build the C++
+libraries and tests. Please be careful to get the correct version if
+noted below:
- Web -> wget // used in install scripts to retrieve packages
- Devel -> gcc-g++ // C++ compiler (version 3.4.4, not tested on gcc4x)
@@ -68,38 +82,40 @@ Optional packages:
- Devel -> swig // C/C++ wrapper generator used for Java bindings
- Devel -> doxygen // documentation system for C++
-Doxygen needs GraphViz. Download and install GraphViz: http://www.graphviz.org/Download_windows.php
+Doxygen needs GraphViz. Download and install GraphViz:
+http://www.graphviz.org/Download_windows.php
-The msi installer will put a program called dot onto your path that doxygen
-needs to generate images.
+The msi installer will put a program called dot onto your path that
+doxygen needs to generate images.
## Installing ARM CROSS-COMPILER ##
-If you want to build for the Technologic Systems ARM platform,
-install the cross-compiler:
+If you want to build for the Technologic Systems ARM platform, install
+the cross-compiler:
-> cd tools/install_scripts/crosstool
-> ./install-crosstool.sh
+ cd tools/install_scripts/crosstool
+ ./install-crosstool.sh
-It is important that this step be completely successfully prior to the
-boost installation, as the Boost libraries will be built for ARM as well
+It is important that this step be completely successfully prior to the
+boost installation, as the Boost libraries will be built for ARM as well
as your platform.
## Install Boost ##
Install the boost libraries and headers by running the script:
-> cd tools/install_scripts/boost/{VERSION}
-> ./install-boost.sh
+ cd tools/install_scripts/boost/{VERSION}
+ ./install-boost.sh
-This step will take some time as it retrieves the boost package and builds from
-source for both your platform and for ARM.
+This step will take some time as it retrieves the boost package and
+builds from source for both your platform and for ARM.
-When the boost version we are using is updated we will update the references in
-rakefile.rb and config/boost_*.vsprops to use the new version name and include
-updated installers to compile the new version, if after and update the build suddenly
-fails with missing boost include errors errors check that the boost version hasn't
-been upgraded recently.
+When the boost version we are using is updated we will update the
+references in rakefile.rb and config/boost_*.vsprops to use the new
+version name and include updated installers to compile the new version,
+if after and update the build suddenly fails with missing boost include
+errors errors check that the boost version hasn't been upgraded
+recently.
## Install Ruby Gems and Rake ##
@@ -111,71 +127,93 @@ http://rubygems.org/
Rake is a ruby gem. To install rake:
-> gem install rake
+ gem install rake
## Creating Native -> Java (JNI) Bindings ##
-We have created native bindings for java using SWIG. Prior to version 0.9.3, the native libraries where
-embedded into the jar file and extracted before use on the target. This caused us problems with OSGi
+We have created native bindings for java using SWIG. Prior to version
+0.9.3, the native libraries where embedded into the jar file and
+extracted before use on the target. This caused us problems with OSGi
and made integrating the jar difficult with some build tools.
-The shared library must now be installed in a directory found on the java.library.path. Typical locations are
-/usr/lib or C:\<windir>\System32.
+The shared library must now be installed in a directory found on the
+java.library.path. Typical locations are /usr/lib or
+C:\<windir>\System32.
-We keep some precompiled versions of the library on the project site for various platforms.
+We keep some precompiled versions of the library on the project site for
+various platforms.
-1) Use rake to generate the bindings and build the shared library. This step also outputs the java code.
-2) Cd to the DNP3Java dir and use Maven to build/deploy the jar.
+1) Use rake to generate the bindings and build the shared library. This
+ step also outputs the java code.
+2) cd to the DNP3Java dir and use Maven to build/deploy the jar.
## Building the libraries and tests ##
-Use rake to build. To see a list of targets and their descriptions, type:
+Use rake to build. To see a list of targets and their descriptions,
+type:
+
+ rake -T
-> rake -T
+rake understands dependencies similarly to the GNU make utility. To
+build and run the dnp3test executable, type:
-rake understands dependencies similarly to the GNU make utility. To build and run
-the dnp3test executable, type:
-> rake dnp3test:run
+ rake dnp3test:run
Flags not documented by Rake -T:
-- debug=true // debug mode, compiler generate debug information to use with gdb, etc
-- arm=true // crosscompile for arm, requires the arm cross compiler to be installed w/ arm Boost libs
+- debug=true // debug mode, compiler generate debug information to
+ // use with gdb, etc
+
+- arm=true // crosscompile for arm, requires the arm cross
+ //compiler to be installed w/ arm Boost libs
+
- coverage=true // compile with coverage information
+
- SH_VERBOSE=true // print every command that rake issues to the shell
### Examples ###
-> rake // build everything
-> rake arm=true // build everything in release mode for arm
-> rake dnp3test:run debug=true // build and run the dnp3test w/ debug info
-> rake dnp3test:run["--show_progress=true"] // run the test in release mode, w/ arg for Boost.Test
+
+ rake // build everything
+
+ rake arm=true // build everything in
+ // release mode for arm
+
+ rake dnp3test:run debug=true // build and run the
+ // dnp3test w/ debug info
+
+ rake dnp3test:run["--show_progress=true"] // run the test in release
+ // mode, w/ arg for
+ // Boost.Test
## Generating Code Coverage ##
-To generate documentation for the code coverage of the unit tests relative to
-the rest of the stack, you will need to have lcov installed before invoking:
+To generate documentation for the code coverage of the unit tests
+relative to the rest of the stack, you will need to have lcov installed
+before invoking:
-rake dnp3test:run coverage=true
+ rake dnp3test:run coverage=true
Be patient, this generates several megabytes of data.
-The html output will be generated in ./coverage.
+The HTML output will be generated in at
+./coverage-DNP3Test/html/index.html.
## Generating Documentation ##
-To generate documentation for the stack you need to have doxygen and graphviz (dot)
-installed before invoking:
+To generate documentation for the stack you need to have doxygen and
+graphviz (dot) installed before invoking:
-rake document
+ rake document
Be patient, this generates hundreds of megs worth of images.
-The html output will be generated in ./docs
+The HTML output will be generated in ./docs.
### Building the Java bindings ###
-The Java Developers Kit (JDK) and Swig are required to build Java bindings. Install Open JDK 1.6 or greater.
+The Java Developers Kit (JDK) and Swig are required to build Java
+bindings. Install Open JDK 1.6 or greater.
Set the JAVA_HOME directory to the install path of your JDK version.
@@ -183,9 +221,15 @@ Set the JAVA_HOME directory to the install path of your JDK version.
The deployment tasks require Apache Buildr to be installed:
-gem install buildr
+ gem install buildr
There are 2 tasks for deploying the jar:
-- dnp3java:install : copies the file to your local maven repository (doesn't overwrite an existing build so delete that library first)
-- dnp3java:upload : uploads the file to the remote maven repository (this should generally only be done by the build server)
+- dnp3java:install : copies the file to your local maven repository
+ (doesn't overwrite an existing build so delete that
+ library first)
+
+- dnp3java:upload : uploads the file to the remote maven repository
+ (this should generally only be done by the build
+ server)
+
Please sign in to comment.
Something went wrong with that request. Please try again.