Commit Graph

524 Commits

Author SHA1 Message Date
Alex Lin
20dc7b1386 Functions with enumerated default arguments bad
Found a side effect of SWIG's "compactdefaultargs".  It highlighted an
error we had in creating the data_record group in our ball sim.  We did
not release the memory from python and it was causing a double free
at exit.

refs #176
2016-02-18 09:56:11 -06:00
Alex Lin
83572b20cb Print some timing statistics when the sim exits
Saved the timestamps on the default gettimeofday clock as close to
the beginning of the simulation, after initialization is finished and
at the end of shutdown.  Printed out the elapsed time as well as
the number of overruns counted by RealtimeSync.

refs #183
2016-02-17 16:27:37 -06:00
Alex Lin
b4f0906e03 Merge in the er7_utils integrators
Added .gitignore for created makefiles in er7_utils.

refs #180
2016-02-11 14:13:25 -06:00
Alex Lin
6eef449a1c Don't process header files installed by Homebrew
Added /usr/local/Cellar to ICG's list of system header locations.

refs #181
2016-02-11 09:33:53 -06:00
Alex Lin
8a535cc44f Merge in the er7_utils integrators
Wasn't supposed to add the CheckpointHelper.

refs #180
2016-02-10 11:21:54 -06:00
Alex Lin
4c3015851f Merge in the er7_utils integrators
Taking in the latest er7_utils directory and adding it into Trick in the
same location it was as an external repository.  Made one change to
the files_to_ICG.hh file in the repository to remove the CheckpointHelper
header files.  Those go in the Trick files_to_ICG.hh file.

refs #180
2016-02-10 09:32:53 -06:00
Alex Lin
2ca4b72cee Trick model files found in external libraries are not being included correctly
Found that the list of swig files we should expect from external libraries
was incorrectly cleared before it was being used.  This still allows the
sim to compile, but no information about the models in the library are
available in the input file.

refs #179
2016-02-09 11:13:09 -06:00
Alex Lin
2b30a92342 Trick parsing comments improperly
When I split the comment remover into 2 regular expressions I reversed
the order removing C style comments before c++.  This caused this error
where a /* in a C++ comment made Trick look for the end of the C style
comment and it may never find the end.

refs #178
2016-02-05 11:19:53 -06:00
Alex Lin
6461b50d7d Setting framelog sample size does not work.
Setting the frame log size only resized the time line graph, not the normal
frame log groups.  Added code to change the size of the normal frame log
groups in addition to the time line.

refs #177
2016-02-04 16:13:05 -06:00
Alex Lin
030f44132c Merge branch 'master' of https://github.com/nasa/trick 2016-02-04 16:09:51 -06:00
Alex Lin
c9d5be4b95 Functions with enumerated default arguments bad
After digging around the SWIG issues database I found a feature
compactdefaultargs that creates a call to functions with default
arguments like it did before.  The important part is that the
code runs.

refs #176
2016-02-04 15:54:12 -06:00
Alex Lin
8529bd8648 make_makefile_swig writing duplicate rules
Used a hash instead of an array to store the names of files that
we need to process.  This eliminates duplicates.

refs #175
2016-02-04 15:48:29 -06:00
Alex Lin
447585ad16 ICG processing files it is supposed to skip
We pull file names out of the clang infrastructure to match where
classes are defined.  We use the file name to pull comments and find
and process Trick header comments.  Up to now clang gave us the realpath
of files and when we looked up comments we already had the realpath and
everything worked.  In clang 3.6 in some places we are not getting the
realpath anymore which confuses ICG.  Added code to get the realpath of
any file name we use throughout the code.

refs #167
2016-02-04 15:43:14 -06:00
Alex Lin
b9c871328b Introduce Open Dynamics Engine examples
Added a 3 wheeled car example from the ODE demos.  I collapsed all of the separate classes
handling the world, objects, and drawings into a single class.  Each world is different
and just including that with the objects for these simple examples is easier.  Same goes
for the drawing.

refs #172
2016-02-02 11:19:25 -06:00
Alex Lin
362366b908 er7_utils rkn4 directory is not compiled
Yup, it's not.  No one notices we've left it out for a couple of
years now.  I've added the directory to the list of directories to compile.

refs #173
2016-01-29 10:13:56 -06:00
Alex Lin
fa29891ded Introduce Open Dynamics Engine examples
Changed the regular expressions that removes comments in convert_swig to
try and handle C style comments found in multiline #define statements.

Also added a TRICK_ICG_NOCOMMENT line to SIM_ode to stop ICG from
trying to process non-Trick comments in the ODE directory.

refs #172
2016-01-29 09:43:43 -06:00
Alex Lin
71dab9ed45 Introduce Open Dynamics Engine examples
I want Trick to parse and understand ODE header files.  The ODE header files
include some typedef constructs ICG was skipping.  Added code to handle the
typedefs we did not handle before.  Also made a small change the way
TRICK_ICG_EXCLDUE and TRICK_EXCLUDE are used so that they support excluding
individual files as well as directories.
2016-01-29 09:27:41 -06:00
Alex Lin
68ffd04dff Introduce Open Dynamics Engine examples
Took the ODE bouncing ball tutorial sim and interfaced it within Trick.  Created classes to handle
interfacing with ODE and the DrawStuff graphics that comes with ODE.  Created classes
to contain the ball and the drawstuff graphics for the ball.

refs #172
2016-01-29 09:15:00 -06:00
Alex Lin
692d962b90 Sending the variable server a variable name that lists a composite type causes core dump
Duplicating change from 15.1.1.
If a variable resolves to a class/structure type the variable server tries to free the
attributes associated with that variable name.  But the attributes usually point to
a fixed place in memory that is not allocated.  I removed the free statement.  I don't
believe this will lead to a memory leak.

refs #165
2016-01-26 16:02:15 -06:00
Alex Lin
bc9ef8c54b Library dependencies with full path not found
When I merged the sections of code that look for library dependencies I left out
the section that searches for dependencies that have a full path.  I added
that back in.

refs #170
2016-01-26 15:25:26 -06:00
Alex Lin
63f193441c typedef of const structures not understood by SWIG
I kind of took the easy way out on this one, I remove any
structure definitions that matches the pattern
typedef const struct A {...} constA ; out of out of
convert_swig before they get to SWIG.

refs #169
2016-01-26 15:23:08 -06:00
Alex Lin
a8c8c49f0d Stripchart does not start with input file
Found that the stripchart calls itself when reading variables
from an input file.  The command to call itself was using the old
executable name trick_stripchart instead of the new trick-stripchart.

refs #166
2016-01-20 16:50:23 -06:00
Alex Lin
7e542440d1 Add a time variable in seconds to the variable server
Added a time variable that is in seconds.  A created a special case
for var_add if you add "time" then this variable will be added to
the list of variables returned.

trick.var_add("time")

refs #151
2016-01-14 10:49:27 -06:00
Alex Lin
903ff05960 data record buffering optimizations
Added a loop to set each 1024th byte in the recording array to 1 once the
memory has been allocated.  Need to test if this is good enough to get Linux
to allocate the memory.

Added a current recording buffer pointer to use instead of using array offsets.
This should be more cpu cache efficient.

Changed the memcpy calls to direct casted integer assignments based on the size of the
parameter.  If the parameter is not size 1,2,4,or 8 we fall back to a memcpy.

refs #155
2016-01-14 08:31:13 -06:00
Alex Lin
a08b313457 configure script does not check for clang/llvm
Use the clang executable we find in the configure script for building ICG.

refs #130
2016-01-13 09:22:46 -06:00
Alex Lin
ce1962b55d make doxygen broken
Updated the directory names in the doxygen files to match the new directory locations
of our source code files.  The documentation builds now.  But we still need to
remove the duplicate documentation that is now in the wiki, because the wiki is
more up to date.

refs #158
2016-01-13 09:18:09 -06:00
Alex Lin
87a48b36f5 make javadoc broken
The makefile rule javadoc was misnamed docs in trick_source/java/makefile. I fixed hundreds
of warnings and errors that were present when creating the java docs.

refs #159
2016-01-12 16:39:47 -06:00
Alex Lin
32da702aeb configure script does not check for clang/llvm
We were using "llvm-config --bindir" to set the path for clang.  But
on some systems clang is not in that directory.  Changed the configure
script to search for clang in the bindir first, if not found, search
the normal locations.

refs #130
2015-12-16 16:53:06 -06:00
Alex Lin
9daa108950 Bad permissions on files copied to the SIM directory
Changed the commands to force the copy files in the the SIM directory
from "cp" to "cp -f".   Added a rule in Makefile.sim to properly
call the configuration processor if the build directory is missing.
Also added a loop to filter the files found to be in an external
library.  Those files need to be tested to see if they include ICG: (No)

refs #156
2015-12-15 15:05:13 -06:00
Alex Lin
ff39984568 Input processor crashes if second event with same name is created
When allocating a new event, if the same name is used, no allocation is
created and NULL is returned.  We start trying to use the returned value
which seg-faulted.  I added a check to only continue if the returned value
from the allocation is not NULL.

refs #149
2015-12-02 10:44:27 -06:00
Alex Lin
1afac18399 Add additional thread synchronization mechanisms
Created a thread trigger container class to hold all of the various thread triggering
mechanisms.  I wanted to avoid allocating/freeing trigger mechanisms.  I added
an eventfd and futex trigger types.  Updated SIM_threads_simple test sim to use
show how to set the thread trigger type.

refs #148
2015-12-02 10:35:25 -06:00
Alex Lin
bdc24072e5 Including GSL in the configure script does not work if GSL not in standard path
Added lines to -I/gsl/include/path to Makefile.common if the path is not either
/usr or /usr/local.

refs #147
2015-12-02 10:26:41 -06:00
Alex Lin
519cdaf7f1 Unit tests failing on the Mac.
Added the library directory /usr/X11/lib to the search path when
compiling the DPX test directory.

refs #144
2015-11-19 14:41:18 -06:00
Alex Lin
ca51142553 Configure script does not set up GSL correctly
The configure script does not set up the defines for GSL correctly which causes our GSL
support code not to compile correctly. Fixed it.

refs #143
2015-11-18 08:30:21 -06:00
Derek Bankieris
3c24d80383 Merge branch 'master' of https://github.com/nasa/trick 2015-11-17 14:24:44 -06:00
Derek Bankieris
aedd6b2be3 I'm not sure why we're padding floats and doubles in vs_format_ascii. It results in sending a bunch of useless spaces which hurts efficiency. Values are already tab-delimited, so fixed-width fields are unnecessary. We're not padding anything else, so don't pad these! 2015-11-17 14:18:59 -06:00
Alex Lin
39e681a415 Merge pull request #140 from ddj116/master
Added optional var=value support for trick-CP as passthroughs to the
2015-10-22 09:42:21 -05:00
Dan Jordan
1f30ac8e04 Added optional var=value support for trick-CP as passthroughs to the
make system.
                             ***     ***
                           **   ** **   **
                          *       *       *
                          *   MAKE_out    *
                           *             *
                            **         **
                              **     **
                                ** **
       -------------------        *        --------------------
   ../                     \..         ../                     \..
  /                           \       /                           \
 |.,       __   _..._          \     /        ....     ___         |
 /  \     /  `-'     `-------...    ..--`````'    `--'    \.    ./` \
 |   \--_-               /    o ``X'  o    \                '--/    |
 |         ( ( ( ( (    /    \   /``\   /   \  ) ) ) ) )            |
 |   /---\                   ./|`    |`\.                  ..-..    |
 |  /     \-..-........-```/`./       \..`--.........-.  ./     `-./
  `'\                      /             \.            ``       /--
      \___________________/                \___________________/
2015-10-21 14:44:49 -05:00
Derek Bankieris
2f5c219f98 Add file name to error messages about invalid @trick_parse argument. 2015-10-21 11:23:02 -05:00
Alex Lin
0f3d900539 The moose want to retire
Retiring the moose.

refs #135
2015-10-06 16:40:06 -05:00
Alex Lin
161e6fa23e Save X11 include and library information from configure
Temporary hardcoded patch to get data products to build under
El Capitan.

refs #133
2015-10-02 08:41:47 -05:00
John M. Penn
fcb419d534 Add demonstration of getting units from MemoryManager::ref_attributes(). Fixes #132 2015-09-30 17:30:51 -05:00
Alex Lin
757f0764f6 configure script does not check for clang/llvm
Added a configure check for clang and llvm-config.  If llvm-config exists
then we check for the libraries in the libdir returned by llvm-config.
All of these must be present for configure to pass.

refs #130
2015-09-29 14:14:46 -05:00
Alex Lin
8b6a4efbad library dependencies are lost
Removed a double dot ".." I introduced into file names.
2015-09-29 09:27:11 -05:00
Alex Lin
ffe32e3c99 makefile has multiple rules to create directory
If a directory has more than one language the rule to create the object
directory is written twice.  Added a check to see if we've written
the rule for each object code directory, if we have already written
the rule then don't write it again.

refs #127
2015-09-24 13:58:21 -05:00
Alex Lin
a1bf1c31d4 convert_swig does not find header file correctly if there is a comment on the same line
Added a line to remove trailing spaces after removing the quotes and comments from
included files.

refs #129
2015-09-24 09:28:36 -05:00
Alex Lin
f5b30a4841 library dependencies are lost
Fixed the problem where library dependencies for header and source files are
saved to the same file and half are lost.  Did this by not removing the
suffix when creating the library dependency file name.

refs #128
2015-09-24 09:25:16 -05:00
Alex Lin
cab267c6c4 parse_s_define does not handle comments on a class definition line
Added a regular expression to remove all comments from class defnition lines.

refs #126
2015-09-22 09:17:36 -05:00
Alex Lin
c6e2a4acb5 Change new get_val;ue_by_ref name to var_get
Changed the name.

refs #125
2015-09-22 09:10:46 -05:00
Alex Lin
952b899093 ICG doesn't handle inherited template classes correctly
When a template is in a namespace the type that is marked for the node containing
the full definition of the type is elaborated.  We need to go into
the elaborated name and get the underlying type.  Added code to do this
and tests to see if the type we are checking is itself a template or the
elaborated type is a template.  Sorry, this probably only makes sense to me.

refs #124
2015-09-18 13:18:05 -05:00