Adapted to new entry syntax.
authorFlorian Pose <fp@igh-essen.com>
Mon, 02 Jun 2008 13:55:46 +0000
changeset 937 e2ee1bed5bd6
parent 936 30fddfce8db6
child 938 5b936e8e39fa
Adapted to new entry syntax.
script/slaveinfo2xml.py
--- a/script/slaveinfo2xml.py	Mon Jun 02 11:08:49 2008 +0000
+++ b/script/slaveinfo2xml.py	Mon Jun 02 13:55:46 2008 +0000
@@ -112,7 +112,7 @@
         reRevision = re.compile('Revision number:.*\((\d+)\)')
         rePdo = re.compile('([RT])xPdo\s+0x([0-9A-F]+)')
         rePdoEntry = \
-            re.compile('0x([0-9A-F]+):([0-9A-F]+) +"([^"]*)", (\d+) bit')
+            re.compile('0x([0-9A-F]+):([0-9A-F]+),\s+(\d+) bit,\s+"([^"]*)"')
         pdo = None
         f = open(fileName, 'r')
         while True:
@@ -139,8 +139,8 @@
             match = rePdoEntry.search(line)
             if match:
                 pdoEntry = PdoEntry(int(match.group(1), 16), \
-                    int(match.group(2), 16), match.group(3), \
-                    int(match.group(4)))
+                    int(match.group(2), 16), match.group(4), \
+                    int(match.group(3)))
                 pdo.appendEntry(pdoEntry)
 
         f.close()