radioInterfaceMulti: Fail to tune on freq not following multi-arfcn restrictions

multi-arfcn feature uses a hardcoded disposition of logical channels on
a physical channel. Logical channels in the phisical channel are
separated by MCBTS_SPACING Hz, that is 4 GSM ARFCNs.

As a result, multi-arfcn restricts the TRX ARFCN setup to the following:
ARFCN(TRX0)=N, ARFCN(TRX1)=N+1*4, ARFCN(TRX2)=N+2*4, ...

Let's make sure radioInterfaceMulti verifies the requested Rx/Tx
frequencies for each logical channel over TRXC match the restriction
explained above. It will check freq going to be set is indeed separated
by MCBTS_SPACING from already set channels, making sure the ARFCN series
is consistent.

Otherwise, before this patch, one could set in osmo-bsc:
ARFCN(TRX0)=N, ARFCN(TRX1)=N+2

and osmo-trx would silently ack the related Rx/TxTUNE TRXC commands, but
actually still transmit on ARFCN N+4 instead. As a result, in this
scenario TRX!=0 were unusable with multi-arfcn.

Related: OS#4207
Change-Id: I2f3d66a611d3a489b3e4d9431994f4ec77b4460f
diff --git a/Transceiver52M/radioInterface.h b/Transceiver52M/radioInterface.h
index d9fa414..c75a983 100644
--- a/Transceiver52M/radioInterface.h
+++ b/Transceiver52M/radioInterface.h
@@ -156,16 +156,24 @@
   void close();
 };
 
+struct freq_cfg_state {
+  bool set;
+  double freq_hz;
+};
+
 class RadioInterfaceMulti : public RadioInterface {
 private:
   bool pushBuffer();
   int pullBuffer();
+  bool verify_arfcn_consistency(double freq, size_t chan, bool tx);
   virtual double setTxGain(double dB, size_t chan);
 
   signalVector *outerSendBuffer;
   signalVector *outerRecvBuffer;
   std::vector<signalVector *> history;
   std::vector<bool> active;
+  std::vector<struct freq_cfg_state> rx_freq_state;
+  std::vector<struct freq_cfg_state> tx_freq_state;
 
   Resampler *dnsampler;
   Resampler *upsampler;