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