* Method socket.sendall() expects bytes to be sent, rather than a string
* Python 3 stores text strings as unicode (not ASCII) by default
* Therefore, strings must be explicitly converted to bytes for Python 3 compatibility
* This works for both Python 2 and Python 3 (tested on Python 2.7, Python 3.6, and Python 3.7)
Update documentation
Change TRICK_LIB_BUILD_TYPE to TRICKIFY_BUILD_TYPE
Remove support for linking in arbitrary objects
Conform logging to existing pattern
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.
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.
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.
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.
Reverts the important parts of c909669. Trying to include another
project's build dependencies as part of a sim build doesn't work that
well.
Refs #309
PIPESTATUS is only available in bash. For many of the systems
we use /bin/sh and /bin/bash are the same, but noooo, not on
Ubuntu where it is linked to dash. I set SHELL := /bin/bash
in our makefile now.
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.
Like gcc, swig supports all those -M options. Use them to automatically
manage *_py.cpp dependencies.
Add dependency generation to trickify.mk as well.
CURDIR is used to produce absolute paths in S_source.d, which allows it
to be included from external makefiles. It is specifically intended to
be included from a Trickified project's user-facing makefile. That is,
the one the user is intended to include in a sim's S_overrides.mk. This
allows the project to automatically build their Trickified object as
part of a simulation build, but only when necessary as specified by the
dependencies.
Refs #309
Trick uses dlsym to dynamically load symbols at run time. At link time,
it cannot be known which symbols will be needed. When presented with a
library, the linker will only link in symbols that are known to be
needed. Therefore, the use of -whole-archive (Linux) or -force_load
(Mac) is necessary when linking a Trickified library into a sim.
We can simplify this by partially linking into an object instead of
creating a library. The linker will link all symbols in an object
regardless of whether or not they are known to be needed.
Refs #309
Moved makefile assignment of S_MAIN out of MAkefile.common to simulation
makefile. The definition in Makefile.common was causing trouble for
autotesting because it changes TRICK_HOST_CPU.
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.
We've agreed that the long-term solution is to refactor the makefiles so
we don't use recursive make. Until then, continue double including
S_overrides.mk so that the $(S_MAIN) target is available in
S_overrides.mk. Resolve#360 by having Trickified libraries use
target-specific variables (ironically, on $(S_MAIN)) to avoid
duplication of the -whole-archive option.
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
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.
2 problems found. Syncing scheduled threads was not happening at all because the job
was not being rescheduled. Did not want to deal with changing job call times so I
called the new scheuduled_thread_sync routine from advance_sim_time. That's where
it started, it'll be fine.
Also found that I was resetting job complete flags too aggressively. The check to
test if the thread is ready to run was missing. Added that check back in.
Created a new executive job that waits for threads to finish and readies them
for their next frame of execution. Created a new job class system_thread_sync
after the top of frame jobs and before the input processor is run to sync the
threads. Along the way cleaned up instrumentation jobs on the threads to fix#290.
Added the clean rules back to Makefile.sim with a addition of
defining a conditional variable. If this variable is set than
the set of rules in the local makefile will not be defined. This
should allow the sim to be cleaned whether TRICK_HOME exists or not.
Created man pages for each executable we have in bin. Updated the
couple of man pages we did have in there. Modified trick-CP
to accept arguments. Updated the version number reported by ICG
as well.
Fixed the configure script to allow the user to specify using a python3
interpreter. Had to change the the way to load the swig generated python modules.
Also had to change code dealing with python strings, oct, long, and
boolean operations.
refs #258
Set LD in our makefiles to the ld executable found by configure.
Changed the final sim link to use TRICK_CPPC as the link command since
it was using the compiler anyways. Changed the places where we use "ld" to
use LD.
refs #131
Moved the job that removes log files from a default data to a phase 1 initialization
job. Initialization jobs are not run in the master sim if the sim is a monte carlo
run, so the data is not deleted.
refs #35
Changed the include for udunits to #include <udunits2.h> to work
on all platforms. Added the include directory /usr/include/udunits2
for Linux.
refs #231
Initial checkin of using udunits for measurement units conversions. Replaced
our conversion code in ICG and swig code to use udunits.
Also added code to convert unit symbols that we used in Trick that are different
names in udunits.
Added a sim_object that will eventually allow users to specify a custom
set of files to read units information.
refs #231
Added a test to set the debugger command to gdb or lldb depending
on availability. Created a new script for lldb to run. Modified
the script for gdb to backtrace all threads.
refs #227
Initial checkin of STL checkpointing. This checkin only covers the sequential
STLs, vector, list, deque, set, and multiset. This checkin does include the
changes in Trick header files to include/exclude our STLs properly to make a
restartable checkpoint.
refs #206
Moved SIM_test_ip and a couple of other sims that depend on the same model set
to a new test directory. I'm doing a couple of sims at a time.
refs #191
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
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
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
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
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
Wrote a python routine called get_value_by_ref_name that takes
a variable name string as an argument. The string is passed to
ref_attributes to find the address and returns a REF2 structure. The REF2
structure is passed to ref_to_value and the type and value of the variable
is returned in a structure. We call vval_<type> to extract the raw value
from the structure and return that to python space.
Made a couple of other bug fixes in the FieldVisior and cpp input file
example found while investigating this issue.
refs #123
So I found that I didn't write many of the autoconf rules correctly including
the one searching for motif. I also messed up the checks for bison, flex, and
perl. I added new rules to search for Xwindows headers and libraries. The
motif rule is only executed if we find fermi-ware where it is used.
refs #119
Jenkins not happy with me. Jenkins has empty TRICK_CFLAGS and
TRICK_CXXFLAGS. There was an if statement in Makefile.common that
did something different if it was empty.
refs #90
Well sims compiled, but I forgot to test if Trick itself
would compile. It didn't. Added TRICK_SYSTEM_CFLAGS and
TRICK_SYSTEM_CXXFLAGS where needed.
refs #90
Created TRICK_SYSTEM_CFLAGS, TRICK_SYSTEM_CXXFLAGS, and TRICK_SYSTEM_SFLAGS
that Trick uses to add the Trick system includes, defines and other
compilation flags. TRICK_CFLAGS and TRICK_CXXFLAGS are now in
full control of the user.
refs #90
Added a new TRICK_EXT_LIB_DIRS variable that allows users to
tell Trick about external libraries, rather than trying to
use TRICK_EXCLUDE. Added back getting multiple library dependency
sections from source files.
refs #86
First tests are working. Changing a source file and header works
as before. Adding library dependencies in either of these files
causes the makefile pieces to be redone. Only tested in the ball
sim so far.
refs #86
librt was on added to TRICK_EXEC_LINK_LIBS but it was overwritten. Changed
librt to be added to a different variable name, PLATFORM_LIBS and that
variable is added to TRICK_EXEC_LINK_LIBS.
refs #83
Functioning build directory on Linux. Everything is going into the build directory.
All files for all steps use the full path. this change removes the need for us to
call depend_objs to fix makefile dependencies. Changed the makefile rules to use
more pattern rules reducing the size of make_makefile.pm and the makefile too.
Changed the output of make to show short commands for each compile line. Setting
the variable TRICK_VERBOSE_BUILD in the environement, command line, or in S_overrides.mk
will change the output to the full printout.
refs #80
Moved most generated files into the build directory. All object code,
io_src realated files, and swig related files are now in build.
Realized that ICG should be creating the makefile for the io_src
code. ICG knows which files it created.
refs #80