diff --git a/TSI_Config.pro b/TSI_Config.pro index cf821d8..ada48d8 100644 --- a/TSI_Config.pro +++ b/TSI_Config.pro @@ -26,8 +26,10 @@ SOURCES += \ HEADERS += \ MyTcpClient.h \ acceleration.h \ + acceleration_ds.h \ common.h \ data_config.h \ + displacement_ds.h \ keyphase.h \ mainwindow.h \ radial_vibration.h \ @@ -36,7 +38,8 @@ HEADERS += \ setpoint.h \ singlerelay.h \ tachometer.h \ - velocity.h + velocity.h \ + velocity_ds.h FORMS += \ acceleration.ui \ diff --git a/acceleration_ds.h b/acceleration_ds.h new file mode 100644 index 0000000..ab4b0bd --- /dev/null +++ b/acceleration_ds.h @@ -0,0 +1,38 @@ +#ifndef ACCELERATION_DS_H +#define ACCELERATION_DS_H + +// 加速度峰值的量程范围 +typedef enum { + kAccPK20 = 0, // 0-20 m/s^2 pk + kAccPK50 = 1, // 0-50 m/s^2 pk + kAccPK100 = 2, // 0-100 m/s^2 pk + kAccPK200 = 3, // 0-200 m/s^2 pk + kAccPK250 = 4, // 0-250 m/s^2 pk + kAccPK400 = 5, // 0-400 m/s^2 pk + kAccPKCustom = 6 // custom +} AccPKFullScaleRange; + +// 加速度有效值的量程范围 +typedef enum { + kAccRMS20 = 0, // 0-20 m/s^2 rms + kAccRMS50 = 1, // 0-50 m/s^2 rms + kAccRMS100 = 2, // 0-100 m/s^2 rms + kAccRMS200 = 3, // 0-200 m/s^2 rms + kAccRMSCustom = 4 // custom +} AccRMSFullScaleRange; + +// 速度峰值的量程范围 +typedef enum { + kAccVelPK25 = 0, // 0-25 mm/s pk + kAccVelPK50 = 1, // 0-50 mm/s pk + kAccVelPK100 = 2, // 0-100 mm/s pk + kAccVelCustom = 3 // custom +} AccVelPKFullScaleRange; + +typedef enum { + kAccVelRMS25 = 0, // 0-25 mm/s rms + kAccVelRMS50 = 1, // 0-50 mm/s rms + kAccVelRMSCustom = 2 // custom +} AccVelRMSFullScaleRange; + +#endif // ACCELERATION_DS_H diff --git a/data_config.h b/data_config.h index 85d8ffb..032c708 100644 --- a/data_config.h +++ b/data_config.h @@ -16,9 +16,9 @@ typedef struct { QString slot_type; QString chan_display; QString rack_type; - QPushButton* slot_btn; - QLabel* slot_label; -}SlotConfig; + QPushButton *slot_btn; + QLabel *slot_label; +} SlotConfig; enum CMTCommand { kEigenvalueCmd = 1, @@ -31,7 +31,7 @@ enum CMTCommand { }; -typedef struct{ +typedef struct { int id; QString channel_name; bool standby; @@ -44,16 +44,16 @@ typedef struct{ QString sample_rate; float normal_voltage_low; float normal_voltage_high; -}SeismicMonitor; +} SeismicMonitor; -typedef struct{ +typedef struct { QString type; int low; int high; bool checked; } Filter; -typedef struct{ +typedef struct { QString type; QString full_sacle_range; int bias_voltage; @@ -62,12 +62,12 @@ typedef struct{ bool checked; } Variables; -typedef struct{ +typedef struct { int alert; float danger; bool active_100ms; } Dealy; -typedef struct{ +typedef struct { bool rms_active; bool integrate_active; bool alert_latching; @@ -80,7 +80,7 @@ typedef struct{ int comparision_percentage; } Alert_Variables; -typedef struct{ +typedef struct { int id; bool active; float normal_voltage_low; @@ -96,13 +96,12 @@ typedef struct{ bool normal_latching; int alert_response_time; int danger_response_time; -}Tachometer_Variables; +} Tachometer_Variables; -typedef struct -{ +typedef struct { QString transducer_name; double scale_factor; -}Transducer; +} Transducer; #pragma pack(1) typedef struct { diff --git a/displacement_ds.h b/displacement_ds.h new file mode 100644 index 0000000..9b13ff1 --- /dev/null +++ b/displacement_ds.h @@ -0,0 +1,13 @@ +#ifndef DISPLACEMENT_DS_H +#define DISPLACEMENT_DS_H +// 位移峰峰值的量程范围 +typedef enum { + kDisPP100 = 0, // 0-100 um + kDisPP150 = 1, // 0-150 um + kDisPP200 = 2, // 0-200 um + kDisPP400 = 3, // 0-400 um + kDisPP500 = 4, // 0-500 um + kDisPPCustom = 5 // custom +} DisPPFullScaleRange; + +#endif // DISPLACEMENT_DS_H diff --git a/velocity_ds.h b/velocity_ds.h new file mode 100644 index 0000000..f786db6 --- /dev/null +++ b/velocity_ds.h @@ -0,0 +1,28 @@ +#ifndef VELOCITY_DS_H +#define VELOCITY_DS_H + +// 速度峰值的量程范围 +typedef enum { + kVelPK10 = 0, // 0-10 mm/s pk + kVelPK20 = 1, // 0-20 mm/s pk + kVelPK50 = 2, // 0-50 mm/s pk + kVelPKCustom = 3 // custom +} VelPKFullScaleRange; + +// 速度有效值的量程范围 +typedef enum { + kVelRMS10 = 0, // 0-10 mm/s rms + kVelRMS20 = 1, // 0-20 mm/s rms + kVelRMS50 = 2, // 0-50 mm/s rms + kVelRMSCustom = 3 // custom +} VelRMSFullScaleRange; + +// 位移峰峰值的量程范围 +typedef enum { + kVelDisPP100 = 0, // 0-100 um pp + kVelDisPP200 = 1, // 0-200 um pp + kVelDisPP500 = 2, // 0-500 um pp + kVelDisPPCustom = 3 // custom +} VelDisPPFullScaleRange; + +#endif // VELOCITY_DS_H