_search_flag_in_blockette(mseed_file_desc, first_blockette_offset, blockette_number, field_offset, field_length)[source]

Search for a given flag in a given blockette for the current record.

This is a utility function for set_flags_in_fixed_headers and is not designed to be called by someone else.

This function uses the file descriptor``mseed_file_desc``, seeks first_blockette_offset to go to the first blockette, reads through all the blockettes until it finds the one with number blockette_number, then skips field_offset bytes to read field_length bytes and returns them. If the blockette does not exist, it returns None

Please note that this function does not decommute the binary value into an exploitable data (int, float, string, ...) :type mseed_file_desc: File object :param mseed_file_desc: a File descriptor to the current miniseed file. The value of mseed_file_desc.tell() is set back by this funcion before returning, use in multithread applications at your own risk. :type first_blockette_offset: int :param first_blockette_offset: tells the function where the first blockette of the record is compared to the mseed_file_desc current position in the file. A positive value means the blockette is after the current position. :type blockette_number: int :param blockette_number: the blockette number to search for :type field_offset: int :param field_offset: how many bytes we have to skip before attaining the wanted field. Please note that it also counts blockette number and next blockette index’s field. :type field_length: int :param field_length: length of the wanted field, in bytes :return: bytes containing the field’s value in this record