trick/trick_sims/SIM_stls2/S_define

38 lines
994 B
Plaintext
Raw Normal View History

2015-02-26 15:02:31 +00:00
#include "sim_objects/default_trick_sys.sm"
##include "stl_checkpoint/include/STLCheckpoint.hh"
/* This object tests having 2 of the same type of object containing STLs in the same sim_object.
The checkpoints use the name of the objects to give the STLs unique and identifiable names
in the checkpoint. This is done by invoking CHECKPOINT_STL for each variable (see stl_checkpoints.sm) */
class theSimObject : public Trick::SimObject {
public:
STLCheckpoint stlc ;
STLCheckpoint stlc2 ;
/** Constructor to add the jobs */
theSimObject() : stlc(std::string("Petunia")) , stlc2() {
(1.0, "scheduled") stlc.speak() ;
#include "stl_checkpoints.sm"
}
} ;
// Multiple simobjects
theSimObject the_object ;
theSimObject the_object2 ;
// 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) ;
}