Merge branch 'master' into tmaster
Merging all changes p to 17.2.0 tag to developer.nasa.gov.
2
.gitignore
vendored
@ -13,6 +13,7 @@ lib_Darwin_*
|
||||
*.tab.h
|
||||
*.swp
|
||||
*.dox
|
||||
*.pyc
|
||||
Makefile_jsc_dirs
|
||||
.DS_Store
|
||||
bin/trick-ICG
|
||||
@ -23,3 +24,4 @@ bin/trick-trk2csv
|
||||
aclocal.m4
|
||||
autom4te.cache
|
||||
trick_test
|
||||
gmon.out
|
||||
|
13
CHANGELOG.md
@ -1,13 +0,0 @@
|
||||

|
||||
### Trick 15.0.beta Change Log
|
||||
* [view commit](http://github.com/nasa/Trick/commit/13b2ba644674f57db83644ba76a75879dd5d723d) Add .gitattributes file to exclude files from release.
|
||||
* [view commit](http://github.com/nasa/Trick/commit/2972685f712efbf82d53af2e4c2001bacbcef6c7) Development flag needs to be set in configure script
|
||||
* [view commit](http://github.com/nasa/Trick/commit/108ec3ebf925dff46c9833e85f3daa988c504b1d) Add more files to exclude from release
|
||||
* [view commit](http://github.com/nasa/Trick/commit/d8013068cc56ff0a43a49d876bbdad45e5b2570b) Fix #52 : Created a python script to generate the changelog
|
||||
* [view commit](http://github.com/nasa/Trick/commit/f85c8e67876b51f7f32a3714fc520f0d542a1a56) Added psi to the list of units for pressure in Trick View. fixes #54
|
||||
* [view commit](http://github.com/nasa/Trick/commit/08138fef872c94409a197f3e52afa4a3b1f9aa8c) Moved psi up in the list of units for pressure in Trick View. refs #54
|
||||
* [view commit](http://github.com/nasa/Trick/commit/eb464199513d31fa8a717b4e530b8235055984e7) Fix #55 : Use stringsstreams to build paths rather than a fixed size char array.
|
||||
* [view commit](http://github.com/nasa/Trick/commit/24fe5adaecc7146582133c2905e01567cf14d599) JITEvents are not checkpointable
|
||||
* [view commit](http://github.com/nasa/Trick/commit/83e68ef26e45e1dc4da17754647a8a1f33429eb7) JITEvents are not checkpointable
|
||||
* [view commit](http://github.com/nasa/Trick/commit/bc9746db6ce52d94262b622f37b104723afadb04) Fix #55: Fix problem in stringstream declaration
|
||||
* [view commit](http://github.com/nasa/Trick/commit/899b0d3efe75ac1efe7a1b4691ede66084f92b54) Merge branch 'master' of https://github.com/nasa/Trick
|
77
Makefile
@ -45,7 +45,6 @@ SIM_SERV_DIRS = \
|
||||
${TRICK_HOME}/trick_source/sim_services/MonteCarlo \
|
||||
${TRICK_HOME}/trick_source/sim_services/RealtimeInjector \
|
||||
${TRICK_HOME}/trick_source/sim_services/RealtimeSync \
|
||||
${TRICK_HOME}/trick_source/sim_services/STL \
|
||||
${TRICK_HOME}/trick_source/sim_services/ScheduledJobQueue \
|
||||
${TRICK_HOME}/trick_source/sim_services/Scheduler \
|
||||
${TRICK_HOME}/trick_source/sim_services/Sie \
|
||||
@ -140,9 +139,13 @@ ICG_EXE := ${TRICK_HOME}/bin/trick-ICG
|
||||
################################################################################
|
||||
# DEFAULT TARGET
|
||||
# 1 Build Trick-core and Trick Data-products.
|
||||
all: no_dp dp java
|
||||
all: no_dp dp
|
||||
@ echo ; echo "[32mTrick compilation complete:[00m" ; date
|
||||
|
||||
ifeq ($(USE_JAVA), 1)
|
||||
all: java
|
||||
endif
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# 1.1 Build Trick-core
|
||||
no_dp: $(TRICK_LIB) $(TRICK_SWIG_LIB)
|
||||
@ -333,51 +336,59 @@ clean_gui: clean_java
|
||||
# INSTALL Targets
|
||||
################################################################################
|
||||
|
||||
install:
|
||||
ER7_HEADERS := $(addprefix $(PREFIX)/include/, $(filter er7_utils/%, $(shell cd trick_source && find er7_utils -name \*.hh)))
|
||||
|
||||
${ER7_HEADERS} : ${PREFIX}/include/% : trick_source/%
|
||||
@ mkdir -p ${@D}
|
||||
install -m 0644 $? $@
|
||||
|
||||
install: ${ER7_HEADERS}
|
||||
cp -r bin include $(notdir ${TRICK_LIB_DIR}) libexec share ${PREFIX}
|
||||
|
||||
uninstall:
|
||||
rm -f ${PREFIX}/bin/trick-*
|
||||
rm -f ${PREFIX}/bin/trick-CP
|
||||
rm -f ${PREFIX}/bin/trick-ICG
|
||||
rm -f ${PREFIX}/bin/trick-config
|
||||
rm -f ${PREFIX}/bin/trick-dp
|
||||
rm -f ${PREFIX}/bin/trick-dre
|
||||
rm -f ${PREFIX}/bin/trick-gte
|
||||
rm -f ${PREFIX}/bin/trick-gxplot
|
||||
rm -f ${PREFIX}/bin/trick-jxplot
|
||||
rm -f ${PREFIX}/bin/trick-killsim
|
||||
rm -f ${PREFIX}/bin/trick-mm
|
||||
rm -f ${PREFIX}/bin/trick-mtv
|
||||
rm -f ${PREFIX}/bin/trick-qp
|
||||
rm -f ${PREFIX}/bin/trick-sie
|
||||
rm -f ${PREFIX}/bin/trick-simcontrol
|
||||
rm -f ${PREFIX}/bin/trick-sniffer
|
||||
rm -f ${PREFIX}/bin/trick-stripchart
|
||||
rm -f ${PREFIX}/bin/trick-trk2ascii
|
||||
rm -f ${PREFIX}/bin/trick-trk2csv
|
||||
rm -f ${PREFIX}/bin/trick-tv
|
||||
rm -f ${PREFIX}/bin/trick-version
|
||||
rm -rf ${PREFIX}/include/trick
|
||||
rm -f ${PREFIX}/${BASE_LIB_DIR}/libtrick*
|
||||
rm -rf ${PREFIX}/include/er7_utils
|
||||
rm -f ${PREFIX}/$(notdir ${TRICK_LIB_DIR})/liber7_utils.a
|
||||
rm -f ${PREFIX}/$(notdir ${TRICK_LIB_DIR})/libtrick.a
|
||||
rm -f ${PREFIX}/$(notdir ${TRICK_LIB_DIR})/libtrick_comm.a
|
||||
rm -f ${PREFIX}/$(notdir ${TRICK_LIB_DIR})/libtrick_math.a
|
||||
rm -f ${PREFIX}/$(notdir ${TRICK_LIB_DIR})/libtrick_mm.a
|
||||
rm -f ${PREFIX}/$(notdir ${TRICK_LIB_DIR})/libtrick_pyip.a
|
||||
rm -f ${PREFIX}/$(notdir ${TRICK_LIB_DIR})/libtrick_units.a
|
||||
rm -rf ${PREFIX}/libexec/trick
|
||||
rm -rf ${PREFIX}/share/doc/trick
|
||||
rm -f ${PREFIX}/share/man/man1/trick-*
|
||||
rm -f ${PREFIX}/share/man/man1/trick-CP.1
|
||||
rm -f ${PREFIX}/share/man/man1/trick-ICG.1
|
||||
rm -f ${PREFIX}/share/man/man1/trick-killsim.1
|
||||
rm -rf ${PREFIX}/share/trick
|
||||
|
||||
###########
|
||||
|
||||
# These rules run the alternatives command in linux to create links in /usr/local/bin for Trick.
|
||||
#ifeq ($(TRICK_HOST_TYPE),Linux)
|
||||
#ALTERNATIVES := $(shell which alternatives || which update-alternatives)
|
||||
#
|
||||
#install: set_alternatives
|
||||
#.PHONY: set_alternatives
|
||||
#set_alternatives: copy_files
|
||||
# - ${ALTERNATIVES} --install /usr/local/bin/CP trick ${PREFIX}/trick/trick-$(TRICK_VERSION)/bin/trick-CP 10 \
|
||||
# --slave /usr/local/bin/trick-ICG trick-ICG /usr/local/trick/trick-$(TRICK_VERSION)/bin/trick-ICG \
|
||||
# --slave /usr/local/bin/trick-gte trick-gte /usr/local/trick/trick-$(TRICK_VERSION)/bin/trick-gte \
|
||||
# --slave /usr/local/bin/trick-killsim trick-killsim /usr/local/trick/trick-$(TRICK_VERSION)/bin/trick-killsim \
|
||||
# --slave /usr/local/bin/trick-sie trick-sie /usr/local/trick/trick-$(TRICK_VERSION)/bin/trick-sie \
|
||||
# --slave /usr/local/bin/trick-sim_control trick-simcontrol /usr/local/trick/trick-$(TRICK_VERSION)/bin/trick-simcontrol \
|
||||
# --slave /usr/local/bin/trick-sniffer trick-sniffer /usr/local/trick/trick-$(TRICK_VERSION)/bin/trick-sniffer \
|
||||
# --slave /usr/local/bin/trick-dp trick-dp /usr/local/trick/trick-$(TRICK_VERSION)/bin/trick-dp \
|
||||
# --slave /usr/local/bin/trick-version trick-version /usr/local/trick/trick-$(TRICK_VERSION)/bin/trick-version \
|
||||
# --slave /usr/local/bin/trick-tv trick-tv /usr/local/trick/trick-$(TRICK_VERSION)/bin/trick-tv
|
||||
#
|
||||
#uninstall: remove_alternatives
|
||||
#.PHONY: remove_alternatives
|
||||
#remove_alternatives:
|
||||
# - ${ALTERNATIVES} --remove trick ${PREFIX}/trick/trick-$(TRICK_VERSION)/bin/CP
|
||||
#endif
|
||||
|
||||
################################################################################
|
||||
# MISCELLANEOUS DEVELOPER UTILITY TARGETS #
|
||||
################################################################################
|
||||
# ICG all sim_services files (for testing and debugging ICG).
|
||||
# The -f flag forces io_src files to be regenerated whether or not they need to be.
|
||||
ICG: $(ICG_EXE)
|
||||
${TRICK_HOME}/bin/trick-ICG -f -s -m ${TRICK_CXXFLAGS} ${TRICK_SYSTEM_CXXFLAGS} ${TRICK_HOME}/include/trick/files_to_ICG.hh
|
||||
${TRICK_HOME}/bin/trick-ICG -f -s -m -n ${TRICK_CXXFLAGS} ${TRICK_SYSTEM_CXXFLAGS} ${TRICK_HOME}/include/trick/files_to_ICG.hh
|
||||
|
||||
# This builds a tricklib share library.
|
||||
trick_lib: $(SIM_SERV_DIRS) $(UTILS_DIRS) | $(TRICK_LIB_DIR)
|
||||
|
69
README.md
@ -1,28 +1,51 @@
|
||||

|
||||
<p align=center>
|
||||
<img src="https://raw.github.com/nasa/Trick/master/TrickLogo.png" alt="Trick Logo" height=150px>
|
||||
</p>
|
||||
|
||||
The Trick Simulation Environment is developed at the NASA Johnson Space Center.
|
||||
Trick’s flexible feature set enables users to build applications for all phases
|
||||
of space vehicle development including early vehicle design and performance
|
||||
evaluation, flight software development and testing, flight vehicle dynamic
|
||||
loads analysis, and virtual and hardware in the loop training. Trick’s purpose
|
||||
is to provide a common set of simulation capabilities allowing the domain experts
|
||||
to concentrate on their domain specific models, rather than simulation-specific
|
||||
functions like an job ordering, input file processing, or data recording.
|
||||
<p align=justify>
|
||||
The Trick Simulation Environment, developed at the NASA Johnson Space Center, is a powerful simulation development framework that enables users to build applications for all phases of space vehicle development. Trick expedites the creation of simulations for early vehicle design, performance evaluation, flight software development, flight vehicle dynamic load analysis, and virtual/hardware in the loop training. Trick's purpose is to provide a common set of simulation capabilities that allow users to concentrate on their domain specific models, rather than simulation-specific functions like job ordering, input file processing, or data recording.
|
||||
</p>
|
||||
|
||||
### Installing Trick
|
||||
<table>
|
||||
<col width="33%">
|
||||
<col width="33%">
|
||||
<col width="33%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><a href="https://github.com/nasa/trick/wiki/Install-Guide">Install Guide</a></th>
|
||||
<th><a href="https://github.com/nasa/trick/wiki/Tutorial">Tutorial</a></th>
|
||||
<th><a href="https://github.com/nasa/trick/wiki/Documentation-Home">Documentation</a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr align="center">
|
||||
<td>Follow the installation guide to properly configure Trick on your operating system.</td>
|
||||
<td>Complete the tutorial to become familiar with the basics.</td>
|
||||
<td>Visit the documentation for a more complete understanding of Trick.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
The [Installing Trick](https://github.com/nasa/Trick/wiki/Installing-Trick)
|
||||
wiki page includes instructions to install Trick.
|
||||
<table>
|
||||
<col width="33%">
|
||||
<col width="33%">
|
||||
<col width="33%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><a href="https://github.com/nasa/trick/wiki/Related-Projects">Related Projects</a></th>
|
||||
<th><a href="https://github.com/nasa/trick/wiki/FAQ">Frequently Asked Questions</a></th>
|
||||
<th><a href="https://github.com/nasa/trick/wiki/How-To-Home">How-To Guides</a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr align="center">
|
||||
<td>View some of the many projects that use Trick.</td>
|
||||
<td>Read some of the most frequently asked questions pertaining to Trick.</td>
|
||||
<td>See a collection of how-to guides detailing common Trick processes.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
### User's Guide
|
||||
---
|
||||
|
||||
The full [User's Guide](https://github.com/nasa/Trick/wiki/Users-Guide) is in
|
||||
the wiki pages.
|
||||
|
||||
### Tutorial
|
||||
|
||||
The [Trick Tutorial] (https://github.com/nasa/Trick/wiki/Tutorial)
|
||||
is located in share/doc/trick/Tutorial. Markdown and PDF versions are available.
|
||||
### License
|
||||
|
||||
Trick is released under the NASA Open Source Agreement Version 1.3 [license](LICENSE).
|
||||
Trick is released under the NASA Open Source Agreement Version 1.3 [license](https://github.com/nasa/trick/blob/master/LICENSE).
|
||||
|
BIN
TrickLogo.png
Normal file
After Width: | Height: | Size: 55 KiB |
@ -2,7 +2,7 @@ dnl To generate a new top level configure script from this autoconf directory
|
||||
dnl 1. aclocal
|
||||
dnl 2. autoconf -o ../configure
|
||||
|
||||
AC_INIT([Trick],[16.0])
|
||||
AC_INIT([Trick],[17+])
|
||||
AC_LANG(C++)
|
||||
|
||||
AC_CONFIG_AUX_DIR([autoconf])
|
||||
@ -10,28 +10,16 @@ AC_CONFIG_AUX_DIR([autoconf])
|
||||
AC_DEFUN([AX_LLVM_HOME],[
|
||||
AC_ARG_WITH([llvm],
|
||||
AS_HELP_STRING([--with-llvm@<:@=DIR@:>@], [LLVM root directory]),
|
||||
[LLVM_HOME="$withval"],
|
||||
[LLVM_HOME="/usr"]
|
||||
[LLVM_HOME="$withval"
|
||||
AC_PATH_PROG(LLVM_CONFIG, llvm-config, no-llvm-config, "$LLVM_HOME/bin")
|
||||
AS_IF([test "$ac_cv_path_LLVM_CONFIG" = "no-llvm-config"],AC_MSG_ERROR([could not find llvm-config]),[])
|
||||
],
|
||||
[
|
||||
AC_PATH_PROG(LLVM_CONFIG, llvm-config, no-llvm-config, "/bin:/usr/bin:/usr/local/bin:/sw/bin:/usr/local/opt/llvm/bin")
|
||||
AS_IF([test "$ac_cv_path_LLVM_CONFIG" = "no-llvm-config"],AC_MSG_ERROR([could not find llvm-config]),[])
|
||||
LLVM_HOME=`$LLVM_CONFIG --prefix`
|
||||
]
|
||||
)
|
||||
AC_SUBST([LLVM_HOME])
|
||||
])
|
||||
|
||||
dnl Test if clang will link successfully. Some systems like Ubuntu 16.04 shipping with clang that does not work.
|
||||
AC_DEFUN([AX_TEST_CLANG],[
|
||||
LLVM_INCLUDE_DIR=`$LLVM_CONFIG --includedir`
|
||||
LLVM_ALL_LD_FLAGS=`$LLVM_CONFIG --ldflags --libs`
|
||||
AS_IF([LLVM_SYSTEM_LD_FLAGS=`$LLVM_CONFIG --system-libs 2>/dev/null`],[],[])
|
||||
AC_LANG(C++)
|
||||
AC_DEFINE([__STDC_CONSTANT_MACROS])
|
||||
AC_DEFINE([__STDC_FORMAT_MACROS])
|
||||
AC_DEFINE([__STDC_LIMIT_MACROS])
|
||||
AC_LANG_CONFTEST([AC_LANG_PROGRAM([[#include "llvm/Support/Host.h"]],[[llvm::sys::getDefaultTargetTriple(); return 0; ]])])
|
||||
AC_MSG_CHECKING([if clang works properly])
|
||||
${CLANG}++ conftest.cpp --std=c++11 -I${LLVM_INCLUDE_DIR} ${LLVM_ALL_LD_FLAGS} ${LLVM_SYSTEM_LD_FLAGS} >&AS_MESSAGE_LOG_FD
|
||||
AS_IF([test $? == 0 ],AC_MSG_RESULT([yes]),
|
||||
[AC_MSG_ERROR([cannot use ${CLANG}. Download clang/llvm directly from http://llvm.org])
|
||||
])
|
||||
/bin/rm -f a.out
|
||||
])
|
||||
|
||||
AC_DEFUN([AX_HDF5_HOME],[
|
||||
@ -40,12 +28,14 @@ AC_DEFUN([AX_HDF5_HOME],[
|
||||
[HDF5_HOME="$withval"
|
||||
AS_IF([test "$HDF5_HOME" = "yes"],
|
||||
AC_CHECK_HEADER(hdf5.h,[HDF5_HOME="/usr"],AC_MSG_ERROR([could not find hdf5.h])),
|
||||
AC_CHECK_FILE([$HDF5_HOME/include/hdf5.h],
|
||||
[],
|
||||
AC_MSG_ERROR([could not find $HDF5_HOME/include/hdf5.h])
|
||||
)
|
||||
AS_IF([test "$HDF5_HOME" = "no"],[HDF5_HOME=""],
|
||||
AC_CHECK_FILE([$HDF5_HOME/include/hdf5.h],
|
||||
[],
|
||||
AC_MSG_ERROR([could not find $HDF5_HOME/include/hdf5.h])
|
||||
)
|
||||
)
|
||||
)],
|
||||
[HDF5_HOME=""]
|
||||
[AC_CHECK_HEADER(hdf5.h, [HDF5_HOME="/usr"], [HDF5_HOME=""])]
|
||||
)
|
||||
AC_SUBST([HDF5_HOME])
|
||||
])
|
||||
@ -100,12 +90,14 @@ AC_DEFUN([AX_GSL_HOME],[
|
||||
[GSL_HOME="$withval"
|
||||
AS_IF([test "$GSL_HOME" = "yes"],
|
||||
AC_CHECK_HEADER(gsl/gsl_rng.h,[GSL_HOME="/usr"],AC_MSG_ERROR([could not find gsl/gsl_rng.h])),
|
||||
AC_CHECK_FILE([$GSL_HOME/include/gsl],
|
||||
[],
|
||||
AC_MSG_ERROR([could not find $GSL_HOME/include/gsl])
|
||||
)
|
||||
AS_IF([test "$GSL_HOME" = "no"],[GSL_HOME=""],
|
||||
AC_CHECK_FILE([$GSL_HOME/include/gsl],
|
||||
[],
|
||||
AC_MSG_ERROR([could not find $GSL_HOME/include/gsl])
|
||||
)
|
||||
)
|
||||
)],
|
||||
[GSL_HOME=""]
|
||||
[AC_CHECK_HEADER(gsl/gsl_rng.h, [GSL_HOME="/usr"], [GSL_HOME=""])]
|
||||
)
|
||||
AC_SUBST([GSL_HOME])
|
||||
])
|
||||
@ -116,12 +108,14 @@ AC_DEFUN([AX_GTEST_HOME],[
|
||||
[GTEST_HOME="$withval"
|
||||
AS_IF([test "$GTEST_HOME" = "yes"],
|
||||
AC_CHECK_HEADER(gtest/gtest.h,[GTEST_HOME="/usr"],AC_MSG_ERROR([could not find gtest/gtest.h])),
|
||||
AC_CHECK_FILE([$GTEST_HOME/include/gtest],
|
||||
[],
|
||||
AC_MSG_ERROR([could not find $GTEST_HOME/include/gtest])
|
||||
)
|
||||
AS_IF([test "$GTEST_HOME" = "no"],[GTEST_HOME=""],
|
||||
AC_CHECK_FILE([$GTEST_HOME/include/gtest],
|
||||
[],
|
||||
AC_MSG_ERROR([could not find $GTEST_HOME/include/gtest])
|
||||
)
|
||||
)
|
||||
)],
|
||||
[GTEST_HOME=""]
|
||||
[AC_CHECK_HEADER(gtest/gtest.h, [GTEST_HOME="/usr"], [GTEST_HOME=""])]
|
||||
)
|
||||
AC_SUBST([GTEST_HOME])
|
||||
])
|
||||
@ -135,6 +129,26 @@ AC_DEFUN([AX_UDUNITS_HOME],[
|
||||
AC_SUBST([UDUNITS_HOME])
|
||||
])
|
||||
|
||||
dnl test if we want to use java, default to yes
|
||||
AC_DEFUN([AX_JAVA],[
|
||||
AC_ARG_ENABLE([java],
|
||||
AS_HELP_STRING([--enable-java], [use java (default is yes)]),
|
||||
AS_IF([test "x$enable_java" = xyes], [USE_JAVA="1"], [USE_JAVA="0"]),
|
||||
[USE_JAVA="1"]
|
||||
)
|
||||
AC_SUBST([USE_JAVA])
|
||||
AS_IF([test "$USE_JAVA" = "1"],[
|
||||
AC_PROG_AWK
|
||||
AX_PROG_JAVA_CC(javac)
|
||||
JAVA_VER=`$JAVA_CC -version 2>&1 | $ac_cv_path_PERL -ne 'print $& if /\d+(\.\d+)?/'`
|
||||
AC_MSG_CHECKING([$JAVA_CC version >= 1.8])
|
||||
AX_COMPARE_VERSION([$JAVA_VER],[ge],[1.8], [AC_MSG_RESULT([yes])],
|
||||
[AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([Trick requires javac version >= 1.8])
|
||||
])
|
||||
],[])
|
||||
])
|
||||
|
||||
dnl test if we want to use er7_utils, default to yes
|
||||
AC_DEFUN([AX_ER7_UTILS],[
|
||||
AC_ARG_ENABLE([er7utils],
|
||||
@ -160,40 +174,56 @@ AC_DEFUN([AX_JSC_DIRS],[
|
||||
AC_SUBST([MOTIF_HOME])
|
||||
])
|
||||
|
||||
dnl add extra paths to find gcc on RHEL 6 systems
|
||||
PATH="/opt/rh/devtoolset-3/root/usr/bin:${PATH}"
|
||||
dnl add extra paths to find xml headers and X headers on the mac.
|
||||
XTRAINCPATHS="-I/usr/include/libxml2/ -I/usr/X11/include"
|
||||
CFLAGS="$CFLAGS $XTRAINCPATHS"
|
||||
CPPFLAGS="$CPPFLAGS $XTRAINCPATHS"
|
||||
|
||||
dnl look for programs we need to compile and run
|
||||
AC_PROG_AWK
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
AX_GCC_VERSION
|
||||
dnl if the compiler is gcc, test for gcc >= 4.8
|
||||
AS_IF([test "x$GCC_VERSION" = "x"],[],
|
||||
[AC_MSG_CHECKING([gcc version >= 4.8])
|
||||
AX_COMPARE_VERSION([$GCC_VERSION],[ge],[4.8], [AC_MSG_RESULT([yes])],
|
||||
[AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([Trick requires gcc version >= 4.8])
|
||||
])
|
||||
])
|
||||
dnl Save the full path of the compiler
|
||||
CC=`which $CC`
|
||||
CXX=`which $CXX`
|
||||
|
||||
AC_PATH_PROG(TEE, tee, notee)
|
||||
AS_IF([test "$ac_cv_path_TEE" = "notee"],AC_MSG_ERROR([could not find tee]),[])
|
||||
AC_PATH_PROG(LD, ld, nold)
|
||||
AS_IF([test "$ac_cv_path_LD" = "nold"],AC_MSG_ERROR([could not find ld]),[])
|
||||
AC_PROG_LEX
|
||||
AS_IF([test "x$LEX" = "x:"],AC_MSG_ERROR([could not find flex]),[])
|
||||
AC_PATH_PROG(BISON, bison, nobison)
|
||||
AS_IF([test "$ac_cv_path_BISON" = "nobison"],AC_MSG_ERROR([could not find bison]),[])
|
||||
AC_PATH_PROG(PERL, perl, noperl)
|
||||
AS_IF([test "$ac_cv_path_PERL" = "noperl"],AC_MSG_ERROR([could not find perl]),[])
|
||||
AC_PATH_PROG(PYTHON, python, nopython)
|
||||
AC_PATH_PROG(PYTHON, python${PYTHON_VERSION}, nopython)
|
||||
AS_IF([test "$ac_cv_path_PYTHON" = "nopython"],AC_MSG_ERROR([could not find python]),[])
|
||||
AC_PATH_PROG(SWIG, swig, noswig, "/bin:/usr/bin:/usr/local/bin:/sw/bin")
|
||||
AS_IF([test "$ac_cv_path_SWIG" = "noswig"],AC_MSG_ERROR([could not find swig]),[])
|
||||
AC_PATH_PROG(GNUPLOT, gnuplot, nognuplot)
|
||||
AS_IF([test "$ac_cv_path_GNUPLOT" = "nognuplot"],AC_MSG_NOTICE([could not find gnuplot]),[])
|
||||
dnl AX_COMPARE_VERSION requires awk.
|
||||
AC_PROG_AWK
|
||||
AX_PROG_JAVA_CC(javac)
|
||||
JAVA_VER=`$JAVA_CC -version 2>&1 | $ac_cv_path_PERL -ne 'print $& if /\d+\.\d+/'`
|
||||
AC_MSG_CHECKING([$JAVA_CC version >= 1.8])
|
||||
AX_COMPARE_VERSION([$JAVA_VER],[ge],[1.8], [AC_MSG_RESULT([yes])],
|
||||
[AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([Trick requires javac version >= 1.8])
|
||||
])
|
||||
|
||||
AX_JAVA
|
||||
|
||||
dnl look for libraries and headers we need to compile
|
||||
AC_PATH_X
|
||||
AS_IF([test "$no_x" = "yes"],AC_MSG_ERROR([could not find Xwindows development libraries and/or headers]),[])
|
||||
AC_CHECK_HEADER([X11/Intrinsic.h],[],AC_MSG_ERROR([could not find libxt development headers]))
|
||||
AS_IF([test "x$x_libraries" = "x"],[X_LIB_DIR=],[X_LIB_DIR=-L$x_libraries])
|
||||
dnl X_LIBRARIES=$x_libraries
|
||||
AC_SUBST([X_LIB_DIR])
|
||||
AX_JSC_DIRS([])
|
||||
AC_CHECK_LIB(xml2, main,
|
||||
[LIBXML=-lxml2
|
||||
@ -207,18 +237,19 @@ AX_PROG_PERL_MODULES( Digest::MD5,[],AC_MSG_ERROR([could not find perl module Di
|
||||
|
||||
dnl process the optional --with-llvm command line arguments
|
||||
AX_LLVM_HOME([])
|
||||
AC_PATH_PROG(LLVM_CONFIG, llvm-config, no-llvm-config, "$LLVM_HOME/bin:/bin:/usr/bin:/usr/local/bin:/sw/bin")
|
||||
AS_IF([test "$ac_cv_path_LLVM_CONFIG" = "no-llvm-config"],AC_MSG_ERROR([could not find clang]),[])
|
||||
LLVM_LIB_DIR=`$LLVM_CONFIG --libdir`
|
||||
LLVM_BIN_DIR=`$LLVM_CONFIG --bindir`
|
||||
LLVM_INCLUDE_DIR=`$LLVM_CONFIG --includedir`
|
||||
AC_CHECK_FILE([$LLVM_INCLUDE_DIR/clang/Basic/LLVM.h],[],AC_MSG_ERROR([could not find clang development headers]))
|
||||
AC_CHECK_FILE([$LLVM_LIB_DIR/libLLVMSupport.a],
|
||||
[],
|
||||
AC_MSG_ERROR([could not find clang library files in $LLVM_LIB_DIR])
|
||||
)
|
||||
AC_PATH_PROG(CLANG, clang, noclang, "$LLVM_BIN_DIR:$LLVM_HOME/bin:/bin:/usr/bin:/usr/local/bin:/sw/bin")
|
||||
AC_PATH_PROG(CLANG, clang, noclang, "$LLVM_BIN_DIR:/bin:/usr/bin:/usr/local/bin:/sw/bin")
|
||||
AS_IF([test "$ac_cv_path_CLANG" = "noclang"],AC_MSG_ERROR([could not find clang]),[])
|
||||
dnl does not work under RedHat 6
|
||||
dnl AX_TEST_CLANG
|
||||
AC_SUBST([LLVM_HOME])
|
||||
|
||||
AX_CHECK_ZLIB([],AC_MSG_ERROR([could not find zlib]))
|
||||
|
||||
dnl look for udunits in /usr/include and /usr/include/udunits2
|
||||
AX_UDUNITS_HOME([])
|
||||
@ -231,11 +262,11 @@ AS_IF([test "$UDUNITS_HOME" = ""],
|
||||
[
|
||||
AC_CHECK_FILE([$UDUNITS_HOME/include/udunits2.h],
|
||||
[UDUNITS_INCLUDES=-I$UDUNITS_HOME/include
|
||||
UDUNITS_LDFLAGS=-L$UDUNITS_HOME/lib -ludunits2
|
||||
UDUNITS_LDFLAGS="-L$UDUNITS_HOME/lib -ludunits2"
|
||||
],
|
||||
[AC_CHECK_FILE([$UDUNITS_HOME/lib/udunits2.h],
|
||||
[UDUNITS_INCLUDES=-I$UDUNITS_HOME/lib
|
||||
UDUNITS_LDFLAGS=-L$UDUNITS_HOME/lib -ludunits2
|
||||
UDUNITS_LDFLAGS="-L$UDUNITS_HOME/lib -ludunits2"
|
||||
],
|
||||
AC_MSG_ERROR([could not find udunits2]))
|
||||
]
|
||||
@ -256,3 +287,5 @@ AX_ER7_UTILS([])
|
||||
|
||||
AC_OUTPUT([share/trick/makefiles/config_user.mk])
|
||||
|
||||
printf "\033@<:@32mconfigure script successfully completed\033@<:@0m\n"
|
||||
|
||||
|
139
bin/trick-CP
@ -22,7 +22,7 @@ foreach $argnum (0 .. $#ARGV) {
|
||||
} elsif ($arg =~ /-t/ ) {
|
||||
$makefileAddArgs = $makefileAddArgs . " test ";
|
||||
} else {
|
||||
print "Warning: Ignoring unrecognized argument $arg\n"
|
||||
$ENV{TRICK_CPFLAGS} .= " $arg" ;
|
||||
}
|
||||
}
|
||||
|
||||
@ -48,10 +48,143 @@ if ( -f "S_define" ) {
|
||||
__END__
|
||||
# CP found at SUB_TRICK_BIN
|
||||
|
||||
# Disable built-in implicit rules to increase build speed.
|
||||
.SUFFIXES:
|
||||
|
||||
ifndef TRICK_HOME
|
||||
export TRICK_HOME := SUB_TRICK_HOME
|
||||
endif
|
||||
|
||||
include ${TRICK_HOME}/share/trick/makefiles/Makefile.sim
|
||||
-include S_overrides.mk
|
||||
ifneq ($(wildcard ${TRICK_HOME}/share/trick/makefiles/Makefile.common),)
|
||||
include ${TRICK_HOME}/share/trick/makefiles/Makefile.common
|
||||
|
||||
ifndef TRICK_VERBOSE_BUILD
|
||||
PRINT_CP = $(info $(call COLOR,Running) configuration_processor)
|
||||
PRINT_ICG = $(info $(call COLOR,Running) ICG)
|
||||
PRINT_CONVERT_SWIG = $(info $(call COLOR,Running) convert_swig)
|
||||
PRINT_MAKEFILE_SRC = $(info $(call COLOR,Writing) Makefile_src)
|
||||
PRINT_MAKEFILE_SWIG = $(info $(call COLOR,Writing) Makefile_swig)
|
||||
endif
|
||||
|
||||
MAKE_OUT := build/MAKE_out
|
||||
REMOVE_MAKE_OUT := $(shell rm -f $(MAKE_OUT))
|
||||
|
||||
all:
|
||||
$(info [32mTrick Build Process Complete[00m)
|
||||
|
||||
|
||||
test: TRICK_SYSTEM_CFLAGS += -DTRICK_UNIT_TEST
|
||||
test: TRICK_SYSTEM_CXXFLAGS += -DTRICK_UNIT_TEST
|
||||
test: all
|
||||
|
||||
debug: TRICK_CPFLAGS += --debug
|
||||
debug: all
|
||||
|
||||
build:
|
||||
@mkdir -p $@
|
||||
|
||||
$(TRICK_STATIC_LIB):
|
||||
$(info Cannot find $@. Please build Trick for this platform.)
|
||||
@exit -1
|
||||
|
||||
# CP creates S_source.hh required for ICG and SWIG processing
|
||||
S_source.hh: S_define | build
|
||||
$(PRINT_CP)
|
||||
$(ECHO_CMD)${TRICK_HOME}/$(LIBEXEC)/trick/configuration_processor $(TRICK_CPFLAGS)
|
||||
|
||||
build/Makefile_S_define: S_source.hh
|
||||
$(PRINT_S_DEF_DEPS)
|
||||
$(ECHO_CMD)$(TRICK_CPPC) $(TRICK_SFLAGS) $(TRICK_SYSTEM_SFLAGS) -MM -MT S_source.hh -MF build/Makefile_S_define -x c++ S_define
|
||||
|
||||
# Automatic and manual ICG rules
|
||||
ICG:
|
||||
$(PRINT_ICG)
|
||||
$(ECHO_CMD)${TRICK_HOME}/bin/trick-ICG -m ${TRICK_ICGFLAGS} ${TRICK_CXXFLAGS} ${TRICK_SYSTEM_CXXFLAGS} S_source.hh
|
||||
|
||||
force_ICG:
|
||||
$(PRINT_ICG)
|
||||
$(ECHO_CMD)${TRICK_HOME}/bin/trick-ICG -f -m ${TRICK_ICGFLAGS} ${TRICK_CXXFLAGS} ${TRICK_SYSTEM_CXXFLAGS} S_source.hh
|
||||
|
||||
# Create makefile for IO code
|
||||
build/Makefile_io_src: S_source.hh | build
|
||||
$(PRINT_ICG)
|
||||
$(ECHO_CMD)${TRICK_HOME}/bin/trick-ICG -m ${TRICK_ICGFLAGS} ${TRICK_CXXFLAGS} ${TRICK_SYSTEM_CXXFLAGS} $<
|
||||
|
||||
# Create makefile for source code
|
||||
#build/Makefile_src: build/ICG_processed build/ICG_no_found build/S_define.lib_deps
|
||||
build/Makefile_src: build/Makefile_src_deps build/Makefile_io_src S_source.hh
|
||||
$(PRINT_MAKEFILE_SRC)
|
||||
$(ECHO_CMD)${TRICK_HOME}/$(LIBEXEC)/trick/make_makefile_src $?
|
||||
|
||||
build/Makefile_src_deps: ;
|
||||
|
||||
# Create makefile for SWIG code
|
||||
build/Makefile_swig: S_source.hh build/Makefile_swig_deps
|
||||
$(PRINT_MAKEFILE_SWIG)
|
||||
$(ECHO_CMD)${TRICK_HOME}/$(LIBEXEC)/trick/make_makefile_swig
|
||||
|
||||
build/Makefile_swig_deps: ;
|
||||
|
||||
# Forcibly (re)create all SWIG input (.i) files. This rule is never run by the normal
|
||||
# build process.
|
||||
.PHONY: convert_swig
|
||||
convert_swig: build/S_library_swig
|
||||
$(ECHO_CMD)${TRICK_HOME}/$(LIBEXEC)/trick/convert_swig ${TRICK_CONVERT_SWIG_FLAGS}
|
||||
|
||||
# Force S_define_exp to be remade each time this rule runs
|
||||
.PHONY: S_define_exp
|
||||
S_define_exp:
|
||||
$(TRICK_CC) -E -C -xc++ ${TRICK_SFLAGS} $(TRICK_SYSTEM_SFLAGS) S_define > $@
|
||||
|
||||
help:
|
||||
@echo -e "\
|
||||
Simulation make options:\n\
|
||||
make [debug] [TRICK_VERBOSE_BUILD=1] - Makes everything: S_main and S_sie.resource\n\
|
||||
make sie - Builds the S_sie.resource file.\n\
|
||||
make clean - Removes all object files in simulation directory\n\
|
||||
make spotless - Performs a clean\n\
|
||||
make apocalypse - Performs a clean"
|
||||
|
||||
CLEAN_TARGETS = tidy clean spotless distclean apocalypse
|
||||
ifeq ($(findstring ${MAKECMDGOALS},$(CLEAN_TARGETS)),)
|
||||
-include build/Makefile_S_define
|
||||
-include build/Makefile_src
|
||||
-include build/Makefile_src_deps
|
||||
-include build/Makefile_io_src
|
||||
-include build/Makefile_swig
|
||||
-include build/Makefile_swig_deps
|
||||
-include build/Makefile_ICG
|
||||
endif
|
||||
-include S_overrides.mk
|
||||
-include build/Makefile_overrides
|
||||
|
||||
ifeq ($(MAKECMDGOALS),)
|
||||
$(info $(call COLOR,Building with the following compilation flags:))
|
||||
$(info TRICK_CFLAGS = [36m$(TRICK_CFLAGS)[0m)
|
||||
$(info TRICK_CXXFLAGS = [36m$(TRICK_CXXFLAGS)[0m)
|
||||
endif
|
||||
|
||||
else
|
||||
all:
|
||||
$(error error with TRICK_HOME, cannot find ${TRICK_HOME}/share/trick/makefiles/Makefile.common)
|
||||
endif
|
||||
|
||||
tidy:
|
||||
-rm -f S_source.hh S_sie.resource
|
||||
-rm -f S_main* T_main*
|
||||
-rm -f build/Makefile_*
|
||||
-rm -f S_default.dat
|
||||
|
||||
clean: tidy
|
||||
-rm -f DP_Product/DP_rt_frame DP_Product/DP_rt_itimer
|
||||
-rm -f DP_Product/DP_rt_jobs DP_Product/DP_rt_timeline DP_Product/DP_mem_stats
|
||||
-rm -rf build trick
|
||||
-rm -f makefile
|
||||
|
||||
spotless: clean
|
||||
|
||||
distclean: clean
|
||||
|
||||
apocalypse: clean
|
||||
@echo "[31mI love the smell of napalm in the morning[0m"
|
||||
|
||||
|
76
bin/trick-config
Executable file
@ -0,0 +1,76 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use File::Basename ;
|
||||
use Cwd 'abs_path';
|
||||
use Getopt::Long ;
|
||||
use strict;
|
||||
|
||||
# read the trick_ver.txt file and print the trick version
|
||||
sub print_version() {
|
||||
my @all_lines ;
|
||||
my $file_contents ;
|
||||
my ($current_version) ;
|
||||
my $trick_ver_txt = "$ENV{TRICK_HOME}/share/trick/trick_ver.txt" ;
|
||||
open FILE, "$trick_ver_txt" or die "$0: Couldn't find $trick_ver_txt\n" ;
|
||||
@all_lines = <FILE> ;
|
||||
close FILE ;
|
||||
$file_contents = join "" , @all_lines ;
|
||||
($current_version) = $file_contents =~ /current_version\s*=\s*"([^"]+)"/ ;
|
||||
print "$current_version\n" ;
|
||||
}
|
||||
|
||||
# print the prefix which is also TRICK_HOME
|
||||
sub print_prefix() {
|
||||
print "$ENV{TRICK_HOME}\n" ;
|
||||
}
|
||||
|
||||
# Run a special rule in Makefile.sim that prints the value of the environment variable we request
|
||||
sub print_makefile_var($) {
|
||||
open(README, "make -f $ENV{TRICK_HOME}/share/trick/makefiles/Makefile.sim print-@_ | ") or
|
||||
die "Couldn't fork $!\n" ;
|
||||
while (<README>) {
|
||||
/=(.*)/ && print "$1\n" ;
|
||||
}
|
||||
close(README) ;
|
||||
}
|
||||
|
||||
sub print_usage() {
|
||||
print "\
|
||||
Usage: trick-config <OPTION>
|
||||
|
||||
Options:
|
||||
--version Print Trick version
|
||||
--prefix Print the installation prefix (TRICK_HOME)
|
||||
--includedir Directory containing Trick headers (TRICK_INCLUDES)
|
||||
--libdir Directory containing Trick libraries (TRICK_LIB_DIR)
|
||||
--cflags C compiler flags set by Trick (TRICK_SYSTEM_CFLAGS)
|
||||
--cxxflags C++ compiler flags set by Trick (TRICK_SYSTEM_CXXFLAGS)
|
||||
--ldflags Print Linker flags (TRICK_EXEC_LINK_LIBS)
|
||||
--libs Libraries needed to link against Trick components (TRICK_LIBS)
|
||||
" ;
|
||||
}
|
||||
|
||||
sub print_usage_error() {
|
||||
print_usage() ;
|
||||
exit 1 ;
|
||||
}
|
||||
|
||||
# Print usage if no arguments given
|
||||
print_usage_error() if ( scalar @ARGV == 0 ) ;
|
||||
|
||||
# Set TRICK_HOME environment variable if it does not exist. TRICK_HOME is parent directory
|
||||
$ENV{"TRICK_HOME"} = dirname(dirname(abs_path($0))) if (!exists $ENV{"TRICK_HOME"}) ;
|
||||
|
||||
# Process arguments
|
||||
Getopt::Long::Configure ("bundling");
|
||||
GetOptions ( "version" => sub {print_version();},
|
||||
"prefix" => sub {print_prefix();},
|
||||
"includedir" => sub {print_makefile_var("TRICK_INCLUDES");},
|
||||
"libdir" => sub {print_makefile_var("TRICK_LIB_DIR");},
|
||||
"cflags" => sub {print_makefile_var("TRICK_SYSTEM_CFLAGS");},
|
||||
"cxxflags" => sub {print_makefile_var("TRICK_SYSTEM_CXXFLAGS");},
|
||||
"ldflags" => sub {print_makefile_var("TRICK_EXEC_LINK_LIBS");},
|
||||
"libs" => sub {print_makefile_var("TRICK_LIBS");},
|
||||
"help|h" => sub {print_usage()},
|
||||
) or print_usage_error() ;
|
||||
|
@ -1,8 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use FindBin qw($RealBin);
|
||||
use lib ("$RealBin/../libexec/trick/pm", "$RealBin/../lib/trick/pm") ;
|
||||
use launch_java ;
|
||||
|
||||
launch_java("Stripchart", "trick.stripchart.StripchartApplication") ;
|
||||
|
204
bin/trick-units
Executable file
@ -0,0 +1,204 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Term::ANSIColor;
|
||||
|
||||
print "\n";
|
||||
|
||||
print "-" x 50 . "\n";
|
||||
print "Trick Units Overview\n";
|
||||
print "-" x 50 . "\n";
|
||||
print "Trick uses UDUNITS2 as its unit specification and conversion package.\n";
|
||||
print "More information about this package can be found at: " . color('blue') . "http://www.unidata.ucar.edu/software/udunits/\n";
|
||||
print color('red');
|
||||
print "NOTE: The following list is NOT comprehensive. More units are available in the udunits xml databases here:\n";
|
||||
print color('magenta');
|
||||
print "http://www.unidata.ucar.edu/software/udunits/udunits-2.2.25/doc/udunits/udunits2.html#Database\n";
|
||||
print color('red');
|
||||
print "Users can also run the 'udunits2 -h' command and navigate to the appropriate xml database to learn more.\n";
|
||||
print color('white');
|
||||
|
||||
print "\n";
|
||||
|
||||
print "-" x 50 . "\n";
|
||||
print "Unit Prefixes\n";
|
||||
print "-" x 50 . "\n";
|
||||
printf "%25s%s", "e+24: ", "Y, yotta"; print "\n";
|
||||
printf "%25s%s", "e+21: ", "Z, zetta"; print "\n";
|
||||
printf "%25s%s", "e+18: ", "E, exa"; print "\n";
|
||||
printf "%25s%s", "e+15: ", "P, peta"; print "\n";
|
||||
printf "%25s%s", "e+12: ", "T, tera"; print "\n";
|
||||
printf "%25s%s", "e+9: ", "G, giga"; print "\n";
|
||||
printf "%25s%s", "e+6: ", "M, mega"; print "\n";
|
||||
printf "%25s%s", "e+3: ", "k, kilo"; print "\n";
|
||||
printf "%25s%s", "e+2: ", "h, hecto"; print "\n";
|
||||
printf "%25s%s", "e+1: ", "da, deka"; print "\n";
|
||||
printf "%25s%s", "e-1: ", "d, deci"; print "\n";
|
||||
printf "%25s%s", "e-2: ", "c, centi"; print "\n";
|
||||
printf "%25s%s", "e-3: ", "m, milli"; print "\n";
|
||||
printf "%25s%s", "e-6: ", "μ, u, micro"; print "\n";
|
||||
printf "%25s%s", "e-9: ", "n, nano"; print "\n";
|
||||
printf "%25s%s", "e-12: ", "p, pico"; print "\n";
|
||||
printf "%25s%s", "e-15: ", "f, femto"; print "\n";
|
||||
printf "%25s%s", "e-18: ", "a, atto"; print "\n";
|
||||
printf "%25s%s", "e-21: ", "z, zepto"; print "\n";
|
||||
printf "%25s%s", "e-24: ", "y, yocto"; print "\n";
|
||||
|
||||
print "\n";
|
||||
|
||||
print "-" x 50 . "\n";
|
||||
print "Commonly Used Units\n";
|
||||
print "-" x 50 . "\n";
|
||||
|
||||
print "\n";
|
||||
|
||||
print "Time\n";
|
||||
print "-" x 50 . "\n";
|
||||
printf "%25s%s", "Days: ", "d, day[s]"; print "\n";
|
||||
printf "%25s%s", "Hours: ", "h, hour[s]"; print "\n";
|
||||
printf "%25s%s", "Minutes: ", "m, minute[s]"; print "\n";
|
||||
printf "%25s%s", "Seconds: ", "s, second[s]"; print "\n";
|
||||
printf "%25s%s", "Milliseconds: ", "ms, millisecond[s]"; print "\n";
|
||||
printf "%25s%s", "Microseconds: ", "μs, microsecond[s]"; print "\n";
|
||||
|
||||
print "\n";
|
||||
|
||||
print "Length\n";
|
||||
print "-" x 50 . "\n";
|
||||
printf "%25s%s", "Astronomical Units: ", "au, astronomical_unit[s]"; print "\n";
|
||||
printf "%25s%s", "Nautical Miles: ", "nmile, nautical_mile[s]"; print "\n";
|
||||
printf "%25s%s", "Kilometers: ", "km, kilometer[s]"; print "\n";
|
||||
printf "%25s%s", "Meters: ", "m, meter[s]"; print "\n";
|
||||
printf "%25s%s", "Centimeters: ", "cm, centimeter[s]"; print "\n";
|
||||
printf "%25s%s", "Millimeters: ", "mm, millimeter[s]"; print "\n";
|
||||
printf "%25s%s", "Micrometers: ", "μm, um, micrometer[s]"; print "\n";
|
||||
printf "%25s%s", "Miles: ", "mi, mile[s]"; print "\n";
|
||||
printf "%25s%s", "Yards: ", "yd, yard[s]"; print "\n";
|
||||
printf "%25s%s", "Feet: ", "ft, foot, feet"; print "\n";
|
||||
printf "%25s%s", "Inches: ", "in, inch[es]"; print "\n";
|
||||
|
||||
print "\n";
|
||||
|
||||
print "Angle\n";
|
||||
print "-" x 50 . "\n";
|
||||
printf "%25s%s", "Radians: ", "rad, radian[s]"; print "\n";
|
||||
printf "%25s%s", "Degrees: ", "°, degree[s]"; print "\n";
|
||||
printf "%25s%s", "Arcminutes: ", "′, arcminute[s]"; print "\n";
|
||||
printf "%25s%s", "Arcseconds: ", "″, arcsecond[s]"; print "\n";
|
||||
|
||||
print "\n";
|
||||
|
||||
print "Mass\n";
|
||||
print "-" x 50 . "\n";
|
||||
printf "%25s%s", "Kilograms: ", "kg, kilogram[s]"; print "\n";
|
||||
printf "%25s%s", "Grams: ", "g, gram[s]"; print "\n";
|
||||
printf "%25s%s", "Slugs: ", "slug[s]"; print "\n";
|
||||
printf "%25s%s", "Pounds: ", "lb, pound[s]"; print "\n";
|
||||
|
||||
print "\n";
|
||||
|
||||
print "Force\n";
|
||||
print "-" x 50 . "\n";
|
||||
printf "%25s%s", "Newtons: ", "N, newton[s], kg.m/s^2, kg.m/s²"; print "\n";
|
||||
printf "%25s%s", "Pound Force: ", "lbf, pound[s]_force"; print "\n";
|
||||
|
||||
print "\n";
|
||||
|
||||
print "Voltage\n";
|
||||
print "-" x 50 . "\n";
|
||||
printf "%25s%s", "Volts: ", "V, volt[s]"; print "\n";
|
||||
printf "%25s%s", "Millivolts: ", "mV, millivolt[s]"; print "\n";
|
||||
printf "%25s%s", "Microvolts: ", "μV, uV, microvolt[s]"; print "\n";
|
||||
|
||||
print "\n";
|
||||
|
||||
print "Current\n";
|
||||
print "-" x 50 . "\n";
|
||||
printf "%25s%s", "Amperes: ", "A, amp[s], ampere[s]"; print "\n";
|
||||
printf "%25s%s", "Milliamperes: ", "mA, milliamp[s]"; print "\n";
|
||||
printf "%25s%s", "Microamperes: ", "μA, uA, microamp[s]"; print "\n";
|
||||
|
||||
print "\n";
|
||||
|
||||
print "Resistance\n";
|
||||
print "-" x 50 . "\n";
|
||||
printf "%25s%s", "Ohms: ", "Ω, ohm[s]"; print "\n";
|
||||
printf "%25s%s", "Kiloohms: ", "kΩ, kiloohm[s]"; print "\n";
|
||||
printf "%25s%s", "Megaohms: ", "MΩ, megaohm[s]"; print "\n";
|
||||
|
||||
print "\n";
|
||||
|
||||
print "Temperature\n";
|
||||
print "-" x 50 . "\n";
|
||||
printf "%25s%s", "Kelvin: ", "K, °K, degK"; print "\n";
|
||||
printf "%25s%s", "Centigrade: ", "°C, degC"; print "\n";
|
||||
printf "%25s%s", "Fahrenheit: ", "°F, degF"; print "\n";
|
||||
printf "%25s%s", "Rankine: ", "°R, degF"; print "\n";
|
||||
|
||||
print "\n";
|
||||
|
||||
print "Energy\n";
|
||||
print "-" x 50 . "\n";
|
||||
printf "%25s%s", "Joules: ", "J, joule[s]"; print "\n";
|
||||
printf "%25s%s", "Megajoules: ", "MJ, Mjoule[s], megajoule[s]"; print "\n";
|
||||
printf "%25s%s", "Watt Hours: ", "W.h, watt.hour[s]"; print "\n";
|
||||
printf "%25s%s", "Kilowatt Hours: ", "kW.h, kilowatt.hour[s]"; print "\n";
|
||||
printf "%25s%s", "BTUs: ", "BTU[s]"; print "\n";
|
||||
|
||||
print "\n";
|
||||
|
||||
print "Power\n";
|
||||
print "-" x 50 . "\n";
|
||||
printf "%25s%s", "Watt: ", "W, watt[s]"; print "\n";
|
||||
printf "%25s%s", "Kilowatt: ", "kW, kilowatt[s]"; print "\n";
|
||||
printf "%25s%s", "Megawatt: ", "MW, megawatt[s]"; print "\n";
|
||||
printf "%25s%s", "Horsepower: ", "hp, horsepower"; print "\n";
|
||||
|
||||
print "\n";
|
||||
|
||||
print "Pressure\n";
|
||||
print "-" x 50 . "\n";
|
||||
printf "%25s%s", "Pascals: ", "Pa, pascal[s]"; print "\n";
|
||||
printf "%25s%s", "Atmospheres: ", "atm, atmosphere[s]"; print "\n";
|
||||
printf "%25s%s", "Inches of Mercury: ", "inHg, inch[es]_Hg"; print "\n";
|
||||
printf "%25s%s", "Millimeters of Mercury: ", "mmHg, millimeter[s]_Hg"; print "\n";
|
||||
printf "%25s%s", "Pounds per Square Inch: ", "psi"; print "\n";
|
||||
|
||||
print "\n";
|
||||
|
||||
print "Volume\n";
|
||||
print "-" x 50 . "\n";
|
||||
printf "%25s%s", "Liter: ", "l, liter[s]"; print "\n";
|
||||
printf "%25s%s", "Cubic Centimeters (cc): ", "cm^3, cm³, (cm)³"; print "\n";
|
||||
printf "%25s%s", "Gallon: ", "gallon[s]"; print "\n";
|
||||
printf "%25s%s", "Ounces: ", "oz"; print "\n";
|
||||
|
||||
print "\n";
|
||||
|
||||
print "Frequency\n";
|
||||
print "-" x 50 . "\n";
|
||||
printf "%25s%s", "Hertz: ", "Hz, hertz, 1/s"; print "\n";
|
||||
printf "%25s%s", "Kilohertz: ", "kHz, kilohertz, kiloHz"; print "\n";
|
||||
printf "%25s%s", "Megahertz: ", "MHz, megahertz, megaHz"; print "\n";
|
||||
|
||||
print "\n";
|
||||
|
||||
print "-" x 50 . "\n";
|
||||
print "Unit Specification Unicode Characters\n";
|
||||
print "-" x 50 . "\n";
|
||||
printf "%26s%s", "°: ", "U+00B0 (Degree Sign)"; print "\n";
|
||||
printf "%26s%s", "²: ", "U+00B2 (Superscript Two)"; print "\n";
|
||||
printf "%26s%s", "³: ", "U+00B3 (Superscript Three)"; print "\n";
|
||||
printf "%26s%s", "Ω: ", "U+03A9 (Greek Uppercase Omega)"; print "\n";
|
||||
printf "%26s%s", "μ: ", "U+03BC (Greek Lowercase Mu)"; print "\n";
|
||||
printf "%26s%s", "π: ", "U+03C0 (Greek Lowercase Pi)"; print "\n";
|
||||
printf "%27s%s", "′: ", "U+2032 (Prime)"; print "\n";
|
||||
printf "%27s%s", "″: ", "U+2033 (Double Prime)"; print "\n";
|
||||
printf "%27s%s", "℃ : ", "U+2103 (Degree Celsius)"; print "\n";
|
||||
printf "%27s%s", "℉ : ", "U+2109 (Degree Fahrenheit)"; print "\n";
|
||||
printf "%27s%s", "Ω: ", "U+2126 (Ohm Sign)"; print "\n";
|
||||
printf "%27s%s", "K: ", "U+212A (Kelvin Sign)"; print "\n";
|
||||
printf "%27s%s", "Å: ", "U+212B (Angstrom Sign)"; print "\n";
|
||||
|
||||
print "\n";
|
@ -680,6 +680,7 @@ WARN_LOGFILE = $(TRICK_HOME)/doxygen/warning_msgs
|
||||
|
||||
INPUT = $(TRICK_HOME)/doxygen \
|
||||
$(TRICK_HOME)/trick_source
|
||||
$(TRICK_HOME)/include
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
|
||||
|
@ -1,80 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use strict ;
|
||||
|
||||
sub read_file($$$) {
|
||||
my ($file_name, $levels, $prefix) = @_ ;
|
||||
my ($out_file_name) ;
|
||||
my ($ii) ;
|
||||
|
||||
local *FILE ;
|
||||
local *OUTFILE ;
|
||||
|
||||
if ( $file_name =~ /dox_in$/ ) {
|
||||
|
||||
if ( ! -e $file_name ) {
|
||||
if ( ! -e "$ENV{TRICK_HOME}/trick_source/$file_name" ) {
|
||||
die "could not open $file_name" ;
|
||||
} else {
|
||||
$file_name = "$ENV{TRICK_HOME}/trick_source/$file_name" ;
|
||||
}
|
||||
}
|
||||
open FILE, "$file_name" or die "could not open $file_name" ;
|
||||
|
||||
$out_file_name = $file_name ;
|
||||
$out_file_name =~ s/_in$// ;
|
||||
open OUTFILE, "> $out_file_name" or die "could not open $file_name" ;
|
||||
|
||||
while ( <FILE> ) {
|
||||
|
||||
if ( /^#include\s+"(.*?)"/ ) {
|
||||
|
||||
my ($include_file) = $1 ;
|
||||
my ($out_include_file) ;
|
||||
|
||||
$out_include_file = $include_file ;
|
||||
if ( $out_include_file =~ s/_in$// ) {
|
||||
print OUTFILE "#include \"$out_include_file\"\n" ;
|
||||
read_file($include_file, $levels, $prefix) ;
|
||||
} else {
|
||||
print OUTFILE ;
|
||||
}
|
||||
|
||||
} elsif ( /^(.*?)LEVEL(\d+)(cont)?(.*)/ ) {
|
||||
|
||||
my ($tag) = $1 ;
|
||||
my ($level) = $2 ;
|
||||
my ($cont) = $3 ;
|
||||
my ($title) = $4 ;
|
||||
my ($section, $level_dots) ;
|
||||
|
||||
if ( $cont eq "" ) {
|
||||
$$levels[$level]++ ;
|
||||
for( $ii = $level + 1 ; $ii < 8 ; $ii++ ) {
|
||||
$$levels[$ii] = 0 ;
|
||||
}
|
||||
}
|
||||
$section = sprintf "$prefix%02d" , $$levels[1] ;
|
||||
$level_dots = "$$levels[1]" ;
|
||||
for( $ii = 2 ; $ii <= $level ; $ii++ ) {
|
||||
#$section .= $$levels[$ii] ;
|
||||
$section .= sprintf "%02d" , $$levels[$ii] ;
|
||||
$level_dots .= ".$$levels[$ii]" ;
|
||||
}
|
||||
if ( $tag =~ /\@\w+\s+$/ ) {
|
||||
print OUTFILE "$tag$section $level_dots $title\n" ;
|
||||
} else {
|
||||
print OUTFILE "$tag$level_dots $title\n" ;
|
||||
}
|
||||
|
||||
} else {
|
||||
print OUTFILE ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
my @levels = { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } ;
|
||||
|
||||
die "Usage: auto_number.pl <prefix>" if ( scalar @ARGV != 1 ) ;
|
||||
read_file("main_page.dox_in", \@levels, @ARGV[0]) ;
|
@ -1,7 +0,0 @@
|
||||
|
||||
/**
|
||||
@page LEVEL1 Building a Simulation
|
||||
|
||||
*/
|
||||
|
||||
|
@ -1,354 +0,0 @@
|
||||
/**
|
||||
@page LEVEL2 convert_swig
|
||||
|
||||
The purpose of convert_swig is to create SWIG interface files for the given
|
||||
C/C++ header file (usually S_source.hh) and each of the header files that it
|
||||
(recursively) includes. SWIG (Simplified Wrapper and Interface Generator) is
|
||||
an interface compiler that connects programs written in C and C++ with scripting
|
||||
languagues such as Perl and Python.
|
||||
|
||||
@dot
|
||||
digraph Call_Graph {
|
||||
|
||||
convert_swig -> process_file
|
||||
|
||||
process_file -> abs_path
|
||||
process_file -> base_name
|
||||
process_file -> dirname
|
||||
process_file -> process_contents
|
||||
process_file -> md5hex
|
||||
|
||||
process_contents -> process_typedef_struct
|
||||
process_contents -> process_namespace
|
||||
process_contents -> process_class
|
||||
|
||||
process_namespace -> extract_bracketed
|
||||
process_namespace -> process_contents
|
||||
|
||||
process_class -> extract_bracketed
|
||||
|
||||
process_typedef_struct -> extract_bracketed
|
||||
}
|
||||
@enddot
|
||||
|
||||
In Trick the list of header files to be processed is usually produced by the script
|
||||
make_swig_makefile.pm, as it's creating Makefile_swig. This list is stored in
|
||||
the file ".S_library_swig". So, if .S_library_swig exists, we can just open and read it.
|
||||
|
||||
Otherwise we need to process S_source.hh to produce the list of header files.
|
||||
|
||||
Specifically, we want to generate SWIG interfaces for those header files that are:
|
||||
\li 1) actual dependencies of S_source.hh, GIVEN THE CURRENT environment and
|
||||
\li 2) not excluded from ICG processing ( by ICG_NO or ICG_EXCLUDE).
|
||||
|
||||
The header files that are actually included are the dependencies we care
|
||||
about. Keep in mind that the pre-processor and the current ENVIRONMENT
|
||||
may cause some headers to be conditionally included or excluded. We only
|
||||
want to generate SWIG interfaces for headers that are ACTUALLY included.
|
||||
|
||||
Whereas the pre-processor can (using the gcc -MM option) generate a list
|
||||
of dependencies that satisfy 1) (above), it can't handle that ICG exclusions.
|
||||
And, whereas the function get_headers() can generate a list of dependences
|
||||
which are flagged if they contain ICG_NO, it doesn't handle conditional includes.
|
||||
|
||||
So, the strategy that we employ is to generate and then find the
|
||||
intersection of both lists. Then we eliminate those that are in 1)
|
||||
$TRICK_HOME/trick_source, or 2) flagged as containing ICG_NO or 3) are
|
||||
in ICG_EXCLUDE'd directories.
|
||||
|
||||
First, create a list headers using the GCC with the -MM option. GCC will
|
||||
handle conditional inclusion.
|
||||
|
||||
Second, create a list where the files are flagged if they contain ICG_NO.
|
||||
|
||||
Then we generate the intersection of the two lists and then eliminate the dependencies that:
|
||||
\li 1) are in $TRICK_HOME/trick_source.
|
||||
\li 2) contain ICG_NO.
|
||||
\li 3) are in ICG_EXCLUDE'd directories.
|
||||
|
||||
to create the final list of header dependencies that we need to convert into SWIG interfaces.
|
||||
|
||||
Next we need to determine which of the files do not have up-to-date SWIG files.
|
||||
For each header file in final dependency list, if the corresponding SWIG (.i) file
|
||||
doesn't exist or the header file is newer than the existing SWIG file, then record
|
||||
that a new SWIG file needs needs to be created. The global hash %out_of_date
|
||||
represents a list of header files whose corresponding .i files need to be regenerated.
|
||||
|
||||
Finally, call process_file() to create SWIG interface files for each of the out_of_date headers.
|
||||
|
||||
|
||||
@section LEVEL3 process_file
|
||||
|
||||
@subsection LEVEL4 Synopsis
|
||||
|
||||
This subroutine processes S_source.h and each of it's requisite header files to
|
||||
generate the corresponding SWIG interfaces files.
|
||||
|
||||
@subsection LEVEL4 Parameters
|
||||
|
||||
<b>sim_ref</b> Is this parameter ever used?
|
||||
|
||||
<b>in_file</b> The name of input file, invariably "S_source.hh".
|
||||
|
||||
@subsection LEVEL4 Design
|
||||
|
||||
This function first reads the contents of <in_file> and each of the header files
|
||||
that it (recursively) includes into a hash (%file_contents), keyed by the
|
||||
corresponding filenames. It then converts the contents of the each header whose
|
||||
corresponding SWIG interface file is out of date into a SWIG interface file.
|
||||
|
||||
@subsubsection LEVEL5 "Creating the %file_contents hash"
|
||||
|
||||
To create the file_contents hash, we first run the input file through the
|
||||
C/C++ pre-processor with the -dI option. This creates <b>one</b> file containing
|
||||
the contents of all of the included header files delimited by "line markers".
|
||||
The line markers indicate which header file each of content came from.
|
||||
Preprocessor line markers are of the form: '#' <linenum> <filename> <flags>
|
||||
They are described in Chapter 9, "Preprocessor Output" of the GCC document,
|
||||
"Preprocessor Output - The C Preprocessor". Whether in_file is run through
|
||||
the C or C++ preprocessor depends on its name suffix.
|
||||
|
||||
For each line in the ONE big file, check whether it's a linemarker or not.
|
||||
if it's a linemarker ( telling us where the following content is from)
|
||||
extract the header filename. This will be our current filecontents hash key.
|
||||
If it's not a linemarker, then it must be content. So, append it to the string,
|
||||
whose key is the current file name ($curr_name).
|
||||
|
||||
@subsubsection LEVEL5 "Creating SWIG interface files"
|
||||
|
||||
The global hash <i>\%out_of_date</i> represents the list of header files whose
|
||||
corresponding SWIG interface files are out of date. It is generated in the main
|
||||
part of the convert_swig program.
|
||||
|
||||
For each of these out of date header files, we generate a SWIG interface file
|
||||
from the contents stored in the <i>\%file_contents</i> hash.
|
||||
|
||||
First we remove the friend init_attr functions from the headers content.
|
||||
They don't need to be wrapped.
|
||||
|
||||
Then, for each of the #includes in the out_of_date header file
|
||||
create a corresponding %import directive.
|
||||
|
||||
Next, we generate a module name and path for the SWIG interface file. The module
|
||||
name is generated from an md5 hash of the header file's full name.
|
||||
|
||||
Finally we open the SWIG interface file, and in it we:
|
||||
\li write a %module directive that identifies the module.
|
||||
\li write a #include directive to include trick_swig interface utilities.
|
||||
\li write a #include directive to include the header file to which this
|
||||
interface file corresponds and from which it was derived.
|
||||
\li create a SWIG interface for each class declared in the corresponding
|
||||
header file using the %trick_swig_class_typemap() macro. This macro is
|
||||
defined in swig_class_typedef.i, included by trick_swig.i (see above).
|
||||
\li Write the SWIG interface code (processed header file) and the header
|
||||
file contents.
|
||||
|
||||
|
||||
@section LEVEL3 process_contents
|
||||
|
||||
@subsection LEVEL4 Synopsis
|
||||
|
||||
Process header file contents for use in the corresponding SWIG interface file.
|
||||
|
||||
@subsection LEVEL4 Parameters
|
||||
|
||||
<b>contents_ref</b>
|
||||
(IN) reference to header file contents that are to be converted to a SWIG interface.
|
||||
|
||||
<b>new_contents_ref</b>
|
||||
(OUT) SWIG interface code, derived from the header file contents.
|
||||
|
||||
<b>curr_namespace</b>
|
||||
(IN) current namespace.
|
||||
|
||||
<b>class_names_ref</b>
|
||||
(OUT) reference to an array of class and/or struct names encountered when
|
||||
processing the header file contents.
|
||||
|
||||
<b>template_typedefs_ref</b>
|
||||
(OUT) Series of SWIG %template directives. %template directives create a type in
|
||||
the target language that corresponds to a C++ template instance.
|
||||
|
||||
@subsection LEVEL4 Description
|
||||
|
||||
While there's header file content remaining to be processed, repeatedly make the
|
||||
best match with the following available patterns:
|
||||
|
||||
Case of :<br>
|
||||
<b>typedef</b> <i>existing-type-name new-type-name</i> <b>';'</b><br>
|
||||
Concatenate the matched text to the SWIG interface text.
|
||||
|
||||
Case of :<br>
|
||||
<b>typedef enum</b> <i>optional-name</i> <b>'{'</b> <i>bracketed-content</i> <b>'}'</b> <i>enum-name</i><b>';'</b><br>
|
||||
Concatenate the matched text to the SWIG interface text.
|
||||
|
||||
Case of :<br>
|
||||
<b>typedef</b> ( <b>struct</b> | <b>union</b> ) <i>name</i> <b>'{'</b><br>
|
||||
Call process_typedef_struct() to process the matched text and the bracketed
|
||||
content of the struct that follows in the header file contents and update the
|
||||
SWIG interface text accordingly.
|
||||
|
||||
Case of :<br>
|
||||
<b>template '<'</b> <i>template-parameters</i> <b>'>' class</b> <i>class-name</i><br>
|
||||
then just concatenate the matched text to the SWIG interface text.
|
||||
|
||||
Case of:<br>
|
||||
<b>namespace</b> <i>name</i><br>
|
||||
then call <i>process_namespace()</i> to process the matched text and the
|
||||
bracketed content that follows in the header file contents and update the the
|
||||
SWIG interface text accordingly.
|
||||
|
||||
Case of:<br>
|
||||
( <b>class</b> | <b>struct</b> ) <i>class-name</i> ( <b>'{'</b> | <b>':'</b> )<br>
|
||||
Call <i>process_class()</i> to process the matched text and the bracketed
|
||||
that follows in the header file contents and update the the SWIG interface text.
|
||||
|
||||
Default:
|
||||
Match anything that doesn't match the other patterns and concatenate it to the
|
||||
to the SWIG interface text. Note that (in Perl) <b>*?</b> in the regular
|
||||
expression <b>(.*?)</b> is a non-greedy quantifier, so it gobbles up text only
|
||||
until another match can be made.
|
||||
|
||||
@section LEVEL3 process_namespace
|
||||
|
||||
@subsection LEVEL4 Synopsis
|
||||
|
||||
Process namespaces found in a header file for use in the corresponding SWIG
|
||||
interface file.
|
||||
|
||||
@subsection LEVEL4 Parameters
|
||||
|
||||
<b>namespace_string</b>
|
||||
(IN) This is a string of the form: <b>namespace</b> <i>name</i>, that was
|
||||
extracted from the header file contents. In the contents there should remain the bracketed
|
||||
content to which this namespace applies.
|
||||
|
||||
<b>contents_ref</b>
|
||||
(IN) This is a reference to the remainder of the header file (following the
|
||||
above string) to be processed.
|
||||
|
||||
<b>new_contents_ref</b>
|
||||
(OUT) The SWIG code generated so far.
|
||||
|
||||
<b>curr_namespace</b>
|
||||
(IN) current namespace.
|
||||
|
||||
<b>class_names_ref</b>
|
||||
(OUT) reference to an array of class and/or struct names encountered when
|
||||
processing the header file contents.
|
||||
|
||||
<b>template_typedefs_ref</b>
|
||||
(OUT) Series of SWIG %template directives. %template directives create a type
|
||||
in the target language that corresponds to a C++ template instance.
|
||||
|
||||
@subsection LEVEL4 Description
|
||||
|
||||
Extract the name from the <b>namespace_string</b> and append it to the current namespace's name.
|
||||
|
||||
Add the <b>namespace_string</b> to the SWIG interface text.
|
||||
|
||||
Call extract_bracketed() to extract the contents of the namespace from the header text.
|
||||
|
||||
Call process_contents() to convert the extracted namespace contents to a SWIG interface.
|
||||
|
||||
Append whatever wasn't matched in process contents to the SWIG interface text.
|
||||
|
||||
@section LEVEL3 process_class
|
||||
|
||||
@subsection LEVEL4 Synopsis
|
||||
Process classes declarations found in a header file for use in the corresponding
|
||||
SWIG interface file.
|
||||
|
||||
@subsection LEVEL4 Parameters
|
||||
|
||||
<b>class_string</b>
|
||||
(IN) This is a string of the form:<br>
|
||||
\li ( <b>class</b> | <b>struct</b> ) <i>class-name</i> ( <b>'{'</b> | <b>':'</b> )<br>
|
||||
|
||||
<b>contents_ref</b>
|
||||
(IN) This is a reference to the remainder of the header file (following the
|
||||
class_string) to be processed.
|
||||
|
||||
<b>new_contents_ref</b>
|
||||
(OUT) The SWIG code generated so far.
|
||||
|
||||
<b>curr_namespace</b>
|
||||
(IN) current namespace.
|
||||
|
||||
<b>class_names_ref</b>
|
||||
(OUT) reference to an array of class and/or struct names encountered when
|
||||
processing the header file contents.
|
||||
|
||||
<b>template_typedefs_ref</b>
|
||||
(OUT) Series of SWIG %template directives. %template directives create a type
|
||||
in the target language that corresponds to a C++ template instance.
|
||||
|
||||
@subsection LEVEL4 Description
|
||||
|
||||
process_class() processes class declarations with the following steps:
|
||||
|
||||
\li Extract the class_name from the class_string.
|
||||
Add the <b>class_string</b> to the SWIG interface text.
|
||||
|
||||
\li Call <b>extract_bracketed()</b> to extract the class contents between '{' and '}'.
|
||||
|
||||
\li While there's class content text remaining to be processed,
|
||||
repeatedly search for data members that match : <b>template_name '<'</b> <i>template-params</i> <b>'>' name ;</b>
|
||||
For each match, create a SWIG %template directive to create an instanciation
|
||||
of the specific templated type used by the data member. Add the
|
||||
SWIG %template directive to the templated typedefs string that
|
||||
Otherwise append whatever wasn't matched in process contents to
|
||||
the SWIG interface text.
|
||||
|
||||
@section LEVEL3 process_typedef_struct
|
||||
|
||||
@subsection LEVEL4 Synopsis
|
||||
|
||||
Process a type definition of a struct or union to make it suitable as SWIG
|
||||
interface code. Extract the struct (or union) name and bracketed contents from
|
||||
the header file text (typedef_struct_string and contents_ref) . Record the
|
||||
extracted names in the list referenced by class_names_ref, and then reconsistute
|
||||
the type definition, via the new_contents_ref.
|
||||
|
||||
@subsection LEVEL4 Parameters
|
||||
|
||||
<b>typedef_struct_string</b>
|
||||
(IN) This is a string of the form:<br>
|
||||
\li <b>typedef struct</b> [ <i>optional-name</i> ] <b>"{"</b> OR<br>
|
||||
\li <b>typedef union</b> [ <i>optional-name</i> ] <b>"{"</b><br>
|
||||
|
||||
<b>contents_ref</b>
|
||||
(IN) This is a reference to the remainder of the header file (following the
|
||||
above string) to be processed.
|
||||
|
||||
<b>new_contents_ref</b>
|
||||
(OUT) The SWIG interface code generated so far.
|
||||
|
||||
<b>class_names_ref</b>
|
||||
(OUT) reference to an array of class and/or struct names encountered when
|
||||
processing the header file contents.
|
||||
|
||||
@subsection LEVEL4 Description
|
||||
|
||||
process_typedef_struct() processes a type definition of a struct or union
|
||||
with the following steps:
|
||||
|
||||
\li Append the <b>typedef_struct_string</b> to the SWIG interface text
|
||||
(via <b>new_contents_ref</b>).
|
||||
|
||||
\li Extract the optional-name from the typedef_struct_string.
|
||||
|
||||
\li Call extract_bracketed() to extract the struct contents from the header
|
||||
text (via <b>contents_ref</b>), including the right bracket.
|
||||
|
||||
\li Extract the one or more typedef'ed names followed by a semi-colon, that
|
||||
should still be in the header text.
|
||||
|
||||
\li Push the optional-name and the typedef'ed names into the class_names list
|
||||
(via <b>class_names_ref</b>).
|
||||
|
||||
\li Append the bracketed struct contents and the one or more typedef'ed names
|
||||
and the semi-colon that we just extracted to the SWIG interface text.
|
||||
|
||||
|
||||
*/
|
@ -1,17 +0,0 @@
|
||||
|
||||
/**
|
||||
@page LEVEL1 Data Products
|
||||
|
||||
@section LEVEL2 Data
|
||||
|
||||
@section LEVEL2 DP Specification Files
|
||||
|
||||
@section LEVEL2 Session Files
|
||||
|
||||
@section LEVEL2 Overall Architecture
|
||||
|
||||
@section LEVEL2 Class Architecture
|
||||
|
||||
*/
|
||||
|
||||
|
@ -1,17 +0,0 @@
|
||||
/**
|
||||
@page LEVEL1 Introduction
|
||||
|
||||
@section LEVEL2 Scope
|
||||
|
||||
@section LEVEL2 Concept
|
||||
|
||||
@section LEVEL2 Developer/Trick Interface
|
||||
|
||||
@section LEVEL2 Simulation Executable and Input/Output
|
||||
|
||||
@section LEVEL2 Developer/Data Interface
|
||||
|
||||
@section LEVEL2 Communicating With External Processes or Devices
|
||||
|
||||
*/
|
||||
|
@ -1,45 +0,0 @@
|
||||
|
||||
/**
|
||||
@page design Trick Design
|
||||
|
||||
@subpage d01 "1 Introduction"<br>
|
||||
@subpage d02 "2 Building a Simulation"<br>
|
||||
@subpage d0201 "2.1 Interface Code Generator"<br>
|
||||
@subpage d0202 "2.2 Convert Swig"<br>
|
||||
@subpage d03 "3 Running a Simulation"<br>
|
||||
@subpage d0301 "3.1 Simulation Executive"<br>
|
||||
@subpage d0302 "3.2 Scheduled Job Queue"<br>
|
||||
@subpage d0303 "3.3 Real-Time Synchronization"<br>
|
||||
@subpage d0304 "3.4 Real-Time Clock"<br>
|
||||
@subpage d0305 "3.5 Sleep Timer"<br>
|
||||
@subpage d0306 "3.6 Data Recording"<br>
|
||||
@subpage d0307 "3.7 Command Line Arguments"<br>
|
||||
@subpage d0308 "3.8 Monte Carlo and Optimization"<br>
|
||||
@subpage d0309 "3.9 Integrator"<br>
|
||||
@subpage d04 "4 Data Products"<br>
|
||||
|
||||
*/
|
||||
|
||||
// section 1
|
||||
#include "introduction.dox_in"
|
||||
|
||||
// section 2
|
||||
#include "build_sim.dox_in"
|
||||
#include "codegen/Interface_Code_Gen/design.dox_in"
|
||||
#include "convert_swig.dox_in"
|
||||
|
||||
// section 3
|
||||
#include "run_sim.dox_in"
|
||||
#include "sim_services/Executive/docs/design.dox_in"
|
||||
#include "sim_services/ScheduledJobQueue/design.dox_in"
|
||||
#include "sim_services/RealtimeSync/docs/design.dox_in"
|
||||
#include "sim_services/Clock/docs/design.dox_in"
|
||||
#include "sim_services/Timer/docs/design.dox_in"
|
||||
#include "sim_services/DataRecord/docs/design.dox_in"
|
||||
#include "sim_services/CommandLineArguments/docs/design.dox_in"
|
||||
#include "sim_services/MonteCarlo/docs/design.dox_in"
|
||||
#include "sim_services/Integrator/design.dox_in"
|
||||
|
||||
// section 4
|
||||
#include "data_products.dox_in"
|
||||
|
@ -1,6 +0,0 @@
|
||||
|
||||
/**
|
||||
@page LEVEL1 Running a Simulation
|
||||
|
||||
*/
|
||||
|
Before Width: | Height: | Size: 151 KiB |
Before Width: | Height: | Size: 294 KiB |
Before Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 96 KiB |
Before Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 155 KiB |
Before Width: | Height: | Size: 112 KiB |
Before Width: | Height: | Size: 501 KiB |
Before Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 94 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 9.9 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 7.8 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 111 KiB |
Before Width: | Height: | Size: 9.8 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 9.3 KiB |
Before Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 7.8 KiB |
Before Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 89 KiB |
Before Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 94 KiB |
Before Width: | Height: | Size: 126 KiB |