#pragma once

#include <Arduino.h>

#include "app_context.h"
#include "data_model.h"

struct ReceiverPipelineConfig {
  uint16_t short_id;
  const char *device_id;
  ReceiverSharedState *shared;
};

struct ReceiverStats {
  uint32_t receiver_decode_fail;
  uint32_t receiver_lora_tx_fail;
  RxRejectReason last_rx_reject;
  bool receiver_discovery_sent;
};

class ReceiverPipeline {
public:
  bool begin(const ReceiverPipelineConfig &config);
  void loop();
  ReceiverStats stats() const;
};

