Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions atf_core/src/atf_core/recorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,13 @@ def start_recording(self, testblock_name):
#print ">>> start recording for %s, active_topics="%testblock_name, self.active_topics
self.lock.release()

# Send message to all recorder plugins
# Send start message to all recorder plugins
#print "self.recorder_plugin_list=", self.recorder_plugin_list
for recorder_plugin in self.recorder_plugin_list:
# filter the recorder plugins not needed for current trigger/testblock
if recorder_plugin.name in list(self.test.testblockset_config[testblock_name].keys()):
#rospy.loginfo("recorder plugin callback for testblock: '%s'", testblock_name)
recorder_plugin.trigger_callback(testblock_name)
recorder_plugin.trigger_start_callback(testblock_name)

def stop_recording(self, testblock_name):
self.lock.acquire()
Expand All @@ -271,6 +271,14 @@ def stop_recording(self, testblock_name):
if len(self.active_topics[topic]) == 0:
self.active_topics.pop(topic)

# Send stop message to all recorder plugins
#print "self.recorder_plugin_list=", self.recorder_plugin_list
for recorder_plugin in self.recorder_plugin_list:
# filter the recorder plugins not needed for current trigger/testblock
if recorder_plugin.name in list(self.test.testblockset_config[testblock_name].keys()):
#rospy.loginfo("recorder plugin callback for testblock: '%s'", testblock_name)
recorder_plugin.trigger_stop_callback(testblock_name)

#print "<<< stop recording for %s, active_topics="%testblock_name, self.active_topics
self.lock.release()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ def __init__(self, write_lock, bag_file_writer):
self.name = "interface"
self.bag_file_writer = bag_file_writer

def trigger_callback(self, testblock_name):
def trigger_start_callback(self, testblock_name):
return None

def trigger_stop_callback(self, testblock_name):
#print "RecordInterface testblock_name=", testblock_name

publishers = {}
Expand Down