def unpack(self, buff=None, offset=0):
        """Unpack *buff* into this object.

        This method will convert a binary data into a readable value according
        to the attribute format.

        Args:
            buff (bytes): Binary buffer.
            offset (int): Where to begin unpacking.

        Raises:
            :exc:`~.exceptions.UnpackException`: If unpack fails.

        """
        instruction_type = UBInt16(enum_ref=InstructionType)
        instruction_type.unpack(buff, offset)
        self.__class__ = InstructionType(instruction_type.value).find_class()

        length = UBInt16()
        length.unpack(buff, offset=offset+2)

        super().unpack(buff[:offset+length.value], offset)
def unpack ( self , buff = None , offset = 0 ) : instruction_type = UBInt16 ( enum_ref = InstructionType ) instruction_type . unpack ( buff , offset ) self . __class__ = InstructionType ( instruction_type . value ) . find_class ( ) length = UBInt16 ( ) length . unpack ( buff , offset = offset + 2 ) super ( ) . unpack ( buff [ : offset + length . value ] , offset )
Unpack *buff* into this object.

        This method will convert a binary data into a readable value according
        to the attribute format.

        Args:
            buff (bytes): Binary buffer.
            offset (int): Where to begin unpacking.

        Raises:
            :exc:`~.exceptions.UnpackException`: If unpack fails.