canfestival/canfestival.py
changeset 1782 5b6ad7a7fd9d
parent 1773 38fde37c3766
child 1783 3311eea28d56
equal deleted inserted replaced
1781:b112bfdde5cc 1782:5b6ad7a7fd9d
    54 setParanoia(0)
    54 setParanoia(0)
    55 
    55 
    56 from util.TranslationCatalogs import AddCatalog
    56 from util.TranslationCatalogs import AddCatalog
    57 AddCatalog(os.path.join(CanFestivalPath, "objdictgen", "locale"))
    57 AddCatalog(os.path.join(CanFestivalPath, "objdictgen", "locale"))
    58 
    58 
    59 #--------------------------------------------------
    59 # --------------------------------------------------
    60 #              Location Tree Helper
    60 #              Location Tree Helper
    61 #--------------------------------------------------
    61 # --------------------------------------------------
    62 
    62 
    63 
    63 
    64 def GetSlaveLocationTree(slave_node, current_location, name):
    64 def GetSlaveLocationTree(slave_node, current_location, name):
    65     entries = []
    65     entries = []
    66     for index, subindex, size, entry_name in slave_node.GetMapVariableList():
    66     for index, subindex, size, entry_name in slave_node.GetMapVariableList():
    80     return {"name": name,
    80     return {"name": name,
    81             "type": LOCATION_CONFNODE,
    81             "type": LOCATION_CONFNODE,
    82             "location": ".".join([str(i) for i in current_location]) + ".x",
    82             "location": ".".join([str(i) for i in current_location]) + ".x",
    83             "children": entries}
    83             "children": entries}
    84 
    84 
    85 #--------------------------------------------------
    85 # --------------------------------------------------
    86 #                    SLAVE
    86 #                    SLAVE
    87 #--------------------------------------------------
    87 # --------------------------------------------------
    88 
    88 
    89 
    89 
    90 class _SlaveCTN(NodeManager):
    90 class _SlaveCTN(NodeManager):
    91     XSD = """<?xml version="1.0" encoding="ISO-8859-1" ?>
    91     XSD = """<?xml version="1.0" encoding="ISO-8859-1" ?>
    92     <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    92     <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   243         self.LoadCurrentNext()
   243         self.LoadCurrentNext()
   244 
   244 
   245     def GetBufferState(self):
   245     def GetBufferState(self):
   246         return self.GetCurrentBufferState()
   246         return self.GetCurrentBufferState()
   247 
   247 
   248 #--------------------------------------------------
   248 # --------------------------------------------------
   249 #                    MASTER
   249 #                    MASTER
   250 #--------------------------------------------------
   250 # --------------------------------------------------
   251 
   251 
   252 
   252 
   253 class MiniNodeManager(NodeManager):
   253 class MiniNodeManager(NodeManager):
   254 
   254 
   255     def __init__(self, parent, filepath, fullname):
   255     def __init__(self, parent, filepath, fullname):