TSI_Config/cardbase.h

76 lines
1.4 KiB
C
Raw Permalink Normal View History

2025-03-29 18:05:12 +08:00
#ifndef CARDBASE_H
#define CARDBASE_H
#include "data_config.h"
2025-04-01 15:03:59 +08:00
//#ifdef NAME
// #undef NAME
//#endif
//#define NAME(x) (x, #x)
2025-03-29 18:05:12 +08:00
class CardBase {
public:
CardBase() {}
2025-04-02 10:13:03 +08:00
virtual ~CardBase() {}
2025-03-29 18:05:12 +08:00
int version_;
int slot_; // 从1~15
CardType card_type_;
};
class VariableBase {
public:
VariableBase() {}
2025-04-02 10:13:03 +08:00
virtual ~VariableBase() {}
2025-04-01 15:03:59 +08:00
2025-03-29 18:05:12 +08:00
int id_;
VibChannelType type_;
2025-04-01 17:52:25 +08:00
Filter filter_[3];
2025-03-29 18:05:12 +08:00
DirectImpl direct_;
2025-07-09 20:24:50 +08:00
GapRange gap_range;
2025-03-29 18:05:12 +08:00
XImpl x1_;
XImpl x2_;
RecorderOut recorder_out_;
2025-04-01 15:03:59 +08:00
Delay delay_;
2025-03-29 18:05:12 +08:00
};
// 位移
class RadialVariable : public VariableBase {
public:
bool alert_latching_;
bool danger_latching_;
RadialImpl not1x_;
RadialImpl smax_;
};
// 加速度与速度
class AccVelVariable : public VariableBase {
public:
bool alert_latching_;
bool danger_latching_;
bool timed_ok_;
bool rms_active_;
bool integrate_active_;
};
2025-07-09 20:24:50 +08:00
// 轴向位移
class ThrustVariable : public VariableBase {
public:
bool alert_latching_;
bool danger_latching_;
bool timed_ok_;
2025-07-09 20:24:50 +08:00
ZeroPosition zero_position;
};
// 动态压力脉动
class PressurePulsationVariable : public VariableBase {
public:
bool fixed;
int sample_rate;
int bandwidth;
int fft_points;
bool spectral_synchron;
int measuring_min;
int measuring_max;
int scale_min;
int scale_max;
bool inherited;
};
2025-03-29 18:05:12 +08:00
#endif // CARDBASE_H