mirror of
https://github.com/nasa/trick.git
synced 2024-12-18 20:57:55 +00:00
Split test sims and fun sims into separate directories.
Moved more sims into the test directory. refs #191
This commit is contained in:
parent
0c84b8ad08
commit
0144cc121a
4
test/SIM_demo_inputfile/S_overrides.mk
Normal file
4
test/SIM_demo_inputfile/S_overrides.mk
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
TRICK_CFLAGS += -I./models $(PYTHON_INCLUDES)
|
||||||
|
TRICK_CXXFLAGS += -I./models $(PYTHON_INCLUDES)
|
||||||
|
|
4
test/SIM_stls/S_overrides.mk
Normal file
4
test/SIM_stls/S_overrides.mk
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
TRICK_CFLAGS += -I../models
|
||||||
|
TRICK_CXXFLAGS += -I../models
|
||||||
|
|
4
test/SIM_stls2/S_overrides.mk
Normal file
4
test/SIM_stls2/S_overrides.mk
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
TRICK_CFLAGS += -I../models
|
||||||
|
TRICK_CXXFLAGS += -I../models
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
trick.stop(300.0)
|
trick.stop(30.0)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
43
test/SIM_test_inherit/S_define
Normal file
43
test/SIM_test_inherit/S_define
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
/************************TRICK HEADER*************************
|
||||||
|
PURPOSE:
|
||||||
|
(blah blah blah)
|
||||||
|
LIBRARY DEPENDENCIES:
|
||||||
|
(
|
||||||
|
)
|
||||||
|
*************************************************************/
|
||||||
|
|
||||||
|
#include "sim_objects/default_trick_sys.sm"
|
||||||
|
|
||||||
|
class BaseSimObject : public Trick::SimObject {
|
||||||
|
|
||||||
|
public:
|
||||||
|
void print_me() {
|
||||||
|
message_publish( MSG_NORMAL , "In base sim_object\n" ) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Constructor to add the jobs */
|
||||||
|
BaseSimObject() {
|
||||||
|
(10.0, "scheduled") print_me() ;
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
class DerivedBallSimObject : public BaseSimObject {
|
||||||
|
public:
|
||||||
|
void print_me() {
|
||||||
|
message_publish( MSG_NORMAL , "In derived sim_object\n" ) ;
|
||||||
|
}
|
||||||
|
DerivedBallSimObject() {
|
||||||
|
(10.0, "scheduled") print_me() ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Instantiations
|
||||||
|
DerivedBallSimObject ball ;
|
||||||
|
|
||||||
|
// Connect objects
|
||||||
|
void create_connections() {
|
||||||
|
// Set the default termination time
|
||||||
|
trick_sys.sched.set_terminate_time(10.0) ;
|
||||||
|
trick_sys.sched.set_freeze_frame(0.10) ;
|
||||||
|
}
|
||||||
|
|
3
test/SIM_test_inherit/S_overrides.mk
Normal file
3
test/SIM_test_inherit/S_overrides.mk
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
|
||||||
|
TRICK_CFLAGS +=
|
||||||
|
TRICK_CXXFLAGS +=
|
@ -5,9 +5,6 @@ PURPOSE:
|
|||||||
|
|
||||||
#include "sim_objects/default_trick_sys.sm"
|
#include "sim_objects/default_trick_sys.sm"
|
||||||
|
|
||||||
/**
|
|
||||||
This class is the base ball class
|
|
||||||
*/
|
|
||||||
class testIOSimObject : public Trick::SimObject {
|
class testIOSimObject : public Trick::SimObject {
|
||||||
|
|
||||||
public:
|
public:
|
@ -63,8 +63,8 @@ ip2.c_test.cpp3[2][3] = 40
|
|||||||
|
|
||||||
ip2.uc_test.uc = 123
|
ip2.uc_test.uc = 123
|
||||||
ip2.uc_test.uca = [ 0 , 5 , 6 , 7 ]
|
ip2.uc_test.uca = [ 0 , 5 , 6 , 7 ]
|
||||||
ip2.uc_test.ucaa[0][0] = [ 0 , 50 , 60 , 70 ]
|
ip2.uc_test.ucaa[0] = [ 0 , 50 , 60 , 70 ]
|
||||||
ip2.uc_test.ucaa[1][0] = [ 0 , 20 , 30 , 40 ]
|
ip2.uc_test.ucaa[1] = [ 0 , 20 , 30 , 40 ]
|
||||||
|
|
||||||
ip2.uc_test.ucp = id(ip2.uc_test.uc)
|
ip2.uc_test.ucp = id(ip2.uc_test.uc)
|
||||||
ip2.uc_test.ucp[0] = 65
|
ip2.uc_test.ucp[0] = 65
|
@ -3,15 +3,15 @@ PURPOSE:
|
|||||||
(This comment lists out the other object files that are not included from c++ headers)
|
(This comment lists out the other object files that are not included from c++ headers)
|
||||||
LIBRARY DEPENDENCIES:
|
LIBRARY DEPENDENCIES:
|
||||||
(
|
(
|
||||||
(test/ip2/src/ip.c)
|
(ip2/src/ip.c)
|
||||||
(test/ip2/src/ip_test_init.c)
|
(ip2/src/ip_test_init.c)
|
||||||
)
|
)
|
||||||
*************************************************************/
|
*************************************************************/
|
||||||
|
|
||||||
#include "sim_objects/default_trick_sys.sm"
|
#include "sim_objects/default_trick_sys.sm"
|
||||||
|
|
||||||
|
|
||||||
##include "test/ip2/include/ip.h"
|
##include "ip2/include/ip.h"
|
||||||
|
|
||||||
%{
|
%{
|
||||||
|
|
4
test/SIM_test_ip2/S_overrides.mk
Normal file
4
test/SIM_test_ip2/S_overrides.mk
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
TRICK_CFLAGS += -I./models
|
||||||
|
TRICK_CXXFLAGS += -I./models
|
||||||
|
|
@ -6,8 +6,8 @@ PURPOSE:
|
|||||||
#include "sim_objects/default_trick_sys.sm"
|
#include "sim_objects/default_trick_sys.sm"
|
||||||
|
|
||||||
|
|
||||||
##include "test/sched/include/sched.h"
|
##include "sched/include/sched.h"
|
||||||
##include "test/sched/include/sched_proto.h"
|
##include "sched/include/sched_proto.h"
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
// SIM_OBJECT: parent
|
// SIM_OBJECT: parent
|
4
test/SIM_test_sched/S_overrides.mk
Normal file
4
test/SIM_test_sched/S_overrides.mk
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
TRICK_CFLAGS += -I./models
|
||||||
|
TRICK_CXXFLAGS += -I./models
|
||||||
|
|
@ -3,23 +3,23 @@
|
|||||||
(This comment lists out the other object files that are not included from c++ headers)
|
(This comment lists out the other object files that are not included from c++ headers)
|
||||||
LIBRARY DEPENDENCIES:
|
LIBRARY DEPENDENCIES:
|
||||||
(
|
(
|
||||||
(test/sched/src/sched_amf.o)
|
(sched/src/sched_amf.o)
|
||||||
(test/sched/src/sched_async.o)
|
(sched/src/sched_async.o)
|
||||||
(test/sched/src/sched_deriv.o)
|
(sched/src/sched_deriv.o)
|
||||||
(test/sched/src/sched_dyn_event.o)
|
(sched/src/sched_dyn_event.o)
|
||||||
(test/sched/src/sched_effector.o)
|
(sched/src/sched_effector.o)
|
||||||
(test/sched/src/sched_effector_emitter.o)
|
(sched/src/sched_effector_emitter.o)
|
||||||
(test/sched/src/sched_effector_receiver.o)
|
(sched/src/sched_effector_receiver.o)
|
||||||
(test/sched/src/sched_environment.o)
|
(sched/src/sched_environment.o)
|
||||||
(test/sched/src/sched_init.o)
|
(sched/src/sched_init.o)
|
||||||
(test/sched/src/sched_integ.o)
|
(sched/src/sched_integ.o)
|
||||||
(test/sched/src/sched_logging.o)
|
(sched/src/sched_logging.o)
|
||||||
(test/sched/src/sched_scheduled.o)
|
(sched/src/sched_scheduled.o)
|
||||||
(test/sched/src/sched_sensor.o)
|
(sched/src/sched_sensor.o)
|
||||||
(test/sched/src/sched_sensor_emitter.o)
|
(sched/src/sched_sensor_emitter.o)
|
||||||
(test/sched/src/sched_sensor_receiver.o)
|
(sched/src/sched_sensor_receiver.o)
|
||||||
(test/sched/src/sched_sensor_reflector.o)
|
(sched/src/sched_sensor_reflector.o)
|
||||||
(test/sched/src/sched_default_data.o)
|
(sched/src/sched_default_data.o)
|
||||||
)
|
)
|
||||||
*************************************************************/
|
*************************************************************/
|
||||||
|
|
@ -1,4 +0,0 @@
|
|||||||
|
|
||||||
TRICK_CFLAGS += -I${TRICK_HOME}/trick_models $(PYTHON_INCLUDES)
|
|
||||||
TRICK_CXXFLAGS += -I${TRICK_HOME}/trick_models $(PYTHON_INCLUDES)
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
|||||||
|
|
||||||
TRICK_CFLAGS += -I${TRICK_HOME}/trick_models
|
|
||||||
TRICK_CXXFLAGS += -I${TRICK_HOME}/trick_models
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
|||||||
|
|
||||||
TRICK_CFLAGS += -I${TRICK_HOME}/trick_models
|
|
||||||
TRICK_CXXFLAGS += -I${TRICK_HOME}/trick_models
|
|
||||||
|
|
@ -1,71 +0,0 @@
|
|||||||
/************************TRICK HEADER*************************
|
|
||||||
PURPOSE:
|
|
||||||
(blah blah blah)
|
|
||||||
LIBRARY DEPENDENCIES:
|
|
||||||
(
|
|
||||||
)
|
|
||||||
*************************************************************/
|
|
||||||
|
|
||||||
#include "sim_objects/default_trick_sys.sm"
|
|
||||||
|
|
||||||
##include "Ball++/L1/include/Ball.hh"
|
|
||||||
|
|
||||||
/**
|
|
||||||
This class is the base ball class
|
|
||||||
*/
|
|
||||||
class ballSimObject : public Trick::SimObject {
|
|
||||||
|
|
||||||
public:
|
|
||||||
/** The actual ball object */
|
|
||||||
Ball obj ;
|
|
||||||
|
|
||||||
/** Constructor to add the jobs */
|
|
||||||
ballSimObject() {
|
|
||||||
("default_data") obj.force.default_data() ;
|
|
||||||
("default_data") obj.state.default_data() ;
|
|
||||||
|
|
||||||
("initialization") obj.state_init() ;
|
|
||||||
|
|
||||||
("derivative") obj.force_field() ;
|
|
||||||
("derivative") obj.state_deriv() ;
|
|
||||||
("integration") trick_ret = obj.state_integ() ;
|
|
||||||
|
|
||||||
{BLUE} (10.0, "scheduled") trick_ret = obj.state_print() ;
|
|
||||||
|
|
||||||
//C1 (10.0, "scheduled") obj.state_print() ;
|
|
||||||
//C2 (10.0, "scheduled") obj.state_print() ;
|
|
||||||
|
|
||||||
("freeze") obj.state_print() ;
|
|
||||||
|
|
||||||
("shutdown") obj.shutdown() ;
|
|
||||||
}
|
|
||||||
} ;
|
|
||||||
|
|
||||||
class DerivedBallSimObject : public ballSimObject {
|
|
||||||
public:
|
|
||||||
int print_me() {
|
|
||||||
message_publish( MSG_NORMAL , "In derived ball job\n" ) ;
|
|
||||||
}
|
|
||||||
DerivedBallSimObject() {
|
|
||||||
(10.0, "scheduled") print_me() ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Instantiations
|
|
||||||
DerivedBallSimObject ball ;
|
|
||||||
|
|
||||||
IntegLoop my_integ_loop (0.01) ball;
|
|
||||||
|
|
||||||
// Connect objects
|
|
||||||
void create_connections() {
|
|
||||||
|
|
||||||
// Set the default termination time
|
|
||||||
trick_sys.sched.set_terminate_time(300.0) ;
|
|
||||||
trick_sys.sched.set_freeze_frame(0.10) ;
|
|
||||||
|
|
||||||
ball.obj.state.add_external_force( ball.obj.force.output.force ) ;
|
|
||||||
|
|
||||||
my_integ_loop.getIntegrator( Runge_Kutta_2, 4);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
|
|
||||||
TRICK_CFLAGS += -I${TRICK_HOME}/trick_models -DTRICK_EXPERIMENTAL
|
|
||||||
TRICK_CXXFLAGS += -I${TRICK_HOME}/trick_models -DTRICK_EXPERIMENTAL
|
|
@ -1,4 +0,0 @@
|
|||||||
|
|
||||||
TRICK_CFLAGS += -I${TRICK_HOME}/trick_models
|
|
||||||
TRICK_CXXFLAGS += -I${TRICK_HOME}/trick_models
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
|||||||
|
|
||||||
TRICK_CFLAGS += -I${TRICK_HOME}/trick_models
|
|
||||||
TRICK_CXXFLAGS += -I${TRICK_HOME}/trick_models
|
|
||||||
|
|
@ -1,158 +0,0 @@
|
|||||||
|
|
||||||
''' Ensure variable is defined '''
|
|
||||||
try:
|
|
||||||
DR_GROUP_ID
|
|
||||||
except NameError:
|
|
||||||
def initialize_globals():
|
|
||||||
global DR_GROUP_ID # Create global variable when not defined
|
|
||||||
global drg # Create a data recording group variable
|
|
||||||
DR_GROUP_ID = 0
|
|
||||||
drg = [] # Initialize variable as an empty array
|
|
||||||
initialize_globals()
|
|
||||||
|
|
||||||
|
|
||||||
#sys.exec.record.directory = "" ; ''' Full path to output directory '''
|
|
||||||
#sys.exec.record.terminate_on_bad_ref = Yes ; ''' Yes = Terminate sim when a parameter name cannot be found, No = skip ref '''
|
|
||||||
|
|
||||||
def add_dr_group():
|
|
||||||
global DR_GROUP_ID
|
|
||||||
global drg
|
|
||||||
group_name = "auto"
|
|
||||||
drg.append( trick.sim_services.DRAscii(group_name) )
|
|
||||||
drg[DR_GROUP_ID].set_fixed_ascii(True)
|
|
||||||
drg[DR_GROUP_ID].set_freq(trick.sim_services.DR_Always)
|
|
||||||
drg[DR_GROUP_ID].enable()
|
|
||||||
drg[DR_GROUP_ID].set_cycle(1.0)
|
|
||||||
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.bits[0].bits_a")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.bits[0].bits_b")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.bits[0].bits_c")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.bits[0].bits_d")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.bits[0].doub_x")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.bits[1].bits_a")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.bits[1].bits_b")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.bits[1].bits_c")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.bits[1].bits_d")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.bits[1].doub_x")
|
|
||||||
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.strings_good")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_types.s")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_types.us")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_types.i")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_types.ui")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_types.l")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_types.ul")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_types.f")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_types.d")
|
|
||||||
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_array_types.sa[1][1][0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_array_types.usa[1][1][0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_array_types.ia[1][1][0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_array_types.uia[1][1][0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_array_types.la[1][1][0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_array_types.ula[1][1][0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_array_types.fa[0][0][0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_array_types.fa[0][1][0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_array_types.fa[1][0][0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_array_types.fa[1][1][0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_array_types.da[0][0][0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_array_types.da[0][1][0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_array_types.da[1][0][0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_array_types.da[1][1][0]")
|
|
||||||
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_pointer_types.uspp[1][1][0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_pointer_types.ipp[1][1][0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_pointer_types.uipp[1][1][0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_pointer_types.lpp[1][1][0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_pointer_types.ulpp[1][1][0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_pointer_types.fpp[1][1][0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_pointer_types.dpp[1][1][0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_mixed_types.spa[1][1][0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_mixed_types.uspa[1][1][0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_mixed_types.uipa[1][1][0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_mixed_types.lpa[1][1][0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_mixed_types.ulpa[1][1][0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_mixed_types.fpa[1][1][0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.c_mixed_types.dpa[1][1][0]")
|
|
||||||
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].second[1]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].second[2]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].second[3]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].second[4]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].meter[0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].meter[1]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].meter[2]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].meter[3]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].meter[4]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].meter[5]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].meter[6]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].meter[7]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].meter[8]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].meter[9]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].radian[1]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].radian[2]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].radian[3]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].radian[4]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].kilogram[1]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].kilogram[2]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].kilogram[3]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].kilogram[4]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].kilogram[5]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].newton[1]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].newton[2]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].newton[3]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].newton[4]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].volt[1]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].volt[2]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].amp[1]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].amp[2]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].ohm[0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].ohm[1]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].celsius[1]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].celsius[2]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].celsius[3]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].fahrenheit[1]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].fahrenheit[2]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].fahrenheit[3]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].temp_rate[1]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].temp_rate[2]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].temp_rate[3]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].area[0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].area[1]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].area[2]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].volume[0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].volume[1]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].volume[2]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].velocity[0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].velocity[1]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].velocity[2]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].velocity_eng[0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].velocity_eng[1]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].accel[0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].accel[1]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].accel[2]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].inertia[0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].inertia[1]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].inertia[2]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].torque[0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].torque[1]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].torque[2]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].pressure[0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].pressure[1]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].pressure[2]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].density[0]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].density[1]")
|
|
||||||
drg[DR_GROUP_ID].add_variable("test.ip.units_test[0][0][0].density[2]";
|
|
||||||
|
|
||||||
trick_data_record.drd.add_group( drg[DR_GROUP_ID], trick.DR_Buffer )
|
|
||||||
add_dr_group()
|
|
||||||
|
|
||||||
|
|
||||||
"""
|
|
||||||
add 1 to DR_GROUP_ID, THIS SETS DR_GROUP_ID UP
|
|
||||||
FOR THE NEXT DATA RECORDING FILE
|
|
||||||
"""
|
|
||||||
def increment_group_id():
|
|
||||||
global DR_GROUP_ID
|
|
||||||
DR_GROUP_ID += 1
|
|
||||||
increment_group_id()
|
|
@ -1,124 +0,0 @@
|
|||||||
|
|
||||||
read = 2.0
|
|
||||||
|
|
||||||
/*=== FLOATING POINT, INTEGER, AND VOID #define CAPABILITIES ===*/
|
|
||||||
|
|
||||||
#define DBL_NUM 7.7777777777777777
|
|
||||||
#define FLT_NUM 1.2345
|
|
||||||
#define INT_NUM 12345
|
|
||||||
|
|
||||||
#define INT_NUM + /* INT_NUM NOW = 12346 */
|
|
||||||
#define INT_NUM 12356 /* INT_NUM NOW = 12356 */
|
|
||||||
|
|
||||||
#define FLT_NUM + /* FLT_NUM NOW = 2.2345 */
|
|
||||||
#define FLT_NUM 12.2345 /* FLT_NUM NOW = 12.2345 */
|
|
||||||
|
|
||||||
#define NO_VALUE
|
|
||||||
|
|
||||||
test.ip.c_array_types.ia[0][0][0] = INT_NUM
|
|
||||||
test.ip.c_array_types.da[0][0][0] = FLT_NUM
|
|
||||||
test.ip.c_array_types.da[0][0][1] = DBL_NUM
|
|
||||||
|
|
||||||
|
|
||||||
test.ip.c_array_types.sa[0][0][0] = 0 , 0
|
|
||||||
test.ip.c_array_types.sa[0][1][0] = 0 , 0
|
|
||||||
#ifdef NO_VALUE
|
|
||||||
test.ip.c_array_types.sa[0][0][0] = 111 , 222
|
|
||||||
#endif
|
|
||||||
#ifndef NO_VALUE
|
|
||||||
test.ip.c_array_types.sa[0][1][0] = 1 , 2
|
|
||||||
#endif
|
|
||||||
|
|
||||||
test.ip.c_array_types.sa[1][0][0] = 0 , 0
|
|
||||||
test.ip.c_array_types.sa[1][1][0] = 0 , 0
|
|
||||||
#ifdef VALUE
|
|
||||||
test.ip.c_array_types.sa[1][0][0] = 111 , 222
|
|
||||||
#endif
|
|
||||||
#ifndef VALUE
|
|
||||||
test.ip.c_array_types.sa[1][1][0] = 1 , 2
|
|
||||||
#endif
|
|
||||||
|
|
||||||
test.ip.c_array_types.usa[1][0][0] = 0 , 0
|
|
||||||
test.ip.c_array_types.usa[1][1][0] = 0 , 0
|
|
||||||
#ifdef INT_NUM
|
|
||||||
test.ip.c_array_types.usa[1][0][0] = 1111 , 2222
|
|
||||||
#endif
|
|
||||||
#ifndef INT_NUM
|
|
||||||
test.ip.c_array_types.usa[1][1][0] = 11 , 22
|
|
||||||
#endif
|
|
||||||
|
|
||||||
test.ip.c_array_types.uia[0][0][0] = 0 , 0
|
|
||||||
test.ip.c_array_types.uia[0][1][0] = 0 , 0
|
|
||||||
#ifdef FLT_NUM
|
|
||||||
test.ip.c_array_types.uia[0][0][0] = 1111 , 2222
|
|
||||||
#endif
|
|
||||||
#ifndef FLT_NUM
|
|
||||||
test.ip.c_array_types.uia[0][1][0] = 11 , 22
|
|
||||||
#endif
|
|
||||||
|
|
||||||
test.ip.c_array_types.uia[1][0][0] = 0 , 0
|
|
||||||
test.ip.c_array_types.uia[1][1][0] = 0 , 0
|
|
||||||
#if INT_NUM == 12356
|
|
||||||
test.ip.c_array_types.uia[1][0][0] = 1111 , 2222
|
|
||||||
#endif
|
|
||||||
#if INT_NUM != 12356
|
|
||||||
test.ip.c_array_types.uia[1][1][0] = 11 , 22
|
|
||||||
#endif
|
|
||||||
|
|
||||||
test.ip.c_array_types.la[0][0][0] = 0 , 0
|
|
||||||
test.ip.c_array_types.la[0][1][0] = 0 , 0
|
|
||||||
#if INT_NUM == 1
|
|
||||||
test.ip.c_array_types.la[0][0][0] = 1111 , 2222
|
|
||||||
#endif
|
|
||||||
#if INT_NUM != 1
|
|
||||||
test.ip.c_array_types.la[0][1][0] = 11 , 22
|
|
||||||
#endif
|
|
||||||
|
|
||||||
test.ip.c_array_types.la[1][0][0] = 0 , 0
|
|
||||||
test.ip.c_array_types.la[1][1][0] = 0 , 0
|
|
||||||
#if INT_NUM == 12356
|
|
||||||
test.ip.c_array_types.la[1][0][0] = 1111 , 2222
|
|
||||||
#endif
|
|
||||||
#if INT_NUM == 0
|
|
||||||
test.ip.c_array_types.la[1][1][0] = 11 , 22
|
|
||||||
#endif
|
|
||||||
|
|
||||||
test.ip.c_array_types.fa[0][0][0] = 0 , 0
|
|
||||||
test.ip.c_array_types.fa[0][1][0] = 0 , 0
|
|
||||||
#if INT_NUM != 1
|
|
||||||
test.ip.c_array_types.fa[0][0][0] = 1111 , 2222
|
|
||||||
#endif
|
|
||||||
#if INT_NUM != 2
|
|
||||||
test.ip.c_array_types.fa[0][1][0] = 11 , 22
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*=== CHARACTER STRING #define CAPABILITY ===*/
|
|
||||||
|
|
||||||
#define STR "test"
|
|
||||||
#define F "meowmeowmeow"
|
|
||||||
#define STRF "mooomooomooo"
|
|
||||||
|
|
||||||
test.ip.c_array_types.fa[1][0][0] = 0 , 0
|
|
||||||
test.ip.c_array_types.fa[1][1][0] = 0 , 0
|
|
||||||
#ifdef STRF
|
|
||||||
test.ip.c_array_types.fa[1][0][0] = 1111 , 2222
|
|
||||||
#endif
|
|
||||||
#ifndef STRF
|
|
||||||
test.ip.c_array_types.fa[1][1][0] = 11 , 22
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define TH ${TRICK_HOME}
|
|
||||||
|
|
||||||
test.ip.c_types.l = 123456789
|
|
||||||
test.ip.c_types.cp = "#(TH)"
|
|
||||||
test.ip.c_pointer_types.cpp[0][0][0] = "#(TH)" , "#(TH)";
|
|
||||||
test.ip.c_pointer_types.cpp[0][1][0] = "#(TH)" , "#(TH)"
|
|
||||||
test.ip.c_pointer_types.cpp[1][0][0] = "#{TH}" , "#(TH)"
|
|
||||||
test.ip.c_pointer_types.cpp[1][1][0] = "#(TH)" , "#(TH)"
|
|
||||||
|
|
||||||
test.ip.c_mixed_types.cpa[0][0][0] = "#(TH)" , "#{TH}"
|
|
||||||
test.ip.c_mixed_types.cpa[0][1][0] = "#(TH)" , "#(TH)"
|
|
||||||
test.ip.c_mixed_types.cpa[1][0][0] = "#(TH)" , "#(TH)"
|
|
||||||
test.ip.c_mixed_types.cpa[1][1][0] = "#(TH)" , "#(TH)"
|
|
||||||
|
|
||||||
test.ip.units_test[0][0][0].measure = feet
|
|
@ -1,2 +0,0 @@
|
|||||||
|
|
||||||
execfile("Modified_data/next_level.py")
|
|
@ -1,3 +0,0 @@
|
|||||||
|
|
||||||
test.ip.c_pointer_types.cpp[0][0][0] = ["Cat" , "Dog"]
|
|
||||||
test.ip.c_pointer_types.cpp[0][0][1] = ["Horse"]
|
|
@ -1,3 +0,0 @@
|
|||||||
|
|
||||||
def test_print():
|
|
||||||
print "test"
|
|
@ -1 +0,0 @@
|
|||||||
Ball Tutorial test run
|
|
@ -1,9 +0,0 @@
|
|||||||
|
|
||||||
def main():
|
|
||||||
|
|
||||||
my_integ_loop.getIntegrator( trick.Runge_Kutta_2, 4)
|
|
||||||
trick.stop(300.0)
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
main()
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
|||||||
/************************TRICK HEADER*************************
|
|
||||||
PURPOSE:
|
|
||||||
(This comment lists out the other object files that are not included from c++ headers)
|
|
||||||
LIBRARY DEPENDENCIES:
|
|
||||||
(
|
|
||||||
(sim_lib SIM_Ball++_L1)
|
|
||||||
)
|
|
||||||
*************************************************************/
|
|
||||||
|
|
||||||
#include "SIM_Ball++_L1/S_define"
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
|||||||
TRICK_SFLAGS += -I${TRICK_HOME}/trick_sims
|
|
||||||
TRICK_ICG_EXCLUDE=/users/lin/trick_dev/trunk/trick_models/exclude_me
|
|
||||||
TRICK_CFLAGS += -I${TRICK_HOME}/trick_models
|
|
||||||
TRICK_CXXFLAGS += -I${TRICK_HOME}/trick_models
|
|
||||||
|
|
@ -1 +0,0 @@
|
|||||||
Object Oriented Ball Tutorial Simulation - Lesson 1
|
|
@ -2,7 +2,7 @@
|
|||||||
export TRICK_HOST_CPU := $(shell $(TRICK_HOME)/bin/trick-gte TRICK_HOST_CPU)
|
export TRICK_HOST_CPU := $(shell $(TRICK_HOME)/bin/trick-gte TRICK_HOST_CPU)
|
||||||
|
|
||||||
# List out sims we want to compile
|
# List out sims we want to compile
|
||||||
COMPILE_DIRS = SIM_Ball++_L1 \
|
COMPILE_DIRS = \
|
||||||
Ball/SIM_ball_L1 \
|
Ball/SIM_ball_L1 \
|
||||||
Ball/SIM_ball_L2 \
|
Ball/SIM_ball_L2 \
|
||||||
Ball/SIM_ball_L3 \
|
Ball/SIM_ball_L3 \
|
||||||
@ -14,17 +14,10 @@ COMPILE_DIRS = SIM_Ball++_L1 \
|
|||||||
Cannon/SIM_cannon_eulercromer \
|
Cannon/SIM_cannon_eulercromer \
|
||||||
Cannon/SIM_cannon_integ \
|
Cannon/SIM_cannon_integ \
|
||||||
Cannon/SIM_cannon_jet \
|
Cannon/SIM_cannon_jet \
|
||||||
SIM_demo_inputfile \
|
SIM_Ball++_L1 \
|
||||||
SIM_demo_sdefine \
|
|
||||||
SIM_satellite \
|
SIM_satellite \
|
||||||
SIM_stls \
|
|
||||||
SIM_stls2 \
|
|
||||||
SIM_sun \
|
SIM_sun \
|
||||||
SIM_target \
|
SIM_target
|
||||||
SIM_test_inherit \
|
|
||||||
SIM_test_ip2 \
|
|
||||||
SIM_test_sched \
|
|
||||||
SIM_test_simlib
|
|
||||||
|
|
||||||
#SIM_ball_default_data \
|
#SIM_ball_default_data \
|
||||||
#SIM_monte \
|
#SIM_monte \
|
||||||
@ -34,7 +27,7 @@ COMPILE_DIRS = SIM_Ball++_L1 \
|
|||||||
# SIM_test_varserv
|
# SIM_test_varserv
|
||||||
|
|
||||||
# List out sims we want to run unit tests
|
# List out sims we want to run unit tests
|
||||||
TEST_DIRS = SIM_Ball++_L1 \
|
TEST_DIRS = \
|
||||||
Ball/SIM_ball_L1 \
|
Ball/SIM_ball_L1 \
|
||||||
Ball/SIM_ball_L2 \
|
Ball/SIM_ball_L2 \
|
||||||
Ball/SIM_ball_L3 \
|
Ball/SIM_ball_L3 \
|
||||||
@ -46,13 +39,9 @@ TEST_DIRS = SIM_Ball++_L1 \
|
|||||||
Cannon/SIM_cannon_eulercromer \
|
Cannon/SIM_cannon_eulercromer \
|
||||||
Cannon/SIM_cannon_integ \
|
Cannon/SIM_cannon_integ \
|
||||||
Cannon/SIM_cannon_jet \
|
Cannon/SIM_cannon_jet \
|
||||||
SIM_demo_sdefine \
|
SIM_Ball++_L1 \
|
||||||
SIM_stls \
|
|
||||||
SIM_stls2 \
|
|
||||||
SIM_sun \
|
SIM_sun \
|
||||||
SIM_target \
|
SIM_target
|
||||||
SIM_test_sched \
|
|
||||||
SIM_test_simlib
|
|
||||||
|
|
||||||
#SIM_ball_default_data \
|
#SIM_ball_default_data \
|
||||||
#SIM_monte \
|
#SIM_monte \
|
||||||
|
Loading…
Reference in New Issue
Block a user