You want to know how this is implemented in Lenvica HRMS??
It's a secret, but I'll explain it for you ;D
Lenvica HRMS has an in-built tool called 'Attend Communicator'. The communicator's sole task is to talk to/listen to devices.
Devices are of several types. Some devices will inform the communicator when there is a new punch. Some others will not inform, but then communicator will talk to them in regular intervals to see if there is new data.
The communicator is intelligent enough to handle all these devices. The other part of Lenvica HRMS doesn't care much about the devices, but the data.
Hope it's clear.