objdictgen/nodemanager.py
changeset 338 9ba9f4f7d080
parent 333 7e553315ef46
child 418 64a8c24b61a5
equal deleted inserted replaced
337:9aab477d8a8a 338:9ba9f4f7d080
  1086             return None
  1086             return None
  1087 
  1087 
  1088     def AddToDCF(self, node_id, index, subindex, size, value):
  1088     def AddToDCF(self, node_id, index, subindex, size, value):
  1089         if self.CurrentNode.IsEntry(0x1F22, node_id):
  1089         if self.CurrentNode.IsEntry(0x1F22, node_id):
  1090             dcf_value = self.CurrentNode.GetEntry(0x1F22, node_id)
  1090             dcf_value = self.CurrentNode.GetEntry(0x1F22, node_id)
  1091             nbparams = BE_to_LE(dcf_value[:4])
  1091             if dcf_value != "":
       
  1092                 nbparams = BE_to_LE(dcf_value[:4])
       
  1093             else:
       
  1094                 nbparams = 0
  1092             new_value = LE_to_BE(nbparams + 1, 4) + dcf_value[4:]
  1095             new_value = LE_to_BE(nbparams + 1, 4) + dcf_value[4:]
  1093             new_value += LE_to_BE(index, 2) + LE_to_BE(subindex, 1) + LE_to_BE(size, 4) + LE_to_BE(value, size)
  1096             new_value += LE_to_BE(index, 2) + LE_to_BE(subindex, 1) + LE_to_BE(size, 4) + LE_to_BE(value, size)
  1094             self.CurrentNode.SetEntry(0x1F22, node_id, new_value)
  1097             self.CurrentNode.SetEntry(0x1F22, node_id, new_value)
  1095 
  1098 
  1096 #-------------------------------------------------------------------------------
  1099 #-------------------------------------------------------------------------------