Commit Graph

632 Commits

Author SHA1 Message Date
Scott Fennell
f68950db9f
Merge pull request #581 from nasa/java-unit-test
Java GUI unit tests reintegrated with Trick
2018-03-21 09:04:04 -05:00
Scott Fennell
a1aaf52ce7 #521 preparation for java 10 support for xmls annotation and improved safety of file separator call 2018-03-21 08:27:11 -05:00
Derek Bankieris
c1aff35a6a Don't suppress errno
Refs #583
2018-03-20 15:21:13 -05:00
Derek Bankieris
69d64fb582 Infer TRICK_HOME automatically
Refs #358
2018-03-20 15:09:30 -05:00
John M. Penn
c7d95da9a8 Implement function to generate a transformation matrix to rotate a vector to new a new orientation. Ref #582 2018-03-19 18:10:04 -05:00
Scott Fennell
4030757304 formatting 2018-03-15 15:32:44 -05:00
Scott Fennell
206a928a98 #521 removed build.xml 2018-03-15 15:22:19 -05:00
Scott Fennell
f6fa9cdf3e #506 added additional check on run directory to prevent creation as defaul… (#566)
* added additional check on run directory to prevent creation as default output directory

* #506 edited error messages to include strerror
2018-03-14 15:18:37 -05:00
Scott Fennell
84f15d8361 #521 more makefile editing for java unit tests 2018-03-14 15:01:02 -05:00
Scott Fennell
eee6b12a6b #521 edit resource locations in test source 2018-03-14 13:33:13 -05:00
Scott Fennell
8ee0614309 create directory in makefile 2018-03-14 10:55:09 -05:00
Scott Fennell
86eb23c7de #521 added unit tests to build and 3rd party XML formatter that does not rely on ant 2018-03-14 10:29:44 -05:00
Derek Bankieris
050e552d7c Update ICG for clang 6
Fixes #578
2018-03-13 09:30:01 -05:00
Derek Bankieris
37b1e02455 Replace perror with strerror
Instead of printing the numeric value of errno, how about we do
something helpful?
2018-03-08 14:50:13 -06:00
Derek Bankieris
1179007fa1 Infer TRICK_HOME automatically
Refs #358
2018-03-08 14:44:36 -06:00
Derek Bankieris
2ce53dadd2 Move pymods into share/trick
Fixes #574
2018-03-05 15:17:22 -06:00
Alex Lin
573a6bf2a5 Java 9 Compatibility #572
Made changes to the command to get the java version to make it
compatible with the mac.  Also snuck in my perl script to parse
out the version.
 ____           _ _  _   _____
|  _ \ ___ _ __| | || | | ____|_   _____ _ __
| |_) / _ \ '__| | || |_|  _| \ \ / / _ \ '__|
|  __/  __/ |  | |__   _| |___ \ V /  __/ |
|_|   \___|_|  |_|  |_| |_____| \_/ \___|_|
2018-03-02 09:19:11 -06:00
Scott Fennell
3de9a3b2be formatting 2018-03-02 09:19:11 -06:00
Scott Fennell
2fe85f615a #490 #494 edited java/makefile to include java.se.ee when compiling with java 9 2018-03-02 09:19:11 -06:00
Scott Fennell
13c90afaee removed unneeded module 2018-03-02 09:19:11 -06:00
Scott Fennell
a2cf18f6d3 Added needed module compiler flags and changed MtvView Vector<Object> to Vector<Vector> for Java 9 DefaultTableModel constructor compatibility 2018-03-02 09:19:11 -06:00
Alex Lin
4bf35a9c82 Revert "Merge pull request #533 from nasa/MakefileCleanup"
This reverts commit 269ed77cb4, reversing
changes made to d97f482219.
2018-03-02 08:59:26 -06:00
John M. Penn
c9a121aa27 Fix format codes in CSV_Formatter. Ref #570 2018-03-01 12:10:30 -06:00
Alex Lin
9dd302f4b1 Trick makefile output formatting and cleanup. #533
Removed the red from the clean rules.  We'd like to reserve red for
errors.  Ended up removing all color from the clean side.
2018-03-01 08:51:57 -06:00
Alex Lin
9643311f4c Merge branch 'master' into MakefileCleanup 2018-03-01 08:32:08 -06:00
Alex Lin
d97f482219 Allow the FrameLog class to use a different clock #571
Added a clock reference that to the FrameLog class that defaults
to the GetTimeOfDay clock.  This clock has fast access and is
non intrusive to real-time operations using a different clock.

Added a function to set the clock to something else if desired.
2018-02-28 17:33:09 -06:00
John M. Penn
aee322927d Merge branch 'master' of https://github.com/nasa/trick 2018-02-28 15:35:07 -06:00
John M. Penn
d17d48d040 Fixed trkConvert to recognize TRICK_BOOLEAN and LogFormatter interface. Ref #570 2018-02-28 15:34:46 -06:00
Derek Bankieris
27bf0b030b Dequeue timed-out runs if the slave later returns
Fixes #569
2018-02-28 14:13:05 -06:00
John M. Penn
4f0093ddd6 Created a function function to calculate transform using Rodrigues formula. Ref #567 2018-02-27 18:24:40 -06:00
Derek Bankieris
8bdcd28631 Don't use TRICK_HOST_CPU in MonteCarlo SHH command
Fixes #564
2018-02-27 09:38:12 -06:00
Alex Lin
0936cee67e Separate verbosity levels for Monte Carlo dispatches and parametrizations #548
Changed verbosity check from INFORMATIONAL to ALL as requested.
2018-02-20 09:56:14 -06:00
Alex Lin
15bfd75b32 Don't resize active event array size with every operation #562
Started the active event allocation at 100 events.  If more are needed, we
add 100 allocations each time.  The array is never reduced in size if
events are deleted, events are moved to the front of the array and the
remaining elements are set to NULL.
2018-02-14 17:28:21 -06:00
Alex Lin
7a3fc1353e Some of Trick's unit conversions have too many significant digits #557
Fixing force conversions in unit test for too many digits.
2018-02-09 10:07:53 -06:00
Alex Lin
049c9a3207 Some of Trick's unit conversions have too many significant digits #557
Hard coded values in unit conversion test program.
2018-02-09 08:52:42 -06:00
Alex Lin
bc8d1a3796 The total overruns printout at sim exit prints the wrong parameter. #560
Changed the printout to print the total number of overruns.
2018-02-08 16:18:11 -06:00
Pappy Van Winkle
d7e8d48a8a Creating additional C-interface routines for UnitTest. #511 2018-02-03 19:56:08 -06:00
Alex Lin
940a275192 Some of Trick's unit conversions have too many significant digits #557
Changed the conversion factors for lb, slug, and oz (force) to match
the accepted values.
2018-02-02 14:10:39 -06:00
Alex Lin
cc7e3ea128
Merge pull request #543 from pappyvw/master
Double clicking array variable in Trick QP adds it correctly once again.
2018-02-01 16:29:37 -06:00
Alex Lin
8f76605f3b Create Message client that writes to screen on a separate thread #553
Created a new message class that will copy incoming messages to a
buffer area.  The buffer area is pre allocated during simulation
initialization.  On a separate thread the buffer area is written
to std::cout.
2018-01-25 15:59:19 -06:00
Alex Lin
54b57bc351 Pointers to STLs cannot be checkpointed. #552
Added code to disable printing of STLs if it is arrayed or has pointer
dimensions.
2018-01-25 09:40:23 -06:00
Alex Lin
a2d0387d57 trk2csv can open too many files #508
trckConvert missing cstring header. Added object code to .gitignore.
2018-01-24 07:55:14 -06:00
Alex Lin
c4b872c26e Don't start or wait for disabled threads in the executive #549
Added check to see if thread is enabled when starting it and waiting
for it to finish.  If it is disabled, skip it.
2018-01-23 09:37:02 -06:00
John M. Penn
6039669647 Created a new program call trkConvert that only opens the trk file once. Ref #508 2018-01-19 17:37:29 -06:00
Alex Lin
12c7dbd4cf Trick's new variable server address is hard to debug if you don't know it changed #546
Created a second multicast socket to broadcast the sims variable server information
on the old address.
2018-01-19 16:49:08 -06:00
Alex Lin
d4ffa4002b Add NULL pointer check to remove_event. #545
Added the NULL pointer check and return immediately if the pointer is NULL.
2018-01-18 13:23:38 -06:00
Pappy Van Winkle
bb2c6fbb91 Double clicking array variable in Trick QP adds it correctly once again.
Fixes #539
2018-01-14 20:32:46 -06:00
John M. Penn
020dd0c1c9 Correct the sizeof() arg to memset call in test fixture. Ref #541. 2018-01-10 14:27:46 -06:00
Aaron Brogley
f16360ab5f Fixing typos in trick_utils/math
s/determinate/determinant
s/haft/half
s/LELF/LEFT
2018-01-06 11:45:20 -06:00
Alex Lin
c694700148 Add environment variable to ignore types from ICG processing #535
Added a new environment variable TRICK_ICG_IGNORE_TYPES.  Class/struct/enum
types found in this semicolon delimited list will not have attributes written
out.
2017-12-19 10:02:41 -06:00
Alex Lin
9509924b64 Don't create attributes for class members that are of private embedded class types #534
Test the class field type.  If the type is a private embedded class mark the field
as io=0 so we don't create attributes for the field.
2017-12-19 08:26:52 -06:00
Nick Kapliev
c8619dbea7 Fixed MonteCarlo EOF problem. #459 (#531)
* Added tests for MonteCarlo varfile eof line problem

* Remove redundant variables in MonteCarlo varfile test

* Fixed MonteCarlo varfile eof line problem. #459
2017-12-13 12:01:31 -06:00
Christopher LaChance
fbd9d3237f Cleaned up 'make' target display further. 2017-12-13 11:04:00 -06:00
Christopher LaChance
5e8cb8649f Added formating to the core makefile. Trick compilation is now visually broken into sections. 2017-12-12 12:01:35 -06:00
Alex Lin
5285f1a72e Symbolic links rise again #530
Found more places where symbolic links cause havoc.  Also added back a #define
that was removed in parameter_types.h and added back the messaging routines to
the list swig processes.
2017-12-12 10:17:24 -06:00
Christopher LaChance
6e0fcbd947 Updated formating and replaced formating variables. 2017-12-07 15:10:39 -06:00
Christopher LaChance
1bb3ac2a06 Cleaned up 'make clean' output significantly. 2017-12-06 13:12:13 -06:00
Christopher LaChance
6184aa6cd9
Some unit test warnings addressed. (#515)
* Removed purple warnings from unit test compilation.

* "Fixed const corectness bug. Added more warning fixes."

* Fixed warning issue.

* Removed null checking and (char*) casting.

* Changed sizeof parameter to variable from data structure.
2017-11-29 15:35:16 -06:00
Christopher LaChance
0e772525c7 Fixed the MC 'file failed to open' error. 2017-11-22 12:51:34 -06:00
John M. Penn
65800e2dcd If XML_CATALOG_FILES env variable is not set, parse xml files without validation. Ref #514 2017-11-10 13:42:39 -06:00
John M. Penn
a9aff05320 Don't have FXPLOT validate DP and session files against the DTD. Ref #514 2017-11-09 16:31:26 -06:00
Alex Lin
7af2b790a2
Merge pull request #500 from nasa/MonteCarloUnitTest
Modified unit tests to account for new logic.
2017-11-02 14:17:51 -05:00
Thadeus Fleming
143d0f2c41 Make object .d files order-only prerequisites
This will ensure objects are rebuilt only due to a missing dependency
file, not a newer one.

Fixes #501.
2017-11-02 12:34:48 -05:00
Christopher LaChance
21e3804638 Removed outdated MonteVarFile exception unit test. 2017-11-02 11:40:28 -05:00
Christopher LaChance
5ea826c67b Modified unit test to account for new logic. 2017-11-01 09:00:59 -05:00
Christopher LaChance
a68ea46f14
Fixed issue with open file being reopened. 2017-10-31 13:56:04 -05:00
Christopher LaChance
cf75a15be8 Removed redundant checks and this-> keywords. 2017-10-31 13:17:14 -05:00
Christopher LaChance
0dbdc2d7b9 Changed streampos comparison from NULL to 0. 2017-10-31 10:02:10 -05:00
Christopher LaChance
0a90c11541 Implemented a fix for multiple concurrent file handles. 2017-10-27 14:35:54 -05:00
John M. Penn
eba6118c92 Remove Line# from data products java table generation. Ref #497 2017-10-26 13:23:00 -05:00
John M. Penn
41558d7188 Format table column data per the format property. Ref #496 2017-10-25 18:17:02 -05:00
Alex Lin
6271283c31 Revert Trick::Clock::clock_spin shouldn't call RELEASE() #489
Added a stub exec_get_rt_nap function in the test directory that
always returns false.  That is the cleanest way to satisfy the
call for the unit tests.
2017-10-20 15:03:31 -05:00
Christopher LaChance
c8f916e818 Merge pull request #488 from nasa/NonNumericValues
Non-numerical values can now be used in Monte Carlo data files.
2017-10-17 08:40:29 -05:00
Christopher LaChance
db4e0dd024 Returned brace style to K&R at John's behest. 2017-10-16 14:03:48 -05:00
Christopher LaChance
f81d7b0c16 Swapped line read in to std::getline(). 2017-10-16 12:56:45 -05:00
Alex Lin
56ddfab6a5 Revert Trick::Clock::clock_spin shouldn't call RELEASE() #489
Reverting change, adding back RELEASE call in clock_spin loop.
2017-10-16 10:39:31 -05:00
Christopher LaChance
ebe4174b5c Converted data file traversal from strtold to strtok. 2017-10-12 10:00:54 -05:00
Christopher LaChance
24894ea08a Merge pull request #487 from nasa/VariableInformation
Added additional variable information to the Monte_Runs data file.
2017-10-11 09:48:42 -05:00
Christopher LaChance
1efedefdf7 Added additional variable information to the Monte_Runs data file. 2017-10-10 11:12:33 -05:00
Alex Lin
8aa8f31e3d Frame logging for child threads not working. #484
Prepended "trick_" to the frame scheduled time variable name.
2017-10-06 10:22:38 -05:00
Derek Bankieris
87e59a9d17 Add reverse byte order formats to Trick View
Format added for shorts, ints, and longs.

Closes #482
2017-10-03 12:02:21 -05:00
Alex Lin
de012dde71 Feature request: Support checkpointing and logging of std::array #480
Added std::array as an STL type Trick recognizes.  We can now create io code
that can save and restore std::arrays like std::vectors and other similar
types. Like other STL types, an std::array cannot be logged or viewed in
trick-tv.
2017-09-27 16:01:52 -05:00
John M. Penn
a1ee0e93da Merge branch 'master' of https://github.com/nasa/trick 2017-09-13 14:47:03 -05:00
John M. Penn
db2f00cc4e Changed 'git' to 'trick-gte'. Ref #475 2017-09-13 14:46:28 -05:00
Alex Lin
c6ecd76be5 ICG does not compile with llvm 5.0 #476
Added a preprocessor check for llvm version >= 5.  If true use
clang::InputKind::CXX instead of clang::IK_CXX
2017-09-13 14:07:23 -05:00
Alex Lin
70a81acc6c ICG handling of \brief in comments differs on Linux and Mac #453
Adjusted regular expression so it will work on the mac.  Changed "\w" to
"[a-zA-Z0-9]".
2017-08-21 14:03:49 -05:00
Alex Lin
9207bd0ab1 io_src makefile applying TRICK_SYSTEM_CXXFLAGS to all compilation units. #470
Changed TRICK_SYSTEM_CXXFLAGS in Makefile_io_src to TRICK_IO_CXXFLAGS.
2017-08-21 13:28:28 -05:00
Thadeus Fleming
bf2759c5c0 Remove deprecated dynamic exception specifiers.
Resolves #461
2017-07-28 20:49:42 -05:00
John M. Penn
841473583c Updated var server multicast address to 239.3.14.15. Ref #452 2017-07-05 16:40:22 -05:00
John M. Penn
d0b9cda9f2 Fixed variable server debug messages. Ref #447 2017-06-26 17:50:54 -05:00
Christopher LaChance
bd024ce597 Readded the reverted changes.
The situation required rebasing the branch from master and re-adding the changes that were reverted.
2017-06-21 09:38:22 -05:00
Christopher LaChance
86aaa8e9fa Replaced socket_init calls with tc_init.
Some classes were still calling socket_init which had been removed. Replaced those calls with tc_init.

Make compiled and make test successfully ran all tests. Jenkins should be happy now.
2017-06-21 09:19:48 -05:00
Christopher LaChance
345971e31a Replaced socket_init calls with tc_init.
Some classes were still calling socket_init which had been removed. Replaced those calls with tc_init.

Make compiled and make test successfully ran all tests. Jenkins should be happy now.
2017-06-21 08:59:22 -05:00
Derek Bankieris
87423ec5aa Add option to hide search and tree panels
Restore previous size of Variable Tree and Search Panel when visibility
is restored.
Save/restore visibility across sessions.
Add mnemonics and tooltips to menu items.
Ensure the Variable Tree is visible as part of the "Expand Parent in
Tree" actions.
Remove calls to setOneTouchExpandable.

Refs #415
2017-06-21 08:16:09 -05:00
Christopher LaChance
38960e6505 Made brackets consistent on modificaitons. 2017-06-21 08:16:09 -05:00
Christopher LaChance
12e74744b6 Changed the view menu items into checkbox menu items.
The two view menu toggles are now checkbox menu items. The default state is enabled and is toggled when the option is selected.
2017-06-21 08:16:09 -05:00
Christopher LaChance
70369fdb71 Added menu options to toggle the visibility of Trick View panes.
This currently doesn't work 100% properly. It will toggle fine, but when showing the panels it starts them collapsed. Resizing the pane causes them to appear for some reason.
2017-06-21 08:16:09 -05:00
Christopher LaChance
0137700473 Revert "Removed default_port_flag and socket_init. " 2017-06-20 14:36:48 -05:00
Christopher LaChance
256a1adeb4 Merge pull request #442 from nasa/DefaultPortFlagMC
Removed default_port_flag and socket_init.
2017-06-20 10:51:29 -05:00
Alex Lin
e2693de992 Many Trick sims SEGFAULT when built in 32-bit mode #440
Added a switch to trick-ICG to handle the -m32 flag.  When the
flag is present we tell clang to use a 32bit layout when calculating
member offsets.
2017-06-19 14:18:37 -05:00
Christopher LaChance
34cc3ae8e5 Removed default_port_flag and socket_init. 2017-06-16 15:20:04 -05:00
Thadeus Fleming
57cebe4c70 s/sepcified/specified 2017-06-16 13:58:45 -05:00
Christopher LaChance
8fb1355de3 +-NaN and +-Infinity are now correctly represented in Trick View. (#437)
* Values that return "-nan" will now properly show <NaN> in the Trick View variable table.

* +-NaN and +-Infinity are now correctly represented in Trick View.

This solution now handles +- infinity and +-nan instead of just -nan.

* Lifted fix logic into a protected function in the super class.

Removed author/date information.
Put duplicate code from VSFLoat and VSDouble into VSValue.
Added support for -NaN.
2017-06-08 12:09:39 -05:00
Christopher LaChance
af6b8cbea8 Capped the maximum throttle value to 1000. (#434)
* Capped the maximum throttle value to 1000.

Entering extremely large values into the maximum value field of the throttle GUI caused the GUI to freeze. Imposing a cap of 1000 to the maximum value prevents the GUI from freezing.

* Updated brace style from Allman to K&R.
2017-06-06 09:08:10 -05:00
Derek Bankieris
39aef15a8e Infer TRICK_HOME automatically
Refs #358
2017-06-02 13:37:28 -05:00
Derek Bankieris
1dbeb3e2d4 Fix io code for classes with excluded parents
Check the return value of CXXRecordVisitor::TraverseCXXRecordDecl and
don't add information from excluded parents.
Add a parameter to PrintAttributes::isHeaderExcluded to toggle exlusion
of TRICK_EXT_LIB_DIRS paths. When traversing a CXX record, we don't
actually want to skip these paths since their io code should exist in
the Trickified library.
Fix memory leak.

Refs #435
2017-05-24 10:51:27 -05:00
John M. Penn
2edd7b986d Add include of errno.h to MonteVarFile.cpp. Ref #431 2017-05-22 14:07:25 -05:00
John M. Penn
7941faef3c Merge branch 'master' of https://github.com/nasa/trick 2017-05-22 13:47:46 -05:00
John M. Penn
d7e3aa4b5c Make failed ifstream error message more informative. Ref#431 2017-05-22 13:47:25 -05:00
Derek Bankieris
05b4d09b2b Sanitize field names when generating STL functions
A sanitizing function was already present in FieldVisitor.cpp. I
refactored and moved it to Utilities.
Refs #429
2017-05-22 10:37:20 -05:00
Derek Bankieris
fe79aa81a5 Improve printable field detection
Renamed determinePrintAttr to isPrintable.
Different callers need to filter on different IO specs, so I added an
ioMask parameter.
Additional refactoring.
Refs #427
2017-05-17 09:37:22 -05:00
Derek Bankieris
353905c1ed Generate STL functions only when requested
Remove STL prototypes. They don't appear to be necessary anymore.
Refs #427
2017-05-16 15:31:08 -05:00
John M. Penn
9e8dd6c41c Change file name from char* to const char* in euler tranformation matrix functions. Ref #423 2017-05-15 14:02:01 -05:00
Alex Lin
a11e51cce7 Sim build doesn't stop on error #421
When I added the "tee" commands to split off command outputs to
a file and the screen, I forgot that the exit status of the make commands
takes the exit status of "tee" which does not ususally have an error and
masks any error in the actual compilation.  I added an exit ${PIPESTATUS[0]}
which returns the exit status of the compilation.
2017-05-15 13:36:06 -05:00
Alex Lin
dce161ad94 Suppress units conversion messages in input file. #414
Added a routine to shoot_the_units_conversion_messenger.
2017-04-20 11:34:50 -05:00
Alex Lin
b2ebe157ed Lost the MAKE_out file when we updated simulation makefiles #412
Added echos to all compile commands to append to MAKE_out.  tee'd
the output of the compile command so that it will go to both the MAKE_out
file and the screen.
2017-04-18 10:26:58 -05:00
John M. Penn
9a5bbb160a Get rid of yyset_lineno in the parsers. Ref #404 2017-03-30 19:53:33 -05:00
John M. Penn
56ce1c75cc Fix yyset_out, yyset_lineno calls and remove yyset_in calls in parsers. Ref #404 2017-03-30 16:14:28 -05:00
John M. Penn
a7039aea61 Create va_list versions of Integrator state load and unload member functions. Ref #401 2017-03-28 17:55:27 -05:00
Derek Bankieris
b53c52ac33 Separate ICG & SWIG exclusion constructs
Refs #392
2017-03-27 15:19:43 -05:00
Derek Bankieris
2335f6bb69 Correct Monte Carlo compiler error on CentOS 7
Also change the Cannon sim monte_post jobs to use mc_read/write instead
of tc_read/write

Refs #396
2017-03-24 08:11:32 -05:00
Derek Bankieris
80ab0767e2 Combine command and data sockets in Monte Carlo
Refs #396
2017-03-23 12:22:40 -05:00
Derek Bankieris
17a5028e43 Infer TRICK_HOME automatically
Refs #358
2017-03-21 10:24:02 -05:00
Derek Bankieris
47847a8aef Add ability to pass options to slave sims
Refs #395
2017-03-20 10:46:10 -05:00
Derek Bankieris
73cbbd96cd Refactor ICG to report skipped files consistently
Refs #394
2017-03-15 15:53:56 -05:00
Alex Lin
b88c75631a Missing includes when using clang/llvm 4.0 #393
Added some missing header file includes.
2017-03-15 10:05:06 -05:00
Derek Bankieris
2e4c3286a3 Automatically generate dependencies with SWIG
Like gcc, swig supports all those -M options. Use them to automatically
manage *_py.cpp dependencies.
Add dependency generation to trickify.mk as well.
2017-03-14 13:38:09 -05:00
Alex Lin
c5fbaeb7d6 Fix fonts in java GUIs #192
I fixed a hard coded size=12 font in the sim control panel.
2017-03-13 11:10:24 -05:00
Alex Lin
a1bc45548b tool for detecting mismatch between friend init_attr and containing class #371
Added a check and warning message in ICG that warns you if a friend function
starts with "init_attr" but does not match the current class name.
2017-03-10 09:38:33 -06:00
John M. Penn
eef5b14fbf Add tweaks that speed up matrix multiplication routines. ref #386 2017-02-27 12:51:35 -06:00
Derek Bankieris
e6ad95f493 Grand Make Dependency Graph, part 1
Refs #360
2017-02-23 13:26:28 -06:00
Alex Lin
2450f51781 Add name of parameter to error message coming out of MemoryManager_restrore_stls #382
Printing the name now.
2017-02-15 09:00:34 -06:00
Derek Bankieris
d965f4b0a8 Infer TRICK_HOME automatically
Refs #358
2017-02-10 10:29:56 -06:00
Alex Lin
337139cacb S_overrides.mk is included twice when building #360
A different approach.  Instead of trying to limit the number of times
S_overrides.mk is included, combine the makefiles so only one
call to make is made.
2017-02-09 09:46:58 -06:00
Alex Lin
38d2b10b9e Forward-declared classes aren't fully populated in S_sie.resource #378
I chose the wrong call when trying to support clang 3.9 and it's
removal of getRBraceLoc.  The best equivalent call in 3.9 is
getBraceRange().getEnd().
2017-01-23 17:48:16 -06:00
Derek Bankieris
4146b440b8 Make trick (Python package) a namespace package
Namespace packages are a mechanism for splitting a single Python
package across multiple directories on disk. With the addition of
$(TRICK_HOME)/pymods/trick, there now exists a package named 'trick' at
$(TRICK_HOME)/pymods and in each SIM_* directory. This change allows sims
to import modules from both locations.

Refs #365
2017-01-20 10:30:21 -06:00
Derek Bankieris
a6b68bb101 Infer TRICK_HOME automatically
Refs #358
2017-01-20 09:39:04 -06:00
Alex Lin
008337e69b Monte Carlo dry runs produce monte_input files #318
The input file that is created while running monte carlo runs is done
in 3 different places.  There was no easy way to collect all of those
lines in one place, so I duplicated the lines in the dryrun function.
2017-01-12 16:52:05 -06:00
Alex Lin
2c93f2ac75 Improve error handling when duplicate variable added to a DRHDF5 #353
Added a printout that shows the logging group and variable name that
had a problem when trying to add to the HDF5 recording.
2017-01-12 08:44:30 -06:00
Alex Lin
8a0653fa09 Detect when TRICK_ICG is used in header files and compensate for it. #375
clang call to addPPCallbacks changed between clang versions 3.5 and 3.6.
2017-01-12 08:42:16 -06:00
Alex Lin
4b28951c1c When doing input file verification the exit code is always 1. #335
After doing verification of the input file we return the exit code
of the python processor.
2017-01-11 17:40:05 -06:00
Alex Lin
9f01209316 ICG generates non-compilable io_* code for std::vector::iterator members #331
Added a test if our field is an iterator type.  If it is we cannot create io_src
code for it.  We skip it once identified.
2017-01-11 16:07:02 -06:00
Alex Lin
b60320464a Detect when TRICK_ICG is used in header files and compensate for it. #375
Always differences between clang versions.
2017-01-11 15:59:10 -06:00
Alex Lin
ba47c2048c Detect when TRICK_ICG is used in header files and compensate for it. #375
Created a hook for the clang preprocessor.  The hook does 2 things.  It
keeps track to which header files we have entered and exited.  Second it
searches for the use of TRICK_ICG.  If we find an instance of TRICK_ICG we
mark all of the included files from this point up the chain as requiring
compensation.  To compensate for using TRICK_ICG we write out the older
offset statements to get the location of variables in classes/structures.
2017-01-11 15:02:21 -06:00
Alex Lin
0197df7103 Test output xml does not validate. #372
Removed the parent attribute.
2017-01-09 09:52:48 -06:00
Alex Lin
a831cbfaa8 Merge pull request #366 from iamthad/use_stderr
Use std::cerr instead of std::cout for error messages
2016-12-20 15:02:23 -06:00
Derek Bankieris
7a08829d3d Introduce makefile variable TRICK_SYSTEM_LDFLAGS
Like other TRICK_SYSTEM variables, users should not modify this.

This renders TRICK_LDFLAGS and TRICK_USER_LINK_LIBS redundant. While we
would like to eventually remove TRICK_USER_LINK_LIBS, it's not likely to
ever actually happen.

Refs #369
2016-12-14 12:36:21 -06:00
Derek Bankieris
76f6a003b3 Add -std=c++11 to VariableServer Makefile
Refs #367
2016-12-14 10:06:01 -06:00
Derek Bankieris
634d561567 Fix VariableServerThread::var_units
Refs #367
2016-12-14 09:43:55 -06:00
Derek Bankieris
2c9181a896 Infer TRICK_HOME automatically
Refs #358
2016-12-13 15:29:15 -06:00
Thadeus Fleming
fb1925e0d8 Use std::cerr instead of std::cout for error messages 2016-12-10 11:49:44 -06:00
Derek Bankieris
3600e3880a Infer TRICK_HOME automatically
Refs #358
2016-11-30 14:12:34 -06:00
Derek Bankieris
9fa76d8e78 Use std::strerror to report system call errors
Refs #357
2016-11-30 13:25:52 -06:00
Derek Bankieris
4d7ea87a43 Fix typo
Refs #355
2016-11-30 11:47:56 -06:00
Derek Bankieris
9fdb5d4c51 Merge input and error streams for plotting apps
Refs #355
2016-11-29 15:59:36 -06:00
Derek Bankieris
d72a09fef7 Add ability to clear all variables from a DR group
Don't let "sys.exec.out.time" be removed

Refs #350
2016-11-29 13:38:32 -06:00
Derek Bankieris
d859ac8453 Add funciton to remove all data record groups
Refs #350
2016-11-29 11:47:10 -06:00
Derek Bankieris
4281b92141 Fix MonteMonitor
Refs #354
2016-11-29 11:28:15 -06:00
Derek Bankieris
ac3360e87f Add ability to remove variable from data recording
For the record, I'd like to point out that many of the DataRecordGroup
functions shouldn't be called after init, but we don't prevent anyone
from doing so. Bad Trick!

Refs #350
2016-11-18 08:53:24 -06:00
Michael Vetter
18f0d7e871 Remove trailing whitespaces
Makes it easier to edit the files. So if we press 'end of line' we are
really at the end of line.
2016-11-08 10:25:07 +01:00
Derek Bankieris
eedd0783cd Replace multiple radian units with single instance
One of the constructor parameters enables automatic creation of
SI-prefixed versions of the root unit, which obviates the need to
create them individually.

Refs #345
2016-11-07 08:22:55 -06:00
Derek Bankieris
2248b5bcfa Remove unused variables. Normalize formatting.
Refs # 345
2016-11-04 15:56:51 -05:00
Derek Bankieris
de69363cbd Improve formatting
Remove trailing whitespace. Replace tabs with spaces.

Refs #345
2016-11-04 15:48:29 -05:00
Derek Bankieris
245389182d Automatically determine TRICK_HOME in makefile
Refs #344
2016-11-04 14:49:52 -05:00
Derek Bankieris
d61fe5f3c3 Removed unused file Simcom.java #343 2016-11-04 14:49:52 -05:00
John M. Penn
0a19eeb602 Removed un-needed null pointer checks in DPX code. Ref #16 2016-11-02 15:34:06 -05:00
John M. Penn
1f75034da2 Merge branch 'master' of https://github.com/nasa/trick 2016-11-02 14:22:08 -05:00
John M. Penn
99c8b11709 Fix a memory leak in VariableServerThread_commands. Ref #333 2016-11-02 14:12:31 -05:00
Alex Lin
d875f837f2 ICG produces non-compilable io_* code for this weird example #334
When saving the list of namespaces and classes a particular type is contained in
we have to save the class name and any template args it includes separately.  This
allows us to mangle the names easier.  And we now search for type names to see
if they follow this pattern template_name<template_args>::embedded_class.  If
we are using a template embedded class we need to create attributes for the embedded class.
2016-11-02 13:56:40 -05:00
Derek Bankieris
664797e391 Move one-time-use variables into their call site #341 2016-10-31 10:00:48 -05:00
Derek Bankieris
29b0d2d223 Alex doesn't like auto #341
Granted, there are times you shouldn't hide the type.
2016-10-31 09:51:44 -05:00
Derek Bankieris
5898f3fdec Improve loop efficiency #341
Calling getTemplateArgs() every iteration is wasteful. This should
be done once outside of the loop. Even better, use a foreach loop and
get rid of the index varible!
2016-10-31 09:34:24 -05:00
Derek Bankieris
bdcfbb4e3a Restore debug functions #341 2016-10-31 09:10:33 -05:00
Derek Bankieris
ef1405c3be Refactor ICG
Hey buddy. I wanted to tell you this before you heard it from someone
else...

I refactored ICG.

Now, it's gonna look a little scary at first. But I promise you'll like
it when you get used to it. It'll be fine. You can trust me. #341
2016-10-28 14:37:12 -05:00
Alex Lin
ba75f6ff37 ICG does not compile using llvm 3.9 #339
The call getRBraceLoc to find the ending source location of things is gone.  Replaced
it with getting the source range and get the end of that range.  Also the way to
get clang/llvm 3.9 to process c++11 code required some reordering of calls in main as
well as adding some more features to be turned on.
2016-10-28 13:21:21 -05:00
Derek Bankieris
cde7c02d22 Use 1/0 instead of True/False in TVBoolean.java
The use of True/False prevents the plotting of booleans, as those values
cannot be parsed as doubles. While it's conceptually more pleasing to
use the actual Python keywords for booleans, numbers will work just as
well and allow plotting. #337
2016-10-26 13:38:58 -05:00
Derek Bankieris
90eb381987 Fix indentation 2016-10-26 13:35:20 -05:00
Derek Bankieris
0a664abdeb Prepend trick app launch commands with trick- #336 2016-10-26 12:12:49 -05:00
Derek Bankieris
0ba68e40aa Merge branch 'master' of https://github.com/nasa/trick
Conflicts:
	trick_source/codegen/Interface_Code_Gen/main.cpp
2016-10-21 15:15:41 -05:00
Derek Bankieris
015965abab Renamed most variabes so that they are self-descriptive. Stop using abbreviations! No one can tell what anything is.
Applied a consistent formatting.
Inlined several one-off variables.
2016-10-21 15:06:44 -05:00
Derek Bankieris
108d3d40c5 Added a version of almostRealPath that takes a const std::string& parameter so we don't have to use c_str() everywhere 2016-10-21 15:06:35 -05:00
Derek Bankieris
75c35752d6 Spacing 2016-10-21 15:05:26 -05:00
Alex Lin
a2452aacd0 ICG creates offsetof statements that will not compile when using clang #327
When copying inherited variables to a child class in ICG, the inherited flags
were not being set on the mac.
2016-10-21 13:13:43 -05:00
Alex Lin
f1cbacd646 ICG exclude of class member variables now defines incorrect memory offsets in io_src #311
This changes back the default behavior to not use offsetof in io_src code.
Added a flag to ICG, -c or --compat15, to globally generate offsetof statements.
Added an ENV variable that can be used to generate offsetof statements by file or directory.
Added in a warning if classes parsed at ICG time are different in size than at runtime.
2016-10-21 13:13:43 -05:00
Derek Bankieris
5484e39f11 Fix spacing in warning message 2016-10-21 10:50:11 -05:00
Derek Bankieris
bcb421678a Fix spacing. Move declaration of loop variable into loop initializer. Rename stupid 1337 variable. 2016-10-21 10:49:11 -05:00
Derek Bankieris
2279ba8648 Restore print out when compiling io_* files #326 2016-10-21 09:20:50 -05:00
Derek Bankieris
4f49460a6f Clean up io_* code #330 2016-10-20 14:55:00 -05:00
Derek Bankieris
beb93f7e88 Removed useless local alias, eliminating the need to silence set but unused variable warnings #326 2016-10-20 14:55:00 -05:00
Derek Bankieris
2fb06cf133 Got rid of the individual io, py, and model conglomerate objects #326
Link all of the objects as part of the S_MAIN target using the link lists.
Renamed some variables and files to make them more self-descriptive.
2016-10-18 13:06:42 -05:00
Alex Lin
23af89681e ICG creates offsetof statements that will not compile when using clang #327
Added a check that was in 15 that tested the platform we are running on.  If we
are on an mac, we want to skip fully qualifying variable names because it creates
code that doesn't compile under clang.
2016-10-12 13:34:04 -05:00
John M. Penn
7544f4f96a Stop DPX makefile from trying to make catalog.xml. Ref #324 2016-10-06 14:53:36 -05:00
Derek Bankieris
054245f968 Forgot to remove this debugging print out before the last commit 2016-10-06 14:28:06 -05:00
Derek Bankieris
f161ddb18c Made everything about Trick's build process better 2016-10-06 13:54:06 -05:00
John M. Penn
edbac4cc11 Add corrected catalog.xml that contains a relative base. 2016-10-05 15:35:07 -05:00
John M. Penn
58b32d21af Delete files used to generate catalog.xml. Ref #324 2016-10-05 15:34:14 -05:00
Dan D. Jordan
9e0f0ba85a Added MonteVar setters where appropriate
Added set_unit mechanism to MonteVar baseclass. Added MonteVar's derived
classes setters where appropriate to facilitate changing inputs after
the instance of MonteVar has already been constructed. Fleshed out
MonteVarFile destructor to remove memory leaks.
2016-10-03 14:57:11 -05:00
Alex Lin
5c117bcfe3 python3 execution of standalone monte_input #314
In the monte carlo input files I added a test for python 2/3.  If we are 3 run
exec(open("file").read()), else run execfile("file")
2016-09-26 09:26:43 -05:00
Alex Lin
bbba26e057 Merge branch '17.0' 2016-09-16 09:50:12 -05:00
Alex Lin
00a0e8be44 ICG exclude of class member variables now defines incorrect memory offsets in io_src #311
Missed some bitfield offset calculations.
2016-09-16 09:46:03 -05:00