/* -*- c++ -*- */
/*
 * Copyright 2014 Free Software Foundation, Inc.
 *
 * This file is part of GNU Radio
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

#ifndef INCLUDED_DIGITAL_CORRELATE_ACCESS_CODE_TAG_FIXED_H
#define INCLUDED_DIGITAL_CORRELATE_ACCESS_CODE_TAG_FIXED_H

#include <gnuradio/satlab/api.h>
#include <gnuradio/block.h>
#include <string>

namespace gr {
  namespace satlab {

    class SATLAB_API correlate_access_code_tag_fixed : virtual public block
    {
    public:
      // gr::gnuradio/satlab::correlate_access_code_tag_fixed::sptr
      typedef std::shared_ptr<correlate_access_code_tag_fixed> sptr;

      /*!
       * \param access_code is represented with 1 byte per bit,
       *                    e.g., "010101010111000100"
       * \param threshold maximum number of bits that may be wrong
       * \param tag_name key of the tag inserted into the tag stream
       */
      static sptr make(const std::string &access_code,
		       int threshold,
		       const std::string &tag_name,
		       unsigned int pkt_len);

      /*!
       * \param access_code is represented with 1 byte per bit,
       *                    e.g., "010101010111000100"
       */
      virtual bool set_access_code(const std::string &access_code) = 0;
      virtual void set_packet_len(unsigned int pkt_len) = 0;
      virtual void set_threshold(unsigned int threshold) = 0;
    };

  } /* namespace satlab */
} /* namespace gr */

#endif /* INCLUDED_DIGITAL_CORRELATE_ACCESS_CODE_TAG_FIXED_H */
