예제 #1
0
 def get_antenna_pair_phase_value(self):
     file_data, self.offset = load_csi_real_time_data.read_bf_file(self.filename, self.offset)
     if len(file_data) > 0:
         csi_entry = file_data.loc[len(file_data) - 1]
         csi = load_csi_real_time_data.get_scale_csi(csi_entry)
         try:
             self.last_value = self.get_true_phase(csi[self.tx][self.rx][:], -1)
         except IndexError:
             RealtimePlotter.error_no = 1 if self.tx == 1 else 2
     return self.last_value
예제 #2
0
 def get_single_subcarrier_amplitude_value(self):
     file_data, self.offset = load_csi_real_time_data.read_bf_file(self.filename, self.offset)
     if len(file_data) > 0:
         csi_entry = file_data.loc[len(file_data) - 1]
         csi = load_csi_real_time_data.get_scale_csi(csi_entry)
         try:
             self.last_value = abs(np.squeeze(csi[self.tx][self.rx][self.subcarrier_no]))
         except IndexError:
             RealtimePlotter.error_no = 1 if self.tx == 1 else 2
     return self.last_value
예제 #3
0
 def get_single_subcarrier_amplitude_value(self):
     global s
     global pin
     file_data, self.offset = load_csi_real_time_data.read_bf_file(
         self.filename, self.offset)
     if len(file_data) > 0:
         csi_entry = file_data.loc[len(file_data) - 1]
         csi = load_csi_real_time_data.get_scale_csi(csi_entry)
         self.last_value = abs(
             np.squeeze(csi[self.tx][self.rx][self.subcarrier_no]))
         pin = pin % 64
         s[pin] = sum(sum(sum(abs(csi))))
         pin += 1
     return self.last_value
예제 #4
0
 def get_all_data_phase_value(self):
     file_data, self.offset = load_csi_real_time_data.read_bf_file(self.filename, self.offset)
     if len(file_data) > 0:
         csi_entry = file_data.loc[len(file_data) - 1]
         csi = load_csi_real_time_data.get_scale_csi(csi_entry)
         csi_phase = self.get_true_phase(csi, -2)
         n_size = np.size(csi_phase)
         n_c = 90 * (self.tx + 1)
         if n_size == n_c:
             self.last_value = np.reshape(csi_phase, n_size)
         elif n_size < n_c:
             RealtimePlotter.error_no = 1 if self.tx == 1 else 2
         elif n_size > n_c:
             RealtimePlotter.error_no = 3 if n_size // 90 == 2 else 4
     return self.last_value
예제 #5
0
 def get_rssi_value(self):
     file_data, self.offset = load_csi_real_time_data.read_bf_file(self.filename, self.offset)
     if len(file_data) > 0:
         csi_entry = file_data.loc[len(file_data) - 1]
         self.last_value = load_csi_real_time_data.get_total_rss(csi_entry)
     return self.last_value