def _updateBitString(self):
#Set the PackString Format
self._packStringFormat = 'uint:8, uint:3, uint:3, uint:%s, uint:%s, uint:58' % (self.getField("CompanyPrefix").getBitLength(),self.getField("DocumentType").getBitLength())
#Pack the bitstring
bsp= bitstring.pack(self._packStringFormat,
self.getFieldValue("Header"),
self.getFieldValue("Filter"),
self.getFieldValue("Partition"),
self.getFieldValue("CompanyPrefix"),
self.getFieldValue("DocumentType"),
self.getFieldValue("Serial"))
#Set the _bits for the GDTI-113
self._bits = bsp.unpack("bin")[0][2:]
评论列表
文章目录