新增dll相关拦截器及接收实体类

This commit is contained in:
qiaoqinzheng 2023-07-11 09:01:49 +08:00
parent 6003bc8cf8
commit c88b114ade
4 changed files with 535 additions and 0 deletions

View File

@ -0,0 +1,36 @@
package org.jeecg.modules.native_jni;
import org.jeecg.modules.native_jni.struct.BgBoundary;
import org.jeecg.modules.native_jni.struct.CalcBgBoundaryParam;
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
import java.util.List;
/**
* 能谱处理本地类
*/
public class EnergySpectrumHandler {
/**
* 获取能谱原始数据
* @param path 能谱文件路径
* @return 能谱原始数据
*/
public static native EnergySpectrumStruct getSourceData(String path);
/**
* 根据不同的拟合方法计算边界值 默认2次拟合 可以继承书写新的拟合
* @param calcBgBoundaryParam
* @return
*/
public static native BgBoundary CalcBgBoundary(CalcBgBoundaryParam calcBgBoundaryParam);
/**
* 获取 Energy
* @param centroid_channel
* @param g_energy
* @return
*/
public static native List<Double> GetFileFittingPara(List<Double> centroid_channel, List<Double> g_energy);
}

View File

@ -0,0 +1,21 @@
package org.jeecg.modules.native_jni.struct;
import java.util.List;
/**
* 边界值
*/
public class BgBoundary {
/**
*/
public List<Integer> ROI_B_Boundary_start;
/**
*/
public List<Integer> ROI_B_Boundary_stop;
/**
*/
public List<Integer> ROI_G_Boundary_start;
/**
*/
public List<Integer> ROI_G_Boundary_stop;
}

View File

@ -0,0 +1,75 @@
package org.jeecg.modules.native_jni.struct;
import java.util.List;
public class CalcBgBoundaryParam {
/************************* BgROILimit ******************/
/**
* 2-D ROI β-range start, x 1 (keV)
*/
public List<Double> ROI_B_start_x1;
/**
* 2-D ROI β-range stop, x 2 (keV)
*/
public List<Double> ROI_B_stop_x2;
/**
* 2-D ROI γ-range start, y 1 (keV)
*/
public List<Double> ROI_G_start_y1;
/**
* 2-D ROI γ-range stop, y 2 (keV)
*/
public List<Double> ROI_G_stop_y2;
/************************* BgEnergyChannel ******************/
/**
* b_Energy:electron_energy kev 能量
*/
public List<Double> b_energy;
/**
* b_Energy channel
*/
public List<Double> b_channel;
/**
* g_Energy:g_energy kev 能量
*/
public List<Double> g_energy;
/**
* g_Energy:centroid_channel
*/
public List<Double> g_channel;
/************************* BgCalibratePara ******************/
/**
* b 能刻度系数
*/
public List<Double> b_e_cal;
/**
* g 能刻度系数
*/
public List<Double> g_e_cal;
/**
* b 自计算刻度系数配置
*/
int b_e_cal_flag = 2;
/**
* g 自计算刻度系数配置
*/
int g_e_cal_flag = 2;
/**
* 界面交互新刻度应用
*/
boolean bApplyNewCalicSample = false;
boolean bApplyNewCalicDetBg = false;
boolean bApplyNewCalicGasBg = false;
boolean bApplyNewCalicQc = false;
}

View File

@ -0,0 +1,403 @@
package org.jeecg.modules.native_jni.struct;
import java.util.List;
/**
* 能谱结构体字段信息
*/
public class EnergySpectrumStruct {
/************************* Infomations ******************/
/**
* 消息类型
*/
public String msg_type;
/**
* 消息id
*/
public String msg_id;
/**
* 数据类型
*/
public String data_type;
/************************* Header Black ******************/
/**
* designator
*/
public String designator;
/**
* site code
*/
public String site_code;
/**
* detector code
*/
public String detector_code;
/**
* system type: P for particulate; B for gas with 3-D β - γ coincidence detection; and
*/
public String system_type;
/**
* sample geometry
*/
public String sample_geometry;
/**
* spectrum qualifier: preliminary ( PREL )or full ( FULL)
*/
public String spectrum_quantity;
/**
* sample reference identification
*/
public String sample_ref_id;
/**
* measurement identification
*/
public String measurement_id;
/**
* detector background measurement identification
*/
public String detector_bk_measurement_id;
/**
* gas background measurement identification (memory effect)
*/
public String gas_bk_measurement_id;
/**
* transmit date (yyyy / mm / dd)
*/
public String transmit_date;
/**
* transmit time (hh : mm : ss . s)
*/
public String transmit_time;
/************************* Comment ******************/
public String comment;
/************************* Acquisition Block ******************/
/**
* acquisition start date (yyyy / mm / dd)
*/
public String acquisition_start_date;
/**
* acquisition start time (hh : mm : ss . s)
*/
public String acquisition_start_time;
/**
* acquisition real time (s)
*/
public double acquisition_real_time;
/**
* acquisition live time (s)
*/
public double acquisition_live_time;
/************************* Collection Block ******************/
/**
* collection start date (yyyy / mm / dd)
*/
public String collection_start_date;
/**
* collection start time (hh : mm : ss . s)
*/
public String collection_start_time;
/**
* collection stop date (yyyy / mm / dd)
*/
public String collection_stop_date;
/**
* collection stop time (hh : mm : ss . s)
*/
public String collection_stop_time;
/**
* total air volume sampled (standard cubic meters [scm])
*/
public double air_volume;
/************************* Processing Block ******************/
/**
* sample volume of Xe (cm 3 )
*/
public double sample_volume_of_Xe;
/**
* uncertainty (cm 3 )
*/
public double uncertainty_1;
/**
* Xe collection yield (Xe gas in sample/total Xe gas sampled)
*/
public double Xe_collection_yield;
/**
* uncertainty (Xe gas in sample/total Xe gas sampled)
*/
public double uncertainty_2;
/**
* archive bottle identification
*/
public String archive_bottle_id;
/************************* Calibration Block ******************/
/**
* date of last calibration (yyyy / mm / dd)
*/
public String date_calibration;
/**
* time of last calibration (hh : mm : ss)
*/
public String time_calibration;
/************************* g_Energy Block ******************/
/**
* γ -energy (keV)
*/
public List<Double> g_energy;
/**
* centroid channel
*/
public List<Double> g_centroid_channel;
/**
* uncertainty (channels)
*/
public List<Double> g_uncertainty;
public int g_record_count;
/************************* b_Energy Block ******************/
/**
* electron energy (keV)
*/
public List<Double> b_electron_energy;
/**
* decay mode descriptor: B for β-particle, C for conversion electron (CE)
*/
public List<String> b_decay_mode;
/**
* maximum channel of β-particle distribution or centroid channel of CE (channels)
*/
public List<Double> b_channel;
/**
* uncertainty (channels)
*/
public List<Double> b_uncertainty;
public int b_record_count;
/************************* g_Resolution Block ******************/
/**
* γ -energy (keV)
*/
public List<Double> g_r_energy;
/**
* FWHM (keV)
*/
public List<Double> g_r_FWHM;
/**
* uncertainty (keV)
*/
public List<Double> g_r_uncertainty;
public int g_r_record_count;
/************************* b_Resolution Block ******************/
/**
* electron energy (keV)
*/
public List<Double> b_r_electron_energy;
/**
* FWHM (keV)
*/
public List<Double> b_r_FWHM;
/**
* uncertainty (keV)
*/
public List<Double> b_r_uncertainty;
public int b_r_record_count;
/************************* g_Efficiency Block ******************/
/**
* γ -energy (keV)
*/
public List<Double> g_e_energy;
/**
* efficiency (counts in peak/photon emitted)
*/
public List<Double> g_e_efficiency;
/**
* uncertainty (counts in peak/photon emitted)
*/
public List<Double> g_e_uncertainty;
public int g_e_record_count;
/************************* ROI_Limits Block ******************/
/**
* ROI number
*/
public List<String> ROI_number;
/**
* 2-D ROI β-range start, x 1 (keV)
*/
public List<Double> POI_B_x1;
/**
* 2-D ROI β-range stop, x 2 (keV)
*/
public List<Double> POI_B_x2;
/**
* 2-D ROI γ-range start, y 1 (keV)
*/
public List<Double> POI_G_y1;
/**
* 2-D ROI γ-range stop, y 2 (keV)
*/
public List<Double> POI_G_y2;
public int roi_record_count;
/************************* b-gEfficiency Block ******************/
/**
* nuclide name
*/
public List<String> bg_nuclide_name;
/**
* ROI number
*/
public List<String> bg_ROI_number;
/**
* β-γ coincidence efficiency (counts in ROI/β-γ pair emitted)
*/
public List<Double> bg_efficiency;
/**
* uncertainty (counts in ROI/β-γ pair emitted)
*/
public List<Double> bg_uncertainty;
public int bg_record_count;
/************************* Ratios Block ******************/
/**
* ratio identifier
*/
public List<String> ratio_id;
/**
* ROI number for the higher γ -energy ROI
*/
public List<String> ROI_num_highter_G_energy_ROI;
/**
* ROI number for the lower γ -energy ROI
*/
public List<String> ROI_num_lower_G_energy_ROI;
/**
* Q_DECLARE_METATYPE(RMSSOHData::HeaderBlock)count ratio(counts in higher γ -energy ROI/counts in lower γ -energy ROI)
*/
public List<Double> count_ratio;
/**
* count ratio uncertainty (percent)
*/
public List<Double> count_ratio_uncertainty;
public int ratio_record_count;
/************************* g_Spectrum Block ******************/
/**
* number of γ channels
*/
public long num_g_channel;
/**
* γ-energy span (keV)
*/
public long g_energy_span;
/**
* begin of channels
*/
public long g_begin_channel;
/**
* count at channel
*/
public List<Long> g_counts;
/************************* b_Spectrum Block ******************/
/**
* number of β -channels
*/
public long num_b_channel;
/**
* β -energy span (keV)
*/
public long b_energy_span;
/**
* begin of channels
*/
public long b_begin_channel;
/**
* counts at channels
*/
public List<Long> b_counts;
/************************* Histogram Block ******************/
/**
* β-channels
*/
public long b_channels;
/**
* γ-channels
*/
public long g_channels;
/**
* β-energy span
*/
public long b_h_energy_span;
/**
* γ-energy span
*/
public long g_h_energy_span;
/**
* counts at channels
*/
public List<Long> h_counts;
public EnergySpectrumStruct() {
super();
}
@Override
public String toString() {
return "EnergySpectrumStruct [msg_type=" + msg_type + ", msg_id=" + msg_id + ", data_type=" + data_type
+ ", designator=" + designator + ", site_code=" + site_code + ", detector_code=" + detector_code
+ ", system_type=" + system_type + ", sample_geometry=" + sample_geometry + ", spectrum_quantity="
+ spectrum_quantity + ", sample_ref_id=" + sample_ref_id + ", measurement_id=" + measurement_id
+ ", detector_bk_measurement_id=" + detector_bk_measurement_id + ", gas_bk_measurement_id="
+ gas_bk_measurement_id + ", transmit_date=" + transmit_date + ", transmit_time=" + transmit_time
+ ", comment=" + comment + ", acquisition_start_date=" + acquisition_start_date
+ ", acquisition_start_time=" + acquisition_start_time + ", acquisition_real_time="
+ acquisition_real_time + ", acquisition_live_time=" + acquisition_live_time
+ ", collection_start_date=" + collection_start_date + ", collection_start_time="
+ collection_start_time + ", collection_stop_date=" + collection_stop_date + ", collection_stop_time="
+ collection_stop_time + ", air_volume=" + air_volume + ", sample_volume_of_Xe=" + sample_volume_of_Xe
+ ", uncertainty_1=" + uncertainty_1 + ", Xe_collection_yield=" + Xe_collection_yield
+ ", uncertainty_2=" + uncertainty_2 + ", archive_bottle_id=" + archive_bottle_id
+ ", date_calibration=" + date_calibration + ", time_calibration=" + time_calibration + ", g_energy="
+ g_energy + ", g_centroid_channel=" + g_centroid_channel + ", g_uncertainty=" + g_uncertainty
+ ", g_record_count=" + g_record_count + ", b_electron_energy=" + b_electron_energy + ", b_decay_mode="
+ b_decay_mode + ", b_channel=" + b_channel + ", b_uncertainty=" + b_uncertainty + ", b_record_count="
+ b_record_count + ", g_r_energy=" + g_r_energy + ", g_r_FWHM=" + g_r_FWHM + ", g_r_uncertainty="
+ g_r_uncertainty + ", g_r_record_count=" + g_r_record_count + ", b_r_electron_energy="
+ b_r_electron_energy + ", b_r_FWHM=" + b_r_FWHM + ", b_r_uncertainty=" + b_r_uncertainty
+ ", b_r_record_count=" + b_r_record_count + ", g_e_energy=" + g_e_energy + ", g_e_efficiency="
+ g_e_efficiency + ", g_e_uncertainty=" + g_e_uncertainty + ", g_e_record_count=" + g_e_record_count
+ ", ROI_number=" + ROI_number + ", POI_B_x1=" + POI_B_x1 + ", POI_B_x2=" + POI_B_x2 + ", POI_G_y1="
+ POI_G_y1 + ", POI_G_y2=" + POI_G_y2 + ", roi_record_count=" + roi_record_count + ", bg_nuclide_name="
+ bg_nuclide_name + ", bg_ROI_number=" + bg_ROI_number + ", bg_efficiency=" + bg_efficiency
+ ", bg_uncertainty=" + bg_uncertainty + ", bg_record_count=" + bg_record_count + ", ratio_id="
+ ratio_id + ", ROI_num_highter_G_energy_ROI=" + ROI_num_highter_G_energy_ROI
+ ", ROI_num_lower_G_energy_ROI=" + ROI_num_lower_G_energy_ROI + ", count_ratio=" + count_ratio
+ ", count_ratio_uncertainty=" + count_ratio_uncertainty + ", ratio_record_count=" + ratio_record_count
+ ", num_g_channel=" + num_g_channel + ", g_energy_span=" + g_energy_span + ", g_begin_channel="
+ g_begin_channel + ", g_counts=" + g_counts + ", num_b_channel=" + num_b_channel + ", b_energy_span="
+ b_energy_span + ", b_begin_channel=" + b_begin_channel + ", b_counts=" + b_counts + ", b_channels="
+ b_channels + ", g_channels=" + g_channels + ", b_h_energy_span=" + b_h_energy_span
+ ", g_h_energy_span=" + g_h_energy_span + ", h_counts="+ h_counts +"]";
}
}