资源简介
本测试程序采用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卡个人化
评论
共有 条评论