61 lines
1.8 KiB
C++
61 lines
1.8 KiB
C++
#ifndef MYCFG_H
|
||
#define MYCFG_H
|
||
|
||
#include "base/base.h"
|
||
|
||
class mycfg
|
||
{
|
||
public:
|
||
mycfg();
|
||
|
||
void to_class(mystring str);
|
||
void init_env();
|
||
mystring to_json();
|
||
void restart();
|
||
void reload();
|
||
void save();
|
||
bool save_file(mystring name, myarray data);
|
||
void updata_produc_info(myarray data);
|
||
void updata_produc_info(QList<int> data);
|
||
QList<int> calc_slave_addrs();
|
||
|
||
bool tcp_enable; // tcp使能
|
||
mystring server_ip;
|
||
int server_port;
|
||
mystring local_ip;
|
||
int local_port;
|
||
mystring gateway_ip;
|
||
mystring netmask;
|
||
int local_id; // 用于区分不同批检仪的id号
|
||
int can_bitrate; // can bps
|
||
int slave_num; // 从机个数
|
||
int mcu_timeout; // 从机通信超时时间
|
||
mystring debug_ip; // debug信息输出地址
|
||
int debug_port; // debug输出端口
|
||
mystring build_date;
|
||
mystring soft_version;
|
||
mystring hard_version;
|
||
int cmd_port; // 命令端口
|
||
mystring log_redirect; // 日志重定向
|
||
mystring def_check_cfg; // 默认方案文件
|
||
mystring def_mcu_app; // 默认mcu程序
|
||
mystring def_shell; // 默认shell脚本
|
||
QList<mystring> lua_libs; // lua库
|
||
mystring def_lua_judge; // lua判断异常脚本
|
||
bool use_lua_judge; // 是否使用lua脚本
|
||
mystring config_path; // 配置文件夹
|
||
mystring device_type; // 设备类型
|
||
int moter_count; // 电机步数
|
||
int uart_bsp; // 串口波特率
|
||
int auto_test; // 自动测试
|
||
int coder_return_mode; // 赋码仪返回模式0精简,1完整
|
||
int slave_addr_start; // 赋码仪起始地址0,1
|
||
QList<int> production_info; // 生产信息
|
||
mystring def_jwt_app; // 默认jwt程序
|
||
int slave_scheme_ext; // 小板使用方案扩展
|
||
};
|
||
|
||
mycfg *syscfg();
|
||
|
||
#endif // MYCFG_H
|