summaryrefslogtreecommitdiff
path: root/cesar/test_general/station/compliance-eoc/py/trace.py
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/test_general/station/compliance-eoc/py/trace.py')
-rw-r--r--cesar/test_general/station/compliance-eoc/py/trace.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/cesar/test_general/station/compliance-eoc/py/trace.py b/cesar/test_general/station/compliance-eoc/py/trace.py
new file mode 100644
index 0000000000..bf962efaf1
--- /dev/null
+++ b/cesar/test_general/station/compliance-eoc/py/trace.py
@@ -0,0 +1,29 @@
+import sys
+sys.path.append('../../../maximus/python/obj');
+sys.path.append ('../../../maximus/python/lib/proto')
+
+from maximus_proto import MaximusProto
+from optparse import OptionParser
+
+parser = OptionParser()
+parser.add_option ("-m", "--mac", dest="mac", help="Board mac address")
+parser.add_option ("-n", "--net", dest="net", help="Network interface")
+parser.add_option ("-a", "--aface", dest="aface",
+ help="Hardware address of the Ethernet interface used to send \
+ packets to boards")
+
+(options, args) = parser.parse_args()
+assert options.net
+assert options.mac
+assert options.aface
+
+maximus = MaximusProto ()
+maximus.init (sys.argv + ['-n', options.net, '-a', options.aface])
+
+sta = maximus.create_sta (options.mac)
+sta.set_name ('Sta')
+
+# Sends a fcall to uninit the station.
+fcall = maximus.create_fcall ("fc_sta_trace_dump_all")
+fcall.set_sta (sta)
+fcall.send()