| TRICK 7 TO TRICK 10 INPUT FILE DIFFERENCES KEY : |  |  |  |
| Bold = Default behavior |  |  |  |
| Green = New Trick 10 feature or implementation is different than Trick 7 |  |  |  |
| Blue = Need a Trick 10 interface routine |  |  |  |
| Orange = Not implemented in Trick 10 / presumably not needed |  |  |  |
| Red Bold = Not implemented in Trick 10 / needs to be fixed |  |  |  |
SPECIAL SYNTAX TRICK 7 | TRICK 10 | DESCRIPTION |  |  |
#include "S_default.dat" | N/A : include any default data files in your S_define header | INCLUDE DEFAULT DATA |  |  |
#include "<myother_inputfile>" | import <myother_inputfile> OR execfile("<myother_inputfile>") | INCLUDE ANOTHER INPUT FILE |  |  |
call <simobj>.<funcname>(<params>) ; | <simobj>.<funcname>(<params>) | CALL A SCHEDULED C FUNCTION |  |  |
call <simobj>.<simobj>.<obj>.<funcname>(<params>) ; | <simobj>.<obj>.<funcname>(<params>) | CALL A SCHEDULED C++ FUNCTION |  |  |
checkpoint ; | trick.checkpoint() | CHECKPOINT SIM NOW |  |  |
| trick.load_checkpoint("<checkpoint_filename>") | LOAD A CHECKPOINT FILE NOW |  |  |
checkpoint += <sec> ; | trick.checkpoint(trick.exec_get_sim_time() + <sec>) | CHECKPOINT SIM <sec> SECONDS FROM NOW |  |  |
checkpoint = <sec> ; | trick.checkpoint(<sec>) | CHECKPOINT SIM AT TIME <sec> |  |  |
checkpoint <simobjname> [= <sec>] ; | trick.checkpoint_objects("<checkpoint_filename>","<object>[,<object>,É]") | CHECKPOINT A SIM OBJECT NOW [OR AT TIME <sec> TRICK7 ONLY] |  |  |
cycle <jobname> = <sec> ; | trick.exec_set_job_cycle("<jobname>", <instance>, <sec>) | SET CYCLE TIME OF JOB |  |  |
echo On|Off ; | trick.echo_jobs_on() OR trick.echo_jobs_off() | ECHO NAMES OF CALLED JOBS DURING EXECUTION |  |  |
echo_on ; echo_off ; | NOT IMPLEMENTED | ECHO INPUT FILE AS IT IS PARSED |  |  |
freeze ; | trick.freeze() | FREEZE SIM NOW |  |  |
freeze += <sec> ; | trick.freeze(trick.exec_get_sim_time() + <sec>) | FREEZE SIM <sec> SECONDS FROM NOW |  |  |
freeze = <sec> ; | trick.freeze(<sec>) | FREEZE SIM AT TIME <sec> |  |  |
job <jobname> = On|Off ; | trick.exec_set_job_onoff("<jobname>", <instance>, True|False) | ENABLE/DISABLE RESCHEDULING OF JOB |  |  |
pause ; | raw_input("Input Processor Paused. Hit <enter> to continue") | STOP PROCESSING INPUT UNTIL USER HITS <ENTER> |  |  |
read += <sec> ; | trick.add_read(trick.exec_get_sim_time() + <sec>, "<statements>") | READ FOLLOWING STMTS <sec> SECONDS FROM NOW |  |  |
read = <sec> ; | trick.add_read(<sec>, "<statements>") | READ FOLLOWING STMTS AT TIME <sec> |  |  |
send_hs(<FILE>, "<message_text>") ; | trick.send_hs(None, "<message_text>") | SEND A HEALTH & STATUS MSG TO SIM CONTROL PANEL (IN TRICK10 MSG ALSO GOES TO STDOUT) |  |  |
sim_object <simobjname> = On|Off ; | trick.exec_set_sim_object_onoff("<simobjname>", True|False) | ENABLE/DISABLE RESCHEDULING OF ALL JOBS IN SIM_OBJECT |  |  |
stop ; | trick.stop() | TERMINATE SIM NOW |  |  |
stop += <sec> ; | trick.stop(trick.exec_get_sim_time() + <sec>) | TERMINATE SIM 5 SECONDS FROM NOW |  |  |
stop = <sec> ; | trick.stop(<sec>) | TERMINATE SIM AT TIME <sec> |  |  |
<my_int_ptr> = alloc(5) ; | <my_int_ptr> = trick.alloc_type(5, "int") OR <my_int_ptr> = trick.TMM_declare_var_s("int[5]") OR <my_int_ptr> = trick.TMM_declare_var_1d("int", 5) | DYNAMICALLY ALLOCATE DATA |  |  |
<my_string> = "${<env_varname>}" | getenv("<env_varname>") ; | <my_string> = os.getenv("<env_varname>") | ACCESS ENVIRONMENT VARIABLE |  |  |
<simobj>.<var> {<unit>} = <val> ; | <simobj>.<var> = trick.attach_units("<unit>", <val>) | VARIABLE ASSIGNMENT WITH UNITS |  |  |
if (<simobj>.<var> == <val>) É | if (trick.detach_units(<simobj>.<var>) == <val>) ... | VARIABLE COMPARISON (TRICK10: MUST REMOVE UNITS) |  |  |
EVENTS / MALFUNCTIONS TRICK 7 | TRICK 10 | DESCRIPTION |  |  |
begin_event <event_name> { | <event_name> = trick.new_event("<event_name>") | DECLARE AN EVENT |  |  |
condition : <variable|val> <logic_op>|trip: <variable|val> [slope: +|-] [tolerance: <val>] ; | <event_name>.condition(<index>, "<input text string>") (trip, slope, tolerance NOT IMPLEMENTED) | EVENT CONDITION (AT LEAST 1 IS REQUIRED) |  |  |
[condition: ... ;] | [<event_name>.condition(<index+1>, "<input text string>")] | ADDITIONAL CONDITION(S) |  |  |
action { <any legal input statements> } | <event_name>.action(<index>, "<input text string>") | EVENT ACTION (ONLY 1 IN TRICK7; AT LEAST 1 IN TRICK10) |  |  |
| [<event_name>.action(<index+1>, "<input text string>")] | ADDITIONAL ACTION(S) |  |  |
[dt = 1.0|<sec> ;] | <event_name>.set_cycle(1.0|<sec>) | EVENT CYCLE TIME |  |  |
[priority = <val> ;] | NOT IMPLEMENTED | EVAL PRIORITY OF EVENT WITH RESPECT TO OTHER EVENTS AT SAME TIME |  |  |
[active = On|Off ;] | <event_name>.activate() OR <event_name>.deactivate() | ACTIVATE/DEACTIVATE EVENT EVALUATION |  |  |
[group = all | any <num> ;] | <event_name>.condition_any() (<num>=1 only!) OR <event_name>.condition_all() | HOW TO EVALUATE MULTIPLE EVENT CONDITIONS (TRICK7: FOR "ANY", YOU CAN SPECIFY <num> CONDITIONS TO THAT MUST BE TRUE; TRICK10: <num> IS 1 FOR THE "ANY" CASE.) |  |  |
} ; // end of event | trick.add_event(<event_name>) | END EVENT AND ADD IT TO TRICK'S LIST OF EVENTS |  |  |
begin malfunction <malf_name> { | <malf_name> = trick.new_event("<malf_name>") | DECLARE A MALFUNCTION (IMPLEMENTED AS EVENT IN TRICK10) |  |  |
trigger { condition: <syntax same as event> |job: <malfunction_trigger_jobname> ; insert_before|insert_after: <job_name> ; hold: On|Off ; } | <malf_name>.condition(<index>, "<input text string>") OR <malf_name>.condition_job(<index>, "<job name>") OR <malf_name>.condition_var(<index>, "<variable name>") <malf_name>.condition_hold_on(<index>) OR <malf_name>.condition_hold_off(<index>) insertion is done for whole event, not per trigger or action: see below | MALFUNCTION "TRIGGER" CONDITION OR JOB (AT LEAST 1 REQUIRED) HOLD OPTION TO KEEP CONDITION TRUE WHEN IT BECOMES TRUE |  |  |
[trigger { ... }] | [<malf_name>.condition(<index+1>, "<input text string>") OR <malf_name>.condition_job(<index+1>, "<job name>") OR <malf_name>.condition_var(<index+1>, "<variable name>")] | ADDITIONAL MALFUNCTION TRIGGER CONDITION(S) |  |  |
action { insert_before|insert_after: <job_name> ; <any legal input statements> } |<variable> { insert_before|insert_after: <job_name> ; [values: <new_value> ;] [scale_factor: <scale_value> ;] [bias: <bias_value> ;] [units: {<units>} ;] } |call <malfunction_jobname> before|after <job_name> ; |job <job_name> On|Off ; | <malf_name>.action(<index>, "<input text string>") OR <malf_name>.action_job(<index>, "<job name>") OR <malf_name>.action_job_on(<index>, "<job name>") OR <malf_name>.action_job_off(<index>, "<job name>") (use rti_add/rti_fire to set variables -- see below) insertion is done for whole event, not per trigger or action: see below | MALFUNCTION ACTION |  |  |
[action {É}|<variable {É}|callÉ|jobÉ] | [<malf_name>.action(<index+1>, "<input text string>") OR <malf_name>.action_job(<index+1>, "<job name>"] | ADDITIONAL MALFUNCTION ACTION(S) |  |  |
} ; // end of malfunction | trick.add_event(<malf_name>) OR trick.add_event_before(<malf_name>, "<job_name>") OR trick.add_event_after(<malf_name>, "<job_name>") | END MALFUNCTION (TRICK10: INSERT IT IN JOB QUEUE AT TOP FRAME, OR BEFORE A JOB, OR AFTER A JOB) |  |  |
edit malfunction <malf_name> { É } | <malf_name>.action... OR <malf_name>.condtion... | CHANGE PART(S) OF A MALFUNCTION |  |  |
delete malfunction <malf_name> ; | trick.delete_event(<malf_name>) | DELETE A MALFUNCTION |  |  |
malfunction_cmd <malf_name> disable_trigger ; OR malfunction_cmd <malf_name> enable_trigger ; | <malf_name>.condition_disable(<index>) OR <malf_name>.condition_enable(<index>) | DISABLE/ENABLE MALFUNCTION TRIGGER EVALUATION (TRICK7: ALL OR NONE, TRICK10: SETTABLE PER TRIGGER) |  |  |
| <malf_name>.action_disable(<index>) OR <malf_name>.action_enable(<index>) | DISABLE/ENABLE MALFUNCTION ACTION |  |  |
malfunction_cmd <malf_name> manual_on ; | <malf_name>.manual_on() | MANUALLY SET MALFUNCTION AS FIRED/HOLD ON: ACTIONS RUN EACH CYCLE |  |  |
| <malf_name>.manual_fire() | MANUALLY SET MALFUNCTION AS FIRED: ACTIONS RUN ONCE NOW |  |  |
malfunction_cmd <malf_name> manual_off ; | <malf_name>.manual_off() | MANUALLY SET MALFUNCTION AS NOT FIRED: ACTIONS WILL NOT RUN |  |  |
malfunction_cmd <malf_name> remove_manual ; | <malf_name>.manual_done() | EXIT MANUAL MODE FOR THIS MALFUNCTION, RETURN TO NORMAL EVAL |  |  |
| trick.rti_add_int("<variable name>", <val>) OR trick.rti_add_float("<variable name>", <val>) | ADD NEW VARIABLE VALUES TO A TRICK INTERNAL QUEUE, TO BE "INJECTED" INTO THE SIM WITH RTI_FIRE(). |  |  |
| trick.rti_fire() | SET ALL SIM VARIABLES THAT WERE RTI_ADDED TO THEIR NEW VALUES, OCCURS AT TOP OF NEXT FRAME BEFORE ANY OTHER JOBS ARE STARTED SO THE VARIABLE SETTINGS ARE THREAD SAFE. |  |  |
SYS EXEC IN TRICK 7 | TRICK 10 | DESCRIPTION |  |  |
sys.exec.in.attach_debugger = Yes|No ; | trick.exec_set_attach_debugger(True|False) | ATTACH DEBUGGER IN CASE OF SEG FAULT (LINUX ONLY) |  |  |
sys.exec.in.checkpoint_cpu_number = <n> ; | trick.checkpoint_cpu(<n>) | USE CPU # <n> FOR CHECKPOINT CHILD JOB |  |  |
sys.exec.in.debugger_command = "/usr/bin/gdb|<mydebugger>" ; | trick.exec_set_debugger_command("/usr/bin/gdb|<mydebugger>") | THE DEBUGGER COMMAND |  |  |
sys.exec.in.echo_job = Yes|No ; | trick.echo_jobs_on() OR trick.echo_jobs_off() | ECHO NAMES OF CALLED JOBS DURING EXECUTION |  |  |
sys.exec.in.enable_cpu_stats = Yes|No ; | NOT IMPLEMENTED | PRINT RUNTIME CPU & MEMORY USAGE STATS AT SHUTDOWN |  |  |
sys.exec.in.enable_freeze = Yes|No ; | trick.exec_set_enable_freeze(True|False) | ENABLE CTRL-C FREEZE MODE TOGGLING |  |  |
sys.exec.in.enable_init_stepping = Yes|No ; | NOT IMPLEMENTED | ENABLE INITIALIZATION JOB PHASE STEPPING IN SIM CONTROL PANEL |  |  |
sys.exec.in.enable_var_server = Yes|No ; | trick.set_var_server_enabled(True|False) | ENABLE THE VARIABLE SERVER |  |  |
sys.exec.in.end_checkpoint = Yes|No ; | trick.checkpoint_end(True|False) | DUMP CHECKPOINT AT SHUTDOWN |  |  |
sys.exec.in.frame_log = Yes|No ; | trick.frame_log_on() OR trick.fame_log_off() | RECORD JOB TIMING INFO FOR EACH REALTIME FRAME |  |  |
sys.exec.in.frame_log_max_samples = 1000|<n> ; | trick.frame_log_set_max_samples = 100000|<n> | ONLY RECORD MAX OF <n> JOB TIMING SAMPLES |  |  |
sys.exec.in.frame_log_start_time = 0.0|<sec> ; | NOT IMPLEMENTED; use frame_log_on/frame_log_off with read | SIM TIME TO START JOB TIMING SAMPLES |  |  |
sys.exec.in.freeze_cycle = 0.9999|<sec> ; | trick.exec_set_freeze_frame(1.0|<sec>) | FREEZE JOB CYCLE TIME |  |  |
sys.exec.in.gmt_ref.day = 0|<n> ; | NOT IMPLEMENTED | GMT DAY SHOWN IN SIM CONTROL PANEL |  |  |
sys.exec.in.gmt_ref.hour = 0|<n> ; | NOT IMPLEMENTED | GMT HOUR SHOWN IN SIM CONTROL PANEL |  |  |
sys.exec.in.gmt_ref.min = 0|<n> ; | NOT IMPLEMENTED | GMT MINUTE SHOWN IN SIM CONTROL PANEL |  |  |
sys.exec.in.gmt_ref.sec = 0.0|<n> ; | NOT IMPLEMENTED | GMT SECOND SHOWN IN SIM CONTROL PANEL |  |  |
sys.exec.in.hexflt_checkpoint = Yes|No ; | trick.TMM_hexfloat_checkpoint(True|False) | PUT FLOATS/DOUBLES IN HEX FORMAT WHEN CHECKPOINTING TO PRESERVE PRECISION |  |  |
sys.exec.in.met_ref.day = 0|<n> ; | NOT IMPLEMENTED | MET DAY SHOWN IN SIM CONTROL PANEL |  |  |
sys.exec.in.met_ref.hour = 0|<n> ; | NOT IMPLEMENTED | MET HOUR SHOWN IN SIM CONTROL PANEL |  |  |
sys.exec.in.met_ref.min = 0|<n> ; | NOT IMPLEMENTED | MET MINUTE SHOWN IN SIM CONTROL PANEL |  |  |
sys.exec.in.met_ref.sec = 0.0|<n> ; | NOT IMPLEMENTED | MET SECOND SHOWN IN SIM CONTROL PANEL |  |  |
sys.exec.in.mtv = Yes|No ; | trick.malfunctions_trick_view_set_enabled(True|False) | START TRICK MTV AUTOMATICALLY |  |  |
sys.exec.in.output_dir_timestamped = Yes|No ; | trick.output_dir_timestamped_on() OR trick.output_dir_timestamped_off() | SAVE RUN DATA FILES IN SUBDIR DATA_<time> |  |  |
sys.exec.in.post_init_checkpoint = Yes|No ; | trick.checkpoint_post_init(True|False) | DUMP CHECKPOINT AFTER INITIALIZATION JOBS RUN |  |  |
sys.exec.in.pre_init_checkpoint = Yes|No ; | trick.checkpoint_pre_init(True|False) | DUMP CHECKPOINT BEFORE INITIALIZATION JOBS RUN |  |  |
sys.exec.in.reduced_checkpoint = Yes|No ; | trick.TMM_reduced_checkpoint(True|False) | ONLY DUMP NON-ZERO VALUES AT CHECKPOINT |  |  |
sys.exec.in.rt_clock = Gettimeofday|GMT|EXTERNAL ; | N/A : derive your class from Trick's Clock class (see GetTimeOfDayClock) | REALTIME CLOCK OPTION |  |  |
sys.exec.in.rt_clock_ratio = 1.0|<sec> ; | real_time.gtod_clock.rt_clock_ratio = 1.0|<sec> | SIMULATION EXECUTION SPEED WRT REALTIME |  |  |
sys.exec.in.rt_cpu_number[<id>] = 0|<n> ; sys.exec.in.rt_lock_to_cpu[<id>] = Yes|No ; | trick.exec_set_thread_cpu_affinity(<id>, <n>) | RUN PROCESS <id> ONLY ON CPU # <n> |  |  |
sys.exec.in.rt_enable_clock_reset = Yes|No ; | NOT IMPLEMENTED | AUTOMATICALLY ADJUST CLOCK WHEN ITIMERS USED (PRIOR TO LINUX 2.6) |  |  |
sys.exec.in.rt_exttimer = Yes|No ; | N/A : derive your class from Trick's Timer class (see ITimer) | ALLOW EXTERNAL TIMER INTERRUPTS TO CONTROL REALTIME |  |  |
sys.exec.in.rt_isolate_proc[<id>] = Yes|No ; | NOT IMPLEMENTED | ISOLATE PROCESS <id>'s CPU FROM OTHER INTERRUPTS/PROCESSES |  |  |
sys.exec.in.rt_itimer = Yes|No ; sys.exec.in.rt_itimer_pause = Yes|No ; | trick.itimer_enable() OR trick.itimer_disable() | TURN ITIMER ON AND USE PAUSE() |  |  |
sys.exec.in.rt_itimer_frame {s} = 1.0e37|<sec> ; | N/A : it is set to same as rt_software_frame | ITIMER FRAME: DELTA TIME BETWEEN ITIMER SIGNALS |  |  |
sys.exec.in.rt_lock_memory[<id>] = Yes|No ; | trick.exec_set_lock_memory(True|False) | LOCK PROCESS <id> IN MEMORY (NOTE NO <id> IN TRICK 10, ALL LOCKED) |  |  |
sys.exec.in.rt_max_overrun_cnt = 100000000|<n> ; | real_time.rt_sync.rt_max_overrun_cnt = 100000000|<n> | MAX CONSECTUTIVE OVERRUNS ALLOWED BEFORE SHUTDOWN |  |  |
sys.exec.in.rt_max_overrun_time = 1.0e37|<sec> ; | real_time.rt_sync.rt_max_overrun_time = 1.0e37|<sec> | MAX OVERRUN TIME PER ANY FRAME BEFORE SHUTDOWN |  |  |
sys.exec.in.rt_nap = Yes|No ; | trick.exec_set_rt_nap(True|False) | RELEASE PROCESSOR WHEN WAITING FOR REALTIME OR CHILDREN |  |  |
sys.exec.in.rt_overrun_freeze = Yes|No ; | real_time.rt_sync.rt_overrun_freeze = True|False | FREEZE INSTEAD OF SHUTDOWN WHEN MAX OVERRUN CNT/TIME |  |  |
sys.exec.in.rt_priority[<id>] = 20|<n> ; sys.exec.in.rt_nond_pri[<id>] = Yes|No ; | trick.exec_set_thread_priority(<id>, 0|<n>) | PROCESS <id>'s SYSTEM SCHEDULING (NON-DEGRADING) PRIORITY |  |  |
sys.exec.in.rt_semaphores[<id>] = Yes|No ; | IMPLEMENTED but not settable, all children default to True | USE PTHREAD MUTEXES WHEN CHILDREN ARE IDLE |  |  |
sys.exec.in.rt_software_frame = 1.0e37|<sec> ; | trick.real_time_enable() OR trick.real_time_disable() trick.exec_set_software_frame(1.0|<sec>) | TURN REALTIME ON/OFF & SET REALTIME FRAME |  |  |
| trick.exec_set_thread_process_type(<id>, trick.PROCESS_TYPE_SCHEDULED| trick.PROCESS_TYPE_ASYNC_CHILD| trick.PROCESS_TYPE_AMF_CHILD) | SCHEDULING TYPE FOR CHILD THREAD <id> |  |  |
| trick.exec_set_thread_amf_cycle_time(<id>, <sec>) | RATE AT WHICH TO SYNC AMF CHILD(REN) THREAD WITH MAIN THREAD |  |  |
sys.exec.in.safestore_checkpoint = Yes|No ; | trick.checkpoint_safestore_set_enabled(True|False) | DUMP CHECKPOINT PERIODICALLY |  |  |
sys.exec.in.safestore_period = <sec> ; | trick.checkpoint_safestore(<sec>) | THE PERIOD TO DUMP SAFESTORE CHECKPOINT |  |  |
sys.exec.in.shutdown_wait_async = Yes|No ; | trick.exec_set_thread_async_wait(<id>, True|False) | WAIT FOR CHILD (TRICK7: ALL, TRICK10: <id>) BEFORE SHUTDOWN JOBS RUN |  |  |
sys.exec.in.sim_name = "<my_sim_name>" ; | message.mpublisher.sim_name = "<my_sim_name>" | USER PROVIDED SIMULATION NAME TO DISPLAY IN MSGS (DEFAULT IS BLANK) |  |  |
sys.exec.in.stack_trace = Yes|No ; | trick.exec_set_stack_trace(True|False) | PRINT DEBUGGER STACK TRACE IF SEG FAULT |  |  |
sys.exec.in.stripchart_input_file = "<mystrip_filename>" ; | trick_vs.stripchart.set_input_file("<mystrip_filename>") | LAUNCH STRIPCHART WITH FILE SPECIFYING STRIPCHART VARIABLES |  |  |
sys.exec.in.stripchart_sample_rate = 0.1|<sec> ; | NOT IMPLEMENTED | RATE AT WHICH STRIPCHART VARIABLES ARE SAMPLED |  |  |
sys.exec.in.time_tic = 0.000000001|<sec> ; | trick.exec_set_time_tic_value(1000000|<val>) | SIMULATION TIME RESOLUTION (TRICK10: 1/<val> IS A TIC) |  |  |
sys.exec.in.trap_sigbus = Yes|No ; | trick.exec_set_trap_sigbus(True|False) | ENABLE TRAP OF SIGBUS SIGNAL & GRACEFUL SHUTDOWN |  |  |
sys.exec.in.trap_sigfpe = Yes|No ; | trick.exec_set_trap_sigfpe(True|False) | ENABLE TRAP OF SIGFPE SIGNAL & GRACEFUL SHUTDOWN |  |  |
sys.exec.in.trap_sigsegv = Yes|No ; | trick.exec_set_trap_sigsegv(True|False) | ENABLE TRAP OF SIGSEGV SIGNAL & GRACEFUL SHUTDOWN |  |  |
sys.exec.in.tv = Yes|No ; | trick.trick_view_set_enabled(True|False) | START TRICK TV AUTOMATICALLY |  |  |
sys.exec.in.tv_input_file = "<mytv_filename>" ; | trick.trick_view_add_auto_load_file("<mytv_filename>") | AUXILIARY INPUT FILE SPECIFYING TV VARIABLES |  |  |
SYS EXEC WORK TRICK 7 | TRICK 10 | DESCRIPTION |  |  |
sys.exec.work.event_malf_broadcast = Yes|No ; | trick.set_event_info_msg_on() OR trick.set_event_info_msg_off() | SAVE WHEN EVENT/MALF TRIGGERED TO SEND_HS FILE IN RUN DIR (TRICK10: MESSAGES ARE PUBLISHED SO THEY ARE SENT TO THE SCREEN IN ADDITION TO THE SEND_HS FILE) |  |  |
sys.exec.work.cmdline_name | trick.command_line_args_get_cmdline_name() | COMMAND LINE EXECUTABLE COMMAND USED TO INVOKE SIM |  |  |
sys.exec.work.default_dir | trick.command_line_args_get_default_dir() | CURRENT SIMULATION DIRECTORY NAME |  |  |
sys.exec.work.freeze_command = Yes|No ; | trick.exec_set_freeze_command(True|False) | START SIM IN FREEZE MODE |  |  |
sys.exec.work.include_dir | N/A : use Python sys.path for includes | COMMAND LINE ARGUMENT (-I) INCLUDE PATH NAME (TRICK7 ONLY) |  |  |
sys.exec.work.input_file | trick.command_line_args_get_input_file() | COMMAND LINE ARGUMENT RUN INPUT FILE NAME |  |  |
sys.exec.work.mode | trick.exec_get_mode() | CURRENT SIMULATION COMMAND MODE |  |  |
sys.exec.work.output_dir | GET: trick.command_line_args_get_output_dir() SET: trick.set_output_dir("RUN_<rundir>|<mydir>") | COMMAND LINE ARGUMENT (-O) OUTPUT DIRECTORY NAME WHERE SIM OUTPUT IS STORED |  |  |
sys.exec.work.run_dir | trick_cmd_args.cmd_args.run_dir | COMMAND LINE ARGUMENT RUN DIRECTORY NAME |  |  |
sys.exec.work.save_send_hs_buffer = Yes|No ; | trick.message_file_subscribe() OR trick.message_file_unsubscribe() | SAVE HEALTH & STATUS (H&S) MSGS TO SEND_HS FILE IN RUN DIR |  |  |
sys.exec.work.save_var_server_msgs = Yes|No ; | trick.set_var_server_info_msg_on() OR trick.set_var_server_info_msg_off() | SAVE VARIABLE SERVER MESSAGES TO SEND_HS FILE IN RUN DIR (TRICK10: MESSAGES ARE PUBLISHED SO THEY ARE SENT TO THE SCREEN IN ADDITION TO THE SEND_HS FILE) |  |  |
sys.exec.work.send_hs_buffer_size = 1000000|<n> ; | NOT IMPLEMENTED | BUFFER SIZE FOR SAVING H&S |  |  |
sys.exec.work.send_hs_buffering = DR_Buffer|DR_No_Buffer|DR_Ring_Buffer ; | NOT IMPLEMENTED | BUFFER METHOD FOR SAVING H&S (SAME AS DATA RECORDING) |  |  |
sys.exec.work.terminate_time | trick.exec_get_terminate_time() | SIMULATION TERMINATION TIME |  |  |
sys.exec.work.var_serve_listen_dev.port = 7000|<n> ; | <my_int> = trick.var_server_get_port() trick.var_server_set_port(<my_int>) default is random port set by system | PORT ON WHICH CLIENTS CONNECT TO THE VARIABLE SERVER |  |  |
sys.exec.work.verify_input = Yes|No ; | Use the -d command line option: S_main_<hostcpu>.exe <run_input_file> -d | ECHO INPUT FILE AS IT IS PARSED WITHOUT EXECUTING SIM |  |  |
sys.exec.work.xtra_derivative = Yes|No ; | <simobj>.<myinteg>.set_last_step_deriv(True|False) | FORCE DERIVATIVE JOBS TO RUN AFTER LAST PASS OF INTEGRATION JOBS |  |  |
SYS EXEC MISCELLANEOUS TRICK 7 | TRICK 10 | DESCRIPTION |  |  |
sys.exec.ip.echo_input = Yes|No ; | NOT IMPLEMENTED | ECHO INPUT FILE AS IT IS PARSED |  |  |
sys.exec.ip.print_deprecated = Yes|No ; | NOT IMPLEMENTED | DISPLAY WARNING WHEN DEPRECATED VARIABLE USED |  |  |
sys.exec.out.time | trick.exec_get_sim_time() | CURRENT SIMULATION TIME |  |  |
sys.exec.sim_com.monitor_on = Yes|No ; | trick.sim_control_panel_set_enabled(True|False) | TURN SIM CONTROL PANEL ON |  |  |
SYS EXEC DATA RECORDING TRICK 7 | TRICK 10 | DESCRIPTION |  |  |
sys.exec.in.synchronous_dr_writer = Yes|No ; | NOT IMPLEMENTED; DR_Buffer groups are written asynchronously | MAKE THE DATA RECORDING WRITER FUNCTION SYNCHRONOUS |  |  |
sys.exec.in.user_dr_writer = Yes|No ; | N/A : derive your class from Trick's DataRecordBuffering class (see DataRecordThreaded) | CALL USER PROVIDED DATA RECORDING WRITER FUNCTION INSTEAD OF TRICK'S |  |  |
sys.exec.record.directory = "RUN_<rundir>|<mydir>" ; | trick.set_output_dir("RUN_<rundir>|<mydir>") | DIRECTORY WHERE RECORDING DATA FILES ARE SAVED |  |  |
sys.exec.record.group[<id>].ascii_label[<n>] = "<mylabel>" ; | NOT IMPLEMENTED | CHANGED VARIABLE'S DISPLAYED NAME (DR_ASCII) |  |  |
sys.exec.record.group[<id>].buffering = DR_Buffer|DR_No_Buffer|DR_Ring_Buffer ; | trick.add_data_record_group(<groupobj>, trick.DR_Buffer|trick.DR_No_Buffer|trick.DR_Ring_Buffer) | BUFFER METHOD FOR RECORDING DATA |  |  |
sys.exec.record.group[<id>].change_ref[<n>] = "<varname>" ; | <groupobj>.add_change_variable("<varname>") | TRICK VARIABLE NAMES TO TRIGGER RECORDING (DR_CHANGES) |  |  |
sys.exec.record.group[<id>].cycle = 1.0|<sec> ; | <groupobj>.set_cycle(0.1|<sec) | RATE AT WHICH DATA IS RECORDED FOR THIS GROUP |  |  |
sys.exec.record.group[<id>].freq = DR_Always|DR_Changes|DR_Changes_Step ; | <groupobj>.set_freq( trick.DR_Always|trick.DR_Changes|trick.DR_Changes_Step) | SPECIFY WHEN DATA IS RECORDED |  |  |
sys.exec.record.group[<id>].max_buffer_size = 1000000|<n> ; | <groupobj>.set_max_buffer_size(100000|<n>) | BUFFER SIZE FOR RECORDING GROUP DATA |  |  |
sys.exec.record.group[<id>].name = "<mygroupname>" ; sys.exec.record.group[<id>].format = DR_Binary|DR_Ascii|Dr_Fixed_Ascii ; | <groupobj> = trick.DRBinary("<mygroupname>") OR <groupobj> = trick.DRAscii("<mygroupname>") OR <groupobj> = trick.DRHDF5("<mygroupname>") | SPECIFY UNIQUE NAME FOR GROUP OUTPUT FILE SPECIFY RECORDING OUTPUT FORMAT |  |  |
sys.exec.record.group[<id>].record = Yes|No ; | <groupobj>.enable() OR <groupobj>.disable() | ENABLE RECORDING OF DATA |  |  |
sys.exec.record.group[<id>].ref[<n>] = "<varname>" ; | <groupobj>.add_variable("<varname>") | TRICK VARIABLE NAMES TO RECORD |  |  |
sys.exec.record.group[<id>].single_prec_only = Yes|No ; | <groupobj>.set_single_prec_only(True|False) | RECORD ALL DOUBLES AS FLOATS |  |  |
sys.exec.record.group[<id>].start = 0.0|<sec>; | NOT IMPLEMENTED; use enable/disable with read | SIM TIME TO START RECORDING |  |  |
sys.exec.record.group[<id>].struct_extract_bits = Yes|No ; | NOT IMPLEMENTED | EXTRACT BIT FIELDS WHEN RECORDING AN ENTIRE STRUCTURE |  |  |
sys.exec.record.group[<id>].user_alloc = Yes|No ; | NOT IMPLEMENTED this may work in Trick10 so not needed? | SET UP RECORDING AFTER INIT JOBS (FOR USER ALLOCED VARIABLE) |  |  |
sys.exec.record.num_groups = "16|<n>" ; | N/A : groups are instantiated as needed | NUMBER OF RECORDING GROUPS (16 ALLOCATED BY TRICK) |  |  |
sys.exec.record.terminate_on_bad_ref = Yes|No ; | NOT IMPLEMENTED | TERMINATE SIM WHEN RECORDING VARIABLE CANNOT BE FOUND |  |  |
| <groupobj>.set_job_class("data_record|<jobclass>") | JOB CLASS OF THE DATA RECORDING JOB FOR THIS GROUP |  |  |
SYS EXEC MASTER / SLAVE TRICK 7 | TRICK 10 | DESCRIPTION |  |  |
sys.exec.in.activate_slave[<n>] = Yes|No ; | <new_slave> = trick.SlaveInfo() master_slave.master.add_slave(<new_slave>) | ACTIVATE SLAVE # <n> (TRICK10: CREATE SLAVE OBJECT AND ACTIVATE) |  |  |
sys.exec.in.ms_sync = No_sync|Master_sync|Slave_sync ; | trick.ms_master_enable() OR trick.ms_master_disable() (sync types are N/A because the master / slave code is separate) | RUN MASTER SIM ONLY (DEFAULT), OR RUN & SYNC WITH SLAVES |  |  |
sys.exec.in.remote_shell = TRICK_SSH|TRICK_RSH|TRICK_USER_REMOTE_SH | <new_slave>.remote_shell = trick.TRICK_SSH|trick.TRICK_RSH| trick.TRICK_USER_REMOTE_SH | TYPE OF SHELL TO BRING UP SLAVE(S) WITH; THE COMMAND STRING = <remote_shell> <remote_shell_args> <machine_name> setenv DISPLAY <display_name>; cd <sim_path>; <S_main_name> <run_input_file> <connection args> -u <other_args> & |  |  |
sys.exec.in.remote_shell_args = "<args>" ; | <new_slave>.remote_shell_args = "<args>" | OPTIONAL ARGUMENTS TO USE WITH remote_shell CMD |  |  |
sys.exec.in.rt_sync_frame = 1.0e37|<sec> ; | NOT IMPLEMENTED; sync every frame (according to master) | MASTER/SLAVE SYNC FRAME |  |  |
sys.exec.in.slave_cnt = <num> ; | N/A do not set because slaves instantiated as needed, but can get : <my_int> = master_slave.master.num_slaves | NUMBER OF SLAVES DEFINED FOR A MASTER/SLAVE SIM |  |  |
sys.exec.in.slaves[<n>].machine_display = $DISPLAY|"<display>" ; | <new_slave>.machine_display = $DISPLAY|"<display>" | SLAVE'S X DISPLAY NAME |  |  |
sys.exec.in.slaves[<n>].machine_name = gethostname()|"<name>" ; | <new_slave>.machine_name = "localhost|<name>" | SLAVE'S REMOTE CONNECTION HOSTNAME |  |  |
<my_int> = sys.exec.in.slaves[<n>].overruns ; | NOT IMPLEMENTED | SLAVE'S NUMBER OF OVERRUNS THAT HAVE OCCURRED |  |  |
sys.exec.in.slaves[<n>].S_main_args[25] = "<rundir>/<inputfile> <args>" ; | <new_slave>.run_input_file = "<rundir>/<inputfile>" <new_slave>.other_args = "<args>" | SLAVE'S REMOTE EXECUTABLE RUN INPUT FILE AND CMD LINE -u ARGUMENTS |  |  |
sys.exec.in.slaves[<n>].S_main_name = "./S_main_${TRICK_HOST_CPU}.exe|<name>" ; | <new_slave>.S_main_name = "./S_main_${TRICK_HOST_CPU}.exe|<name>" | SLAVE'S REMOTE EXECUTABLE NAME |  |  |
sys.exec.in.slaves[<n>].sim_path = "<dir>" ; | <new_slave>.sim_path = "<dir>" | SLAVE'S REMOTE EXECUTABLE DIRECTORY PATH |  |  |
sys.exec.in.sync_error_terminate = Yes|No ; | <new_slave>.sync_error_terminate = False|True | MASTER/SLAVE SIM WILL TERMINATE ON SYNC ERROR |  |  |
sys.exec.in.sync_wait_limit = 1.0e37|<sec> ; | <new_slave>.sync_wait_limit = 0.0|<sec> | MAXIMUM TIME MASTER/SLAVE CONNECTION WILL WAIT FOR SYNC SIGNAL |  |  |
sys.exec.in.user_remote_shell = "<shell_cmd>" ; | <new_slave>.remote_shell = "<shell_cmd>" | USER DEFINED REMOTE SHELL CMD WHEN remote_shell IS TRICK_USER_REMOTE_SH |  |  |
SYS EXEC MONTE CARLO TRICK 7 | TRICK 10 | DESCRIPTION |  |  |
sys.exec.monte.in.activate = Yes|No ; | trick.mc_set_enabled(True|False) | ACTIVATE MONTE CARLO |  |  |
sys.exec.monte.in.dryrun = Yes|No ; | trick.mc_set_dry_run(True|False) | GENERATE monte_runs FILE CONTAINING RUNS THAT WOULD OCCUR WITHOUT ACTUALLY RUNNING |  |  |
sys.exec.monte.in.input_files[<n>] = "<monte_input_file>" ; | N/A monte input data set up using input file commands (see section 7.6) | AUXILIARY INPUT FILE(S) SPECIFYING MONTE INPUT DATA |  |  |
sys.exec.monte.in.localhost_as_remote = Yes|No ; | trick.mc_set_localhost_as_remote(True|False) | IF LOCALHOST SPECIFIED AS A SLAVE, USE REMOTE SHELL INSTEAD OF LOCAL SHELL |  |  |
sys.exec.monte.in.max_tries = 3|<n> ; | trick.mc_set_max_tries(2|<n>) | NUMBER OF TIMES TO TRY DISPATCHING SLAVE BEFORE GIVING UP |  |  |
sys.exec.monte.in.sequential_runs = Yes|No ; | N/A the Trick 10 implementation works implilcitly without this option | DISPATCH SLAVES SEQUENTIALLY (NEEDED WHEN OPTIMIZING WITH CALC VARIABLES) |  |  |
sys.exec.monte.in.slaves = alloc(<number of slaves>) ; | <new_slave> = trick.MonteSlave("<machine_name>") trick_sys.sched.add_slave(<new_slave>) | CREATE SLAVE(S) TO PERFORM RUNS |  |  |
sys.exec.monte.in.slaves[<n>].disable = Yes|No ; | trick_sys.sched.disable_slave("<machine_name>", True|False) | DO NOT USE THIS SLAVE |  |  |
sys.exec.monte.in.slaves[<n>].machine_name | <new_slave>.machine_name | SAME AS IN MASTER/SLAVE - SEE ABOVE |  |  |
sys.exec.monte.in.slaves[<n>].multiplier = 1|<n> ; | <new_slave>.multiplier = 1|<n> | CONSIDER SLAVE TO BE TIMED OUT multiplier TIMES FASTER THAN timeout VALUE |  |  |
sys.exec.monte.in.slaves[<n>].remote_shell | <new_slave>.remote_shell | SAME AS IN MASTER/SLAVE - SEE ABOVE; THE COMMAND STRING = <remote_shell> <remote_shell_args> <machine_name> <user_cmd_string>; cd <sim_path>; <S_main_name> <run_input_file> <misc monte args> -O & |  |  |
sys.exec.monte.in.slaves[<n>].remote_shell_args | <new_slave>.remote_shell_args | SAME AS IN MASTER/SLAVE - SEE ABOVE |  |  |
sys.exec.monte.in.slaves[<n>].S_main_name | <new_slave>.S_main_name | SAME AS IN MASTER/SLAVE - SEE ABOVE |  |  |
sys.exec.monte.in.slaves[<n>].sim_path | <new_slave>.sim_path | SAME AS IN MASTER/SLAVE - SEE ABOVE |  |  |
sys.exec.monte.in.slaves[<n>].user_remote_shell | <new_slave>.user_remote_shell | SAME AS IN MASTER/SLAVE - SEE ABOVE |  |  |
sys.exec.monte.in.timeout = 120.0|<sec> ; | trick.mc_set_timeout(120.0|<sec>) | TIME GIVEN TO DISPATCH & RECEIVE RESULTS FROM EACH SLAVE |  |  |
sys.exec.monte.in.user_cmd_string = "<args>" ; | trick.mc_set_user_cmd_string("<args>") | OPTIONAL ARGUMENTS APPENDED TO END OF remote_shell CMD |  |  |
| TRICK 10 SWIG NOTES |  |  |  |
| Certain advanced features of C++ such as nested classes are not yet supported. |  |  |  |
| Swig cannot provide access to C++ private/protected data. You can get around this if you need to assign private/protected data by using Trick's checkpoint reader: trick.read_checkpoint_from_string("<private_var> = <val>;") |  |  |  |