Real-time Control System

Instructions for getting and making the Real-time Control System(RCS) Library.

 


 

  1. Get the source at http://www.isd.mel.nist.gov/projects/rcslib/rcslib-2014.04.29.tar.gz
  2. Extract files from rcslib-2014.04.29.tar.gz
    1. Uncompress the file by using "gunzip rcslib-2014.04.29.tar.gz
    2. Extract all of the files from the tar file by using " tar -xf rcslib-2014.04.29.tar

      With newer versions of GNU tar one can uncompress and extract with one command."tar -xzf rcslib-2014.04.29.tar"

  3. Build the RCS library.
  • To build using the autoconf/automake generated build system:
    • cd rcslib-2014.04.29
      ./configure
      make
      # The make check is optional, but gives a little more confidence that
      # everything will work, or if there is an option/function to stay away from.
      make check
      make install
    • There are lots of features that can be enabled or disabled by configure. Run "./configure ––help" for a list. For example to build the smallest possible library use "––disable-ALL" and then enable only the features you actually need. ( ./configure ––disable-ALL ––enable-shmem ) Setting the environment variables CC,CXX,CFLAGS,CXXFLAGS,CPPFLAGS or LDFLAGS can be useful too.
    • The command "make install" may require root or administrator access. If this is a problem set prefix=directory to a directory you have write access to.
    • If you want to build for multiple platforms and use the same source directory, use the command etc/multiplatbuild.sh. Each time it is run the library will be installed into a platform specific subdirectory of .multiplatinstalls and symbolic links set up for lib include and bin in the top level directory. This should also eliminate the need for root access.
  • To build with the older static Makefiles:
    • cd rcslib-2014.04.29 make USE_OLD_RCSLIB_MAKEFILES=1
    • The "make" program needs to be GNU make. You can use the following command to check:

make -v

    • There are similar programs also called "make" from other sources that generally do not work. Sometimes GNU make is installed on your system under the name "gmake" or "gnumake".

    • If you do not specify a platform the script rcslib/etc/platname will be run to guess the platform name. If it fails or guesses incorrectly you should either set the environment variable "PLAT" or set it on the make command line. To set the environment variable use either "setenv PLAT platname" or "PLAT=platname; export PLAT" depending on the type of shell you have. To set the platform on the command line run: "make PLAT=platname" The string to use for platname should match the base of one of the .def files in the rcslib/etc directory. For example setting PLAT=sunos5 would use the definitions in rcslib/etc/sunos5.def.

      If no .def file exists for your platform you should copy one of the other .def files and edit it with a text editor as necessary.
  • For Windows:
    • Use MinGW:

      Download and install first MinGW and then MSYS from http://www.mingw.org.Be sure to save the rcslib tar file under the "root" directory of MSYS ie "C:\msys\1.0\" or a sub-directory of this. Then, from within the MSYS tool either run:

      tar -xzf rcslib-2014.04.29.tar

cd rcslib-2014.04.29
./configure make
make install

or use the older makefiles :

cd rcslib-2014.04.29
export PLAT=mingw32
make PLAT=mingw32

    • If you must use VC++, there is a solutions file in rcslib-2014.04.29/etc/win_vc_2010_express/rcs/rcs.sln
       
  • To build your own applications:

    If you built with the old static Makefile, you need to add the following line to your compiler options where pathtorcslib and platname will depend on your system:
    -Ipathtorcslib/plat/platname/include

    The following also needs to be added to the linker options:
    -Lpathtorcslib/plat/platname/lib -lrcs

    For configure/autoconf based builds the flags will be different since the paths are different but typically only the -lrcs flag is needed since configure will install files in the default location expected by the compiler.

    Also depending on your platform you may need to add some additional libraries to the linker options. The libraries themselves are expected to be provided with your operating system or compiler but still need to be explicitly requested in the linker options. For example windows needs "-lws2_32 -lwininet" while Solaris needs "-lrpcsvc -lsocket -lnsl -lintl -lm -lposix4 -ldl" If you get undefined symbols you can check the CLINK variable of the platforms .def file or your operating systems documentation on the functions that were undefined to determine what libraries to add. configure will also print the LIBS it is using which are also generally needed for applications. Also, since RCS is a C++ library you generally will want to link with the C++ compiler rather than directly with ld or with the C compiler or you may end up missing the standard C++ libraries.

  • OPTIONAL: Build the java tools and jar files

    While the precompiled version of the java code can be run on multiple platforms and therefore somewhat reduce the need for recompiling. The precompiled code might not be the latest.

    To build from source: Download and install a Developer's Kit for Java such as the SDK for Java 2 Standard Edition (J2SE) from http://java.sun.com/.

    With the java bin directory on your PATH run:

    cd pathtorcslib/src/java
    make PLAT=java

Sometimes it is necessary to add JDK_DIR=path_to_j2se_sdk to the make command line if you have multiple java programs on your path. The compiled byte code will be placed in several jar files and subdirectories in pathtorcslib/plat/java/lib/.

For the diagnostics tool or code generator, download diag_NB.jar or CodeGenCmdLine.jar, and a Java Runtime tool such as from http://java.sun.com/ and run with the command "java -jar <jarfile>". (See the instructions for each tool.) The diagnotics tool now requires JDK or JRE 1.6 as well as plotter_NB.jar,rcs.jar, CodeGenCmdLine.jar, and swing-layout-1.0.jar.

Alternatively run diag tool through Java WebStart with this link:

http://www.isd.mel.nist.gov/projects/rcslib/diag.jnlp

or with all Java classes in one .Jar file here:

http://www.isd.mel.nist.gov/projects/rcslib/rcsjava.jar


 

Last Modified: 2014.04.29

  • See other RCS Library Documents.

If you have questions or comments regarding this page, please contact Will Shackleford at

[email protected]


Commercial Product Disclaimer

DISCLAIMER: Certain commercial equipment, instruments, or materials are identified in this paper to specify the experimental procedure adequately. Such identification is not intended to imply recommendation or endorsement by the National Institute of Standards and Technology, nor is it intended to imply that the materials or equipment identified are necessarily the best available for the purpose.


Software Disclaimer

你可能感兴趣的:(Real-time,Control,System)