__init__(self,
block_name,
request,
length=4,
endian='<',
format='binary',
inclusive=False,
signed=False,
math=None,
fuzzable=False,
name=None)
(Constructor)
Create a sizer block bound to the block with the specified name. You
*can not* create a sizer for any currently open blocks.
-
- Parameters:
block_name -
Name of block to apply sizer to
(type=String)
request -
Request this block belongs to
(type=s_request)
length -
(Optional, def=4) Length of sizer
(type=Integer)
endian -
(Optional, def=LITTLE_ENDIAN) Endianess of the bit field
(LITTLE_ENDIAN: <, BIG_ENDIAN: >)
(type=Character)
format -
(Optional, def=binary) Output format, "binary" or
"ascii"
(type=String)
inclusive -
(Optional, def=False) Should the sizer count its own
length?
(type=Boolean)
signed -
(Optional, def=False) Make size signed vs. unsigned
(applicable only with format="ascii")
(type=Boolean)
math -
(Optional, def=None) Apply the mathematical operations defined
in this function to the size
(type=Function)
fuzzable -
(Optional, def=False) Enable/disable fuzzing of this sizer
(type=Boolean)
name -
Name of this sizer field
(type=String)
|