fingerprintzkemkeeper

How to trigger event when device gets disconnected. like Network failure/ Machine power off with Zkemkeeper


I want to know if device gets disconnedted by Power failure/Network Cable Disconnect/ Or any thing except specifically calling CZKEMClass.Disconnect().


Solution

  • No, you cannot get it by default. The disconnect event triggered for now is through a software interrupt. So, when the device is disconnected, you won't get the event triggered. But you can write a small worker thread which will check the connection status in an interval, once connection-status is found as disconnected, you can trigger the event internally.