Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道设备是否因电源故障/网络电缆断开/或除专门调用 CZKEMClass.Disconnect() 之外的任何事情而中断。
不,默认情况下您无法获取它。现在触发的断开事件是通过软件中断。因此,当设备断开连接时,您不会触发事件。但是你可以编写一个小的工作线程,它会在一个时间间隔内检查连接状态,一旦发现连接状态为断开连接,你可以在内部触发事件。