2 İşlemeler 8141008f96 ... 5a02822a2a

Yazar SHA1 Mesaj Tarih
  lijinwen 5a02822a2a 改名 2 ay önce
  lijinwen 1c25ac17b6 改名 2 ay önce

+ 0 - 0
BaseEnums/Channels.h → BaseEnums/channels.h


+ 0 - 53
BaseHelper/Loger.h

@@ -1,53 +0,0 @@
-// // ******************************************************************
-// //       /\ /|       @File         Loger.h
-// //       \ V/        @Brief
-// //       | "")       @Author        lijinwen, ghz005@uni-trend.com.cn
-// //       /  |        @Creation      2024-05-16
-// //      /  \\        @Modified      2024-06-24
-// //    *(__\_\
-// // ******************************************************************
-
-#pragma once
-
-#include <iostream>
-#include <fstream>
-#include <mutex>
-#include <filesystem>
-#include <string>
-
-#include <chrono>
-#include <cstdarg>
-#include <iomanip>
-#include <sstream>
-#include <cstdlib> // 对于std::put_time的tm结构体定义
-
-#include "../BaseEnums/loger_enums.h"
-
-namespace Fs = std::filesystem;
-
-namespace Protocol
-{
-    class Loger
-    {
-    public:
-        Loger();
-
-        static void Log(const std::string& message);
-
-        ~Loger();
-
-        inline static auto LogLevel = LogLevel::All;
-
-    private:
-        std::string LogPath_;
-        std::string LogFileName_; // The full path and filename of the log file.
-        std::ofstream LogFile_;
-        static std::mutex instanceMutex_;
-        static Loger instance_;
-
-        Loger(const Loger&) = delete;
-        Loger& operator=(const Loger&) = delete;
-    };
-
-    void WriteLog(LogLevel level, const char* format, ...);
-}

+ 0 - 0
BaseHelper/Constants.h → BaseHelper/constants.h


+ 0 - 0
ProtocolRS232/Constants.h → ProtocolRS232/constants.h


+ 0 - 46
ProtocolUSB/Constants.h

@@ -1,46 +0,0 @@
-// // ******************************************************************
-// //       /\ /|       @File         Constants.h
-// //       \ V/        @Brief
-// //       | "")       @Author        lijinwen, ghz005@uni-trend.com.cn
-// //       /  |        @Creation      2024-05-17
-// //      /  \\        @Modified      2024-06-24
-// //    *(__\_\
-// // ******************************************************************
-
-#pragma once
-#include <cstdint>
-
-namespace Protocol
-{
-	//差分非对称长度比例阈值
-	constexpr double USB_DIFF_LEN_DIFFERENCE_THRESHOLD = 0.95;
-
-	//最小序列长度
-	constexpr int32_t USB_MINIMUM_SEQUENCE_LENGTH = 12;
-	//时域差异容差阈值
-	constexpr double USB_TIME_DIFFERENCE_THRESHOLD = 0.28;
-	//时域差异容差阈值
-	constexpr double USB_TIME_DIFFERENCE_THRESHOLD_HIGH_SPEED = 0.36;
-	//同步帧长度容差
-	constexpr double USB_SYNC_BIT_TOL = 0.95;
-	//同步帧长度
-
-	//NRZI 连续补位/个数
-	constexpr int32_t USB_NRZI_COMPLEMENT_PER_NUM = 6;
-
-	constexpr int32_t USB_BYTE_BIT_COUNT = 8;
-	constexpr double USB_LOW_SPEED_MHZ = 1.5;
-	constexpr double USB_FULL_SPEED_MHZ = 12;
-	constexpr double USB_HIGH_SPEED_MHZ = 480;
-	//同步帧长度
-	constexpr int32_t USB_USB_SYNC_BIT_MAX_LEN = 32;
-	constexpr int32_t USB_USB_SYNC_BIT_NORMAL_SPEED_LEN = USB_BYTE_BIT_COUNT;
-	constexpr int32_t USB_USB_SYNC_BIT_HIGH_SPEED_LEN = USB_USB_SYNC_BIT_MAX_LEN;
-
-	constexpr int32_t USB_ADDR_BIT_COUNT = 7;
-	constexpr int32_t USB_ENDPOINT_BIT_COUNT = 4;
-	constexpr int32_t USB_FRAMEID_BIT_COUNT = 11;
-	constexpr int32_t USB_CRC5_BIT_COUNT = 5;
-	constexpr int32_t USB_CRC16_BIT_COUNT = 16;
-
-}

+ 46 - 0
ProtocolUSB/constants.h

@@ -0,0 +1,46 @@
+// // ******************************************************************
+// //       /\ /|       @File         Constants.h
+// //       \ V/        @Brief
+// //       | "")       @Author        lijinwen, ghz005@uni-trend.com.cn
+// //       /  |        @Creation      2024-05-17
+// //      /  \\        @Modified      2024-06-24
+// //    *(__\_\
+// // ******************************************************************
+
+#pragma once
+#include <cstdint>
+
+namespace Protocol
+{
+    //差分非对称长度比例阈值
+    constexpr double USB_DIFF_LEN_DIFFERENCE_THRESHOLD = 0.95;
+
+    //最小序列长度
+    constexpr int32_t USB_MINIMUM_SEQUENCE_LENGTH = 12;
+    //时域差异容差阈值
+    constexpr double USB_TIME_DIFFERENCE_THRESHOLD = 0.28;
+    //时域差异容差阈值
+    constexpr double USB_TIME_DIFFERENCE_THRESHOLD_HIGH_SPEED = 0.36;
+    //同步帧长度容差
+    constexpr double USB_SYNC_BIT_TOL = 0.95;
+    //同步帧长度
+
+    //NRZI 连续补位/个数
+    constexpr int32_t USB_NRZI_COMPLEMENT_PER_NUM = 6;
+
+    constexpr int32_t USB_BYTE_BIT_COUNT = 8;
+    constexpr double USB_LOW_SPEED_MHZ = 1.5;
+    constexpr double USB_FULL_SPEED_MHZ = 12;
+    constexpr double USB_HIGH_SPEED_MHZ = 480;
+    //同步帧长度
+    constexpr int32_t USB_USB_SYNC_BIT_MAX_LEN = 32;
+    constexpr int32_t USB_USB_SYNC_BIT_NORMAL_SPEED_LEN = USB_BYTE_BIT_COUNT;
+    constexpr int32_t USB_USB_SYNC_BIT_HIGH_SPEED_LEN = USB_USB_SYNC_BIT_MAX_LEN;
+
+    constexpr int32_t USB_ADDR_BIT_COUNT = 7;
+    constexpr int32_t USB_ENDPOINT_BIT_COUNT = 4;
+    constexpr int32_t USB_FRAMEID_BIT_COUNT = 11;
+    constexpr int32_t USB_CRC5_BIT_COUNT = 5;
+    constexpr int32_t USB_CRC16_BIT_COUNT = 16;
+
+}