trick/trick_sims/SIM_test_dp/Modified_data/group1.dr
Alex Lin 14a75508a3 Cleaning up once include variables and copyright cleanup.
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.
2015-03-23 16:03:14 -05:00

66 lines
2.9 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 = "group1"
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.1)
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][1].s1[1][1].si[0]")
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][1].s1[1][1].si[1]")
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][1].s1[1][1].si[2]")
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][1].s1[1][1].i[0]")
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][1].s1[1][1].i[1]")
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][1].s1[1][1].i[2]")
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][1].s1[1][1].l[0]")
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][1].s1[1][1].l[1]")
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][1].s1[1][1].l[2]")
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][1].s1[1][1].f[0]")
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][1].s1[1][1].f[1]")
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][1].s1[1][1].f[2]")
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][1].s1[1][1].d[0]")
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][1].s1[1][1].d[1]")
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][1].s1[1][1].d[2]")
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][1].s1[1][1].us[0]")
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][1].s1[1][1].us[1]")
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][1].s1[1][1].us[2]")
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][1].s1[1][1].ui[0]")
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][1].s1[1][1].ui[1]")
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][1].s1[1][1].ui[2]")
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][1].s1[1][1].ul[0]")
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][1].s1[1][1].ul[1]")
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][1].s1[1][1].ul[2]")
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][1].s1[1][1].ll[0]")
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][1].s1[1][1].ll[1]")
drg[DR_GROUP_ID].add_variable("dpx.test.s3[1].s2[1][1].s1[1][1].ll[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()