mirror of
https://port.numenaute.org/aleajactaest/clientbot.git
synced 2024-11-25 16:46:31 +00:00
update databasexml change format message send in yaml output
This commit is contained in:
parent
7501c7fca1
commit
eda02f65b4
1 changed files with 9 additions and 7 deletions
|
@ -146,16 +146,16 @@ class LeafDatabase():
|
||||||
if self.type[0] == 'I': # Unsigned
|
if self.type[0] == 'I': # Unsigned
|
||||||
logging.getLogger(LOGGER).debug("Read:" + str (self.type))
|
logging.getLogger(LOGGER).debug("Read:" + str (self.type))
|
||||||
value = int(self.type[1:])
|
value = int(self.type[1:])
|
||||||
_ = msgin.readSerialUint64(value, name=tmp, typeName=self.type)
|
_ = msgin.readSerialUint64(value, name=tmp, typeName="Uint" + str(value))
|
||||||
elif self.type[0] == 'S': # Signed
|
elif self.type[0] == 'S': # Signed
|
||||||
logging.getLogger(LOGGER).debug("Read:" + str (self.type))
|
logging.getLogger(LOGGER).debug("Read:" + str (self.type))
|
||||||
value = int(self.type[1:])
|
value = int(self.type[1:])
|
||||||
# _ = msgin.readNbChar(value, name='DatabaseXML' + tmp)
|
# _ = msgin.readNbChar(value, name='DatabaseXML' + tmp)
|
||||||
_ = msgin.readSerialUint64(value, name=tmp)
|
_ = msgin.readSerialUint64(value, name=tmp, typeName="Sint" + str(value))
|
||||||
elif self.type == 'TEXT':
|
elif self.type == 'TEXT':
|
||||||
logging.getLogger(LOGGER).debug("type:" + str (self.type))
|
logging.getLogger(LOGGER).debug("type:" + str (self.type))
|
||||||
value = 32
|
value = 32
|
||||||
_ = msgin.readSerialSint64(value, name=idname)
|
_ = msgin.readSerialSint64(value, name=idname, typeName="Uint32/TEXT")
|
||||||
else:
|
else:
|
||||||
logging.getLogger(LOGGER).error("Type inconnu:" + str (self.type))
|
logging.getLogger(LOGGER).error("Type inconnu:" + str (self.type))
|
||||||
raise "type not managed"
|
raise "type not managed"
|
||||||
|
@ -183,16 +183,18 @@ class LeafDatabase():
|
||||||
if value > 64:
|
if value > 64:
|
||||||
raise "type not managed"
|
raise "type not managed"
|
||||||
logging.getLogger(LOGGER).debug('value:' + str(value))
|
logging.getLogger(LOGGER).debug('value:' + str(value))
|
||||||
_ = msgin.readSerialUint64(value, name=idname, typeName=self.type)
|
_ = msgin.readSerialUint64(value, name=idname, typeName="Uint" + str(value))
|
||||||
return level+1
|
return level+1
|
||||||
elif self.type[0] == 'S':
|
elif self.type[0] == 'S':
|
||||||
logging.getLogger(LOGGER).debug("type:" + str (self.type))
|
logging.getLogger(LOGGER).debug("type:" + str (self.type))
|
||||||
value = int(self.type[1:])
|
value = int(self.type[1:])
|
||||||
_ = msgin.readSerialSint64(value, name=idname)
|
_ = msgin.readSerialSint64(value, name=idname, typeName="Sint" + str(value))
|
||||||
|
return level+1
|
||||||
elif self.type == 'TEXT':
|
elif self.type == 'TEXT':
|
||||||
logging.getLogger(LOGGER).debug("type:" + str (self.type))
|
logging.getLogger(LOGGER).debug("type:" + str (self.type))
|
||||||
value = 32
|
value = 32
|
||||||
_ = msgin.readSerialUint64(value, name=idname)
|
_ = msgin.readSerialUint64(value, name=idname, typeName="Uint32/TEXT")
|
||||||
|
return level+1
|
||||||
else:
|
else:
|
||||||
logging.getLogger(LOGGER).debug("Type inconnu:", self.type)
|
logging.getLogger(LOGGER).debug("Type inconnu:", self.type)
|
||||||
raise "type not managed"
|
raise "type not managed"
|
||||||
|
@ -402,7 +404,7 @@ class BranchDatabase():
|
||||||
idname = parent + self.name +'/'
|
idname = parent + self.name +'/'
|
||||||
else:
|
else:
|
||||||
idname = parent
|
idname = parent
|
||||||
cBitSet = msgin.readCBitSet(nbchild, idname + ":Param", typeName = 'I' + str(nbchild))
|
cBitSet = msgin.readCBitSet(nbchild, idname + ":Param", typeName = 'Uint' + str(nbchild))
|
||||||
#cBitSet = CBitSet.CBitSet()
|
#cBitSet = CBitSet.CBitSet()
|
||||||
#cBitSet.readSerialExtra(msgin, nbchild, self.name + "/Param")
|
#cBitSet.readSerialExtra(msgin, nbchild, self.name + "/Param")
|
||||||
logging.getLogger(LOGGER).debug(msgin.showAllData())
|
logging.getLogger(LOGGER).debug(msgin.showAllData())
|
||||||
|
|
Loading…
Reference in a new issue