def parse(self, data):
self.validate_packet(data)<EOL>results = self.parse_header_part(data)<EOL>sub_type = results['<STR_LIT>']<EOL>id_ = self.dump_hex(data[<NUM_LIT:4>:<NUM_LIT:6>])<EOL>direction = data[<NUM_LIT:6>] * <NUM_LIT> + data[<NUM_LIT:7>]<EOL>if sub_type != <NUM_LIT>:<EOL><INDENT>av_speed = (data[<NUM_LIT:8>] * <NUM_LIT> + data[<NUM_LIT:9>]) * <NUM_LIT:0.1><EOL><DEDENT>else:<EOL><INDENT>av_speed = '<STR_LIT>'<EOL><DEDENT>gust = (data[<NUM_LIT:10>] * <NUM_LIT> + data[<NUM_LIT:11>]) * <NUM_LIT:0.1><EOL>if sub_type == <NUM_LIT>:<EOL><INDENT>temperature = ((data[<NUM_LIT:12>] & <NUM_LIT>) * <NUM_LIT> + data[<NUM_LIT>]) / <NUM_LIT:10><EOL>signbit = data[<NUM_LIT:12>] & <NUM_LIT><EOL>if signbit != <NUM_LIT:0>:<EOL><INDENT>temperature = -temperature<EOL><DEDENT><DEDENT>else:<EOL><INDENT>temperature = '<STR_LIT>'<EOL><DEDENT>if sub_type == <NUM_LIT>:<EOL><INDENT>wind_chill = ((data[<NUM_LIT>] & <NUM_LIT>) * <NUM_LIT> + data[<NUM_LIT:15>]) / <NUM_LIT:10><EOL>signbit = data[<NUM_LIT>] & <NUM_LIT><EOL>if signbit != <NUM_LIT:0>:<EOL><INDENT>wind_chill = -wind_chill<EOL><DEDENT><DEDENT>else:<EOL><INDENT>wind_chill = '<STR_LIT>'<EOL><DEDENT>sensor_specific = {<EOL>'<STR_LIT:id>': id_,<EOL>'<STR_LIT>': direction,<EOL>'<STR_LIT>': gust<EOL>}<EOL>if av_speed != '<STR_LIT>':<EOL><INDENT>sensor_specific['<STR_LIT>'] = av_speed<EOL><DEDENT>if temperature != '<STR_LIT>':<EOL><INDENT>sensor_specific['<STR_LIT>'] = temperature<EOL><DEDENT>if wind_chill != '<STR_LIT>':<EOL><INDENT>sensor_specific['<STR_LIT>'] = wind_chill<EOL><DEDENT>results.update(RfxPacketUtils.parse_signal_and_battery(data[<NUM_LIT:16>]))<EOL>results.update(sensor_specific)<EOL>return results<EOL>
Parse a 17 bytes packet in the Wind format and return a
        dictionary containing the data extracted. An example of a return value
        would be:

        .. code-block:: python

            {
                'id': "0x2EB2",
                'packet_length': 16,
                'packet_type': 86,
                'packet_type_name': 'Wind sensors',
                'sequence_number': 0,
                'packet_subtype': 4,
                'packet_subtype_name': "TFA",
                'temperature': 17.3,
                'direction': 120,
                'wind_gust': 11,
                'av_speed': 12,
                'wind_chill': 10,
                'signal_level': 9,
                'battery_level': 6,
            }

        :param data: bytearray to be parsed
        :type data: bytearray

        :return: Data dictionary containing the parsed values
        :rtype: dict