mirror of
https://github.com/nasa/trick.git
synced 2024-12-22 14:32:24 +00:00
0144cc121a
Moved more sims into the test directory. refs #191
44 lines
1.0 KiB
Plaintext
44 lines
1.0 KiB
Plaintext
/************************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) ;
|
|
}
|
|
|