Adding support for octet string
authorlaurent
Mon, 27 Jul 2009 16:32:05 +0200
changeset 581 dc35cf4ed127
parent 580 2ae92a99ac10
child 582 e297491483ea
Adding support for octet string
objdictgen/gen_cfile.py
--- a/objdictgen/gen_cfile.py	Mon Jul 27 16:29:59 2009 +0200
+++ b/objdictgen/gen_cfile.py	Mon Jul 27 16:32:05 2009 +0200
@@ -59,7 +59,7 @@
                 typeinfos = ("INTEGER%s"%values[1], None, "int%s"%values[1], False)
             elif values[0] == "REAL" and int(values[1]) in (32, 64):
                 typeinfos = ("%s%s"%(values[0], values[1]), None, "real%s"%values[1], False)
-            elif values[0] == "VISIBLE_STRING":
+            elif values[0] in ["VISIBLE_STRING", "OCTET_STRING"]:
                 size = default_string_size
                 for item in items:
                     size = max(size, len(item))