Hi,
I have a long term background task relating to the safety of programmers (me and you) working alone for significant parts of the day, during which a medical emergency could arise.
As part of this I need to detect if the computer has received a mouse or keyboard input to any application. The detection needs to be carried out by a small background task that will not cause AntiVirus software to kick off. As a guide, the monitoring interval needs to be in the order of a minute. (Probability of recovery from a stroke goes down 10% per minute without intervention.)
The same task will be checking PIR motion sensors, pinging a comms path to the first responder (to confirm a help message could be sent) and other things.
I am NOT intending to produce a safety critical item, but on the balance of probabilities I would rather have a dumb bit of software checking I'm alive and kicking rather than cooling down on the floor!
Any ideas or suggestions would be welcome...
Regards,
RichardL
Safety while working alone
Re: Safety while working alone
Here I see a problem with computers and the operating systems (Windows, Linux, Mac)
These are NOT always fully available. This means that they are not real-time operating systems.
An alternative would be to avoid micro-controllers.
In the industry there are controllers that can also communicate over a network and process various sensors.
The programming can be carried out via Codesys.
Redundant systems are also possible.
In any case, micro controllers are more reliable. But there can be no absolute security.
Translated with www.DeepL.com/Translator
These are NOT always fully available. This means that they are not real-time operating systems.
An alternative would be to avoid micro-controllers.
In the industry there are controllers that can also communicate over a network and process various sensors.
The programming can be carried out via Codesys.
Redundant systems are also possible.
In any case, micro controllers are more reliable. But there can be no absolute security.
Translated with www.DeepL.com/Translator
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: Safety while working alone
Did you look into smartwatches/fitness trackers? They monitor heart rate and they also have motion sensors, bluetooth...
Re: Safety while working alone
Here's a start..
But what if I need to go get a coffee, or have a bowel movement?
Code: Select all
Procedure.l GetIdleTime() ; Returns the time, in MS, since the last input was received.
Protected lipi.LASTINPUTINFO
lipi\cbSize = SizeOf(LASTINPUTINFO)
GetLastInputInfo_(@lipi)
ProcedureReturn (GetTickCount_() - lipi\dwTime)
EndProcedure
Procedure _EXAMPLE_DETECT_KBM_IDLE(MaxTimeMS.l = 60000) ; Loop runs until you Don't provide input for 60 straight seconds, then quits.
Repeat
If GetIdleTime() >= MaxTimeMS
Debug "IDLE TIMEOUT!"
Break
EndIf
Delay(1)
ForEver
Debug "Call For Help!"
EndProcedure
_EXAMPLE_DETECT_KBM_IDLE()
SolveMyIssue_() - No QuickHelp available.