bool set_beamforming(std::vector<gr_complex> gains);
bool set_cal_enb(bool enb);
- double get_cal_freq(void){return d_actual_cal_freq;}
- double get_lo_freq(void){return d_actual_lo_freq;}
+ //caldiv public access methods
+ double get_cal_freq(void){return d_cal_freq;}
+ bool get_cal_locked(void){return d_cal_locked;}
+ bool get_cal_enabled(void){return d_cal_enabled;}
+ double get_lo_freq(void){return d_lo_freq;}
+ bool get_lo_locked(void){return d_lo_locked;}
+ double get_caldiv_temp(void){return d_caldiv_temp;}
+ int get_caldiv_ser_no(void){return d_caldiv_rev;}
+ int get_caldiv_rev_no(void){return d_caldiv_ser;}
};
//we have a context packet, grab its useful information...
//remember that things are in network byte order!
if (h.get_if_context()){
- d_actual_lo_freq = vrt_freq_to_double(ntohll(h.get_if_context()->beamformer.rf_ref_freq));
+ d_lo_freq = vrt_freq_to_double(ntohll(h.get_if_context()->caldiv.lo_freq));
+ d_cal_freq = vrt_freq_to_double(ntohll(h.get_if_context()->caldiv.cal_freq));
+ d_lo_locked = bool(ntohl(h.get_if_context()->caldiv.lo_locked));
+ d_cal_locked = bool(ntohl(h.get_if_context()->caldiv.cal_locked));
+ d_cal_enabled = bool(ntohl(h.get_if_context()->caldiv.cal_enabled));
+ d_caldiv_temp = vrt_temp_to_double(ntohl(h.get_if_context()->caldiv.temp));
+ d_caldiv_ser = ntohl(h.get_if_context()->caldiv.ser);
+ d_caldiv_rev = ntohl(h.get_if_context()->caldiv.rev);
}
return oo;
std::vector< std::complex<float> > d_remainder;
missing_pkt_checker d_checker;
- double d_actual_lo_freq;
- double d_actual_cal_freq;
+
+ //caldiv settings parsed from if context
+ double d_cal_freq;
+ bool d_cal_locked;
+ bool d_cal_enabled;
+ double d_lo_freq;
+ bool d_lo_locked;
+ double d_caldiv_temp;
+ int d_caldiv_rev;
+ int d_caldiv_ser;
public:
~vrt_source_32fc();
#ifndef INCLUDED_INET_H
#define INCLUDED_INET_H
+#include <stdint.h>
+
#if 1 /* missing htonll or ntohll */
#if @GR_ARCH_BIGENDIAN@ /* GR_ARCH_BIGENDIAN */
// Nothing to do...
uint32_t gain;
} __attribute__((packed)) gain_if_cntx_t;
+typedef struct caldiv_if_cntx_tag {
+ if_context_hdr_t cntx_hdr;
+ uint64_t lo_freq;
+ uint32_t lo_locked;
+ uint64_t cal_freq;
+ uint32_t cal_locked;
+ uint32_t cal_enabled;
+ uint32_t temp;
+ uint32_t rev;
+ uint32_t ser;
+} __attribute__((packed)) caldiv_if_cntx_t;
// FIXME the rest...
// ------------------------------------------------------------------------
// All of them concatenated
-#define NCONTEXT_PKTS 6 // number of context pkts aggregated here
+#define NCONTEXT_PKTS 7 // number of context pkts aggregated here
typedef struct all_context_tag {
beamformer_if_cntx_t beamformer;
gain_if_cntx_t db[4];
// FIXME add Extension Context for board types, revs, serial numbers, temps
+ caldiv_if_cntx_t caldiv;
gps_if_cntx_t gps; // must be last
} __attribute__((packed)) all_context_t;