From e57938fbda9bff702004038f76d009422968bff5 Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期五, 06 十一月 2026 18:05:07 +0800
Subject: [PATCH] 提交代码

---
 DeviceService.Core/IDevice.cs |   46 ++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 46 insertions(+), 0 deletions(-)

diff --git a/DeviceService.Core/IDevice.cs b/DeviceService.Core/IDevice.cs
new file mode 100644
index 0000000..4b1c29b
--- /dev/null
+++ b/DeviceService.Core/IDevice.cs
@@ -0,0 +1,46 @@
+锘縰sing System;
+
+namespace DeviceService.Core
+{
+    /// <summary>
+    /// 璁惧鐘舵��
+    /// </summary>
+    public enum DeviceStatus
+    {
+        Ready = 0,
+        Idle = 1,
+        Busy = 2,
+        Error = 3,
+    }
+
+    /// <summary>
+    /// 璁惧璁块棶绫诲瀷
+    /// </summary>
+    public enum AccessType
+    {
+        Share = 0,
+        Exclusive = 1
+    }
+
+    public interface IDevice
+    {
+        /// <summary>鏁版嵁搴撹嚜澧炰富閿紙Config\Devices.db 鐨� Device.Id锛夛紝0 琛ㄧず灏氭湭鍏ュ簱銆�</summary>
+        long Id { get; }
+
+        string DeviceId { get; }
+        string Type { get; }
+        string Brand { get; }
+        string ConnectStr { get; }
+
+        DeviceStatus Status { get; }
+
+        AccessType AccessType { get; }
+
+        bool Init(out string msg);
+
+        bool Open(out string msg);
+        bool Close(out string msg);
+
+        ResponseData HandleRequest(RequestData req);
+    }
+}

--
Gitblit v1.9.1