Ejemplo n.º 1
0
 def size(self):
     '''
     Returns the size of the field in bytes. This function will add
     all the bit field sizes in order to calculate the byte size of
     the container.
     '''
     return byte_end(Container.size(self))
Ejemplo n.º 2
0
 def str_value(self):
     '''
     Returns a human-readable representation of the value of this
     field. In case of bit fields the representation is an
     hexadecimal value.
     '''
     return hex_string(self.value(), byte_end(self.size()))
Ejemplo n.º 3
0
 def str_value(self):
     '''
     Returns a human-readable representation of the value of this
     field. In case of bit fields the representation is an
     hexadecimal value.
     '''
     return hex_string(self.value(), byte_end(self.size()))
Ejemplo n.º 4
0
 def size(self):
     """
     Returns the size of the field in bytes. This function will add
     all the bit field sizes in order to calculate the byte size of
     the container.
     """
     return byte_end(Container.size(self))
Ejemplo n.º 5
0
 def str_eng_value(self):
     '''
     Returns a human-readable representation of the engineering
     value. This function will first calculate the engineering value
     (by applying the calibration curve) and will return the string
     representation of it. In case of bit fields the representation
     is an hexadecimal value.
     '''
     return hex_string(self.eng_value(), byte_end(self.size()))
Ejemplo n.º 6
0
 def str_eng_value(self):
     '''
     Returns a human-readable representation of the engineering
     value. This function will first calculate the engineering value
     (by applying the calibration curve) and will return the string
     representation of it. In case of bit fields the representation
     is an hexadecimal value.
     '''
     return hex_string(self.eng_value(), byte_end(self.size()))
Ejemplo n.º 7
0
 def str_hex_value(self):
     '''
     Returns a human-readable representation of the hexadecimal value
     of this field. This will return the same as *str_value*.
     '''
     return hex_string(self.hex_value(), byte_end(self.size()))
Ejemplo n.º 8
0
 def str_hex_value(self):
     '''
     Returns a human-readable representation of the hexadecimal value
     of this field. This will return the same as *str_value*.
     '''
     return hex_string(self.hex_value(), byte_end(self.size()))