资源简介
本测试程序采用Qt写的界面,版本Qt5.9.4。主要实现上位机软件与真实PLC(S7-1200)通讯。针对不同指令测试,如果需要根据自己的需求,代码中已经写好了注释,在什么位置修改。源码有几处可以优化的地方。

代码片段和文件信息
//
// Bismillah ar-Rahmaan ar-Raheem
//
// Easylogging++ v9.96.4
// Cross-platform logging library for C++ applications
//
// Copyright (c) 2012-2018 Muflihun Labs
// Copyright (c) 2012-2018 @abumusamq
//
// This library is released under the MIT Licence.
// https://github.com/muflihun/easyloggingpp/blob/master/LICENSE
//
// https://github.com/muflihun/easyloggingpp
// https://muflihun.github.io/easyloggingpp
// http://muflihun.com
//
#include “easylogging++.h“
#if defined(AUTO_INITIALIZE_EASYLOGGINGPP)
INITIALIZE_EASYLOGGINGPP
#endif
namespace el {
// el::base
namespace base {
// el::base::consts
namespace consts {
// Level log values - These are values that are replaced in place of %level format specifier
// Extra spaces after format specifiers are only for readability purposes in log files
static const base::type::char_t* kInfoLevelLogValue = ELPP_LITERAL(“INFO“);
static const base::type::char_t* kDebugLevelLogValue = ELPP_LITERAL(“DEBUG“);
static const base::type::char_t* kWarningLevelLogValue = ELPP_LITERAL(“WARNING“);
static const base::type::char_t* kErrorLevelLogValue = ELPP_LITERAL(“ERROR“);
static const base::type::char_t* kFatalLevelLogValue = ELPP_LITERAL(“FATAL“);
static const base::type::char_t* kVerboseLevelLogValue =
ELPP_LITERAL(“VERBOSE“); // will become VERBOSE-x where x = verbose level
static const base::type::char_t* kTraceLevelLogValue = ELPP_LITERAL(“TRACE“);
static const base::type::char_t* kInfoLevelShortLogValue = ELPP_LITERAL(“I“);
static const base::type::char_t* kDebugLevelShortLogValue = ELPP_LITERAL(“D“);
static const base::type::char_t* kWarningLevelShortLogValue = ELPP_LITERAL(“W“);
static const base::type::char_t* kErrorLevelShortLogValue = ELPP_LITERAL(“E“);
static const base::type::char_t* kFatalLevelShortLogValue = ELPP_LITERAL(“F“);
static const base::type::char_t* kVerboseLevelShortLogValue = ELPP_LITERAL(“V“);
static const base::type::char_t* kTraceLevelShortLogValue = ELPP_LITERAL(“T“);
// Format specifiers - These are used to define log format
static const base::type::char_t* kAppNameFormatSpecifier = ELPP_LITERAL(“%app“);
static const base::type::char_t* kLoggerIdFormatSpecifier = ELPP_LITERAL(“%logger“);
static const base::type::char_t* kThreadIdFormatSpecifier = ELPP_LITERAL(“%thread“);
static const base::type::char_t* kSeverityLevelFormatSpecifier = ELPP_LITERAL(“%level“);
static const base::type::char_t* kSeverityLevelShortFormatSpecifier = ELPP_LITERAL(“%levshort“);
static const base::type::char_t* kDateTimeFormatSpecifier = ELPP_LITERAL(“%datetime“);
static const base::type::char_t* kLogFileFormatSpecifier = ELPP_LITERAL(“%file“);
static const base::type::char_t* kLogFilebaseFormatSpecifier = ELPP_LITERAL(“%fbase“);
static const base::type::char_t* kLogLineFormatSpecifier = ELPP_LITERAL(“%line“);
static const base::
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1023 2018-10-24 16:06 .qmake.stash
目录 0 2018-10-29 18:02 debug\
文件 954 2018-09-06 16:00 debug\logger.conf
目录 0 2018-10-29 17:42 dialog\
文件 32141 2018-10-29 17:42 dialog\modbustcpdialog.cpp
文件 3347 2018-10-29 17:30 dialog\modbustcpdialog.h
文件 421 2018-10-24 17:23 dialog\modbustcpdialog.ui
文件 1200 2018-10-26 14:32 dialog\statusbar.cpp
文件 948 2018-08-27 10:22 dialog\statusbar.h
文件 521 2018-08-27 10:22 dialog\statusbar.ui
文件 121481 2018-04-02 17:19 easylogging++.cpp
文件 179497 2018-04-02 17:19 easylogging++.h
文件 1110 2018-10-24 11:11 errorcode.h
目录 0 2018-10-29 08:51 icons\
文件 4286 2018-08-27 10:22 icons\32.ico
文件 484 2018-10-25 18:56 main.cpp
文件 26516 2018-10-29 16:24 Makefile
文件 74762 2018-10-29 16:24 Makefile.Debug
文件 74904 2018-10-29 16:24 Makefile.Release
文件 43 2018-08-27 10:04 minresource.rc
文件 2975 2018-10-29 17:37 modbusadapter.cpp
文件 1515 2018-10-29 17:38 modbusadapter.h
文件 1387 2018-10-25 19:02 ModbusAdapterTCP.pro
文件 23715 2018-10-29 18:03 ModbusAdapterTCP.pro.user
文件 105267 2018-10-27 23:25 ModbusAdapterTCP.pro.user.0d40620
文件 8454 2018-10-29 16:25 myeasylog.log
目录 0 2018-10-29 18:03 release\
文件 954 2018-09-06 16:00 release\logger.conf
目录 0 2018-10-24 18:08 ui\
文件 1388 2018-10-29 15:19 ui_modbustcpdialog.h
文件 1337 2018-10-29 15:19 ui_statusbar.h
............此处省略0个文件信息
- 上一篇:易语言的DX11 HOOK
- 下一篇:ic卡个人化
相关资源
- Qt界面外观
- [嵌入式Linux项目实战开发]基于QT4.7.
- Qt GUI 界面通用系统模板 源码
- 网上的一款QT界面设计的电子地图
- 二维码解析
- linux下关于Qt界面的摄像头v4l2操作源码
- 360UI完美界面
- 净化设备管理
- 基于qt界面的语音交互软件
- 综合组件的界面
- opencv打开图片并显示在Qt界面上
- Qt360 界面
- 动态绘制曲线
- QtitanRibbon3.zip
- VS+QT环境下读取excel文件到QT界面,并
- 基于嵌入式QT界面GPS定位系统
- [嵌入式Linux项目实战开发]基于QT4.7.
- 物联网 智能家居 Qt界面
- 将QT界面做成dll在qt其他程序中调用
-
将xm
l内容显示Qt界面 - DS18B20测温及QT界面实现
- qt界面跳转切换
- 基于v4l的视频采集显示程序。外加Q
- QT计算器界面和计算器功能实现
- qt界面连接wifi
- myseria串口
- 基于Qt界面显示的温湿度检测
- Qt界面多线程opencv调用摄像头
- 智慧大棚QT界面设计
- Qt高仿网易云音乐界面源码
评论
共有 条评论