# jtest **Repository Path**: 502959937/jtest ## Basic Information - **Project Name**: jtest - **Description**: No description available - **Primary Language**: C++ - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2016-01-21 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## todo 1. [boost](http://zh.highscore.de/cpp/boost/) 2. [muduo](http://blog.csdn.net/solstice/article/details/5848547) 3. [qt5](http://doc.qt.io/qt-5/gettingstarted.html) 4. [sqllite](http://blog.csdn.net/u011192270/article/details/48086961) 5. [cmake](http://blog.atime.me/note/cmake.html) 1. boost thread 使用(绑定函数) ok 2. log4cplus 3. thread_pool 4. muduo 5. qt5 6. [cmake find protobuf](https://cmake.org/cmake/help/v3.1/module/FindProtobuf.html) 7. [cmake find qt5](https://cmake.org/cmake/help/v3.0/manual/cmake-qt.7.html) 8. [cmake find boost](https://cmake.org/cmake/help/v3.0/module/FindBoost.html) ### cmake && MakeLists.txt ``` #测试生成lib AUX_SOURCE_DIRECTORY(${PROJECT_SOURCE_DIR}/lib lib_src) ADD_LIBRARY(hello STATIC ${lib_src}) ADD_LIBRARY(hello_h SHARED ${lib_src}) SET(LIBRARY_OUTPUT_PATH ../bin) cmake_minimum_required(VERSION 3.2) project(jtest CXX) set(appname tt) MESSAGE(STATUS "this is project source dir" ${PROJECT_SOURCE_DIR}) MESSAGE(STATUS "this is binary dir" ${PROJECT_BINARY_DIR}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") # path ,var search src file AUX_SOURCE_DIRECTORY(src src) #lib下查找cmakelists.txt add_subdirectory(lib) #执行输出目录 MESSAGE(STATUS "path is :" ${PROJECT_BINARY_DIR}) #执行文件输出路径 set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) #生成可执行文件 (可执行文件名称) ,source_file 源文件列表 message(STATUS "out:" ${EXECUTABLE_OUTPUT_PATH}) #protobuf header and lib path # lib project LINK_DIRECTORIES( ${PROJECT_SOURCE_DIR}/lib ) INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/inlcude ) MESSAGE(STATUS "linck libL:" ${PROJECT_SOURCE_DIR}/lib) #生成可执行文件 add_executable(tt ${src}) #boost gudie http://zh.highscore.de/cpp/boost/ #https://cmake.org/cmake/help/v3.0/module/FindBoost.html #how to find boost inclides and lib set(Boost_USE_STATIC_LIBS ON) # only find static libs set(Boost_USE_MULTITHREADED ON) set(Boost_USE_STATIC_RUNTIME OFF) find_package(Boost COMPONENTS date_time thread system filesystem exception timer log log_setup) if (Boost_FOUND) message(STATUS "Boost_INCLUDE_DIR:" ${Boost_INCLUDE_DIR}) include_directories(${Boost_INCLUDE_DIRS}) target_link_libraries(${appname} ${Boost_LIBRARIES}) MESSAGE(STATUS "Boost_LIBRARIES: " ${Boost_LIBRARIES}) endif () #find qt #https://cmake.org/cmake/help/v3.0/manual/cmake-qt.7.html target_link_libraries(${appname} libhello.a) IF (LINUX) target_link_libraries(${appname} libhello_h.so) ELSEIF (MACOSX OR APPLE) target_link_libraries(${appname} libhello_h.dylib) ENDIF () ``` 1. 485通讯 半双工 -- 柜控板地址 (柜机配置界面 配置485地址 应用层地址); 4. TCP (muduo) 485通讯: 主控发起(轮休 间隔 ms) , 柜控被动(状态) ; 主控 :队列 Cabinet 3. 232全双工通讯 串口通讯 : 扫码头(放 LcdCodeBar 取:UartCodeBar) ,(bill_view) 打印机, (bill_view)取餐(串口屏) 5. 放餐面键盘不处理 (qt捆绑); 取餐键盘(KeyBoard) 6. TminalSetting (终端配置文件) --- 7.