mirror of
https://github.com/nasa/trick.git
synced 2024-12-25 15:51:05 +00:00
14a75508a3
Changed all header file once include variables to follow the same naming convention and not start with any underscores. Also deleted old incorrect copyright notices. Also removed $Id: tags from all files. Fixes #14. Fixes #22.
110 lines
6.2 KiB
Plaintext
110 lines
6.2 KiB
Plaintext
|
|
''' 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()
|
|
|
|
|
|
"""
|
|
Default Data Recording Template.
|
|
"""
|
|
def add_dr_group():
|
|
global DR_GROUP_ID
|
|
global drg
|
|
group_name = "group4"
|
|
drg.append( trick.DRBinary(group_name) )
|
|
drg[DR_GROUP_ID].set_freq(trick.sim_services.DR_Always)
|
|
drg[DR_GROUP_ID].enable()
|
|
drg[DR_GROUP_ID].set_cycle(0.4)
|
|
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[0][0].s1[0][0].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[0][0].s1[0][0].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[1][0].s1[0][0].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][0].s1[0][0].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[2][0].s1[0][0].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[2][0].s1[0][0].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[0][1].s1[0][0].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[0][1].s1[0][0].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[1][1].s1[0][0].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][1].s1[0][0].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[2][1].s1[0][0].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[2][1].s1[0][0].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[0][0].s1[1][0].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[0][0].s1[1][0].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[1][0].s1[1][0].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][0].s1[1][0].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[2][0].s1[1][0].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[2][0].s1[1][0].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[0][1].s1[1][0].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[0][1].s1[1][0].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[1][1].s1[1][0].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][1].s1[1][0].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[2][1].s1[1][0].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[2][1].s1[1][0].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[0][0].s1[0][1].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[0][0].s1[0][1].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[1][0].s1[0][1].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][0].s1[0][1].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[2][0].s1[0][1].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[2][0].s1[0][1].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[0][1].s1[0][1].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[0][1].s1[0][1].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[1][1].s1[0][1].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][1].s1[0][1].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[2][1].s1[0][1].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[2][1].s1[0][1].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[0][0].s1[1][1].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[0][0].s1[1][1].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[1][0].s1[1][1].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][0].s1[1][1].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[2][0].s1[1][1].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[2][0].s1[1][1].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[0][1].s1[1][1].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[0][1].s1[1][1].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[1][1].s1[1][1].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[2][1].s1[1][1].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[2][1].s1[1][1].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[0][0].s1[0][2].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[0][0].s1[0][2].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[1][0].s1[0][2].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][0].s1[0][2].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[2][0].s1[0][2].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[2][0].s1[0][2].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[0][1].s1[0][2].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[0][1].s1[0][2].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[1][1].s1[0][2].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][1].s1[0][2].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[2][1].s1[0][2].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[2][1].s1[0][2].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[0][0].s1[1][2].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[0][0].s1[1][2].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[1][0].s1[1][2].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][0].s1[1][2].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[2][0].s1[1][2].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[2][0].s1[1][2].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[0][1].s1[1][2].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[0][1].s1[1][2].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[1][1].s1[1][2].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][1].s1[1][2].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[0].s2[2][1].s1[1][2].d[2]" )
|
|
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[2][1].s1[1][2].d[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()
|