Example #1
0
 def __init__(self, mode='be'):
     '''
     :type mode: str
     :param mode: mode of binary encoding. 'le' for little endian, 'be' for big endian, '' for non-byte aligned
     '''
     kassert.is_in(mode, ['be', 'le'])
     super(BitFieldMultiByteEncoder, self).__init__()
     self._mode = mode
Example #2
0
 def __init__(self, mode='be'):
     '''
     :type mode: str
     :param mode: mode of binary encoding. 'le' for little endian, 'be' for big endian, '' for non-byte aligned
     '''
     kassert.is_in(mode, ['be', 'le'])
     super(BitFieldMultiByteEncoder, self).__init__()
     self._mode = mode
Example #3
0
 def __init__(self, fmt):
     '''
     :param fmt: format for encoding (from BitFieldAsciiEncoder.formats)
     '''
     kassert.is_in(fmt, BitFieldAsciiEncoder.formats)
     self._fmt = fmt
Example #4
0
 def __init__(self, fmt):
     '''
     :param fmt: format for encoding (from BitFieldAsciiEncoder.formats)
     '''
     kassert.is_in(fmt, BitFieldAsciiEncoder.formats)
     self._fmt = fmt