LineSetSafetyTimer |
Top Previous Next |
Message
LineSetSafetyTimer <linenumber>|<alias> <time> on|off
Originator
Client
Response
Info: line <line> will be switched off after <time> ms of inactivity SyntaxError: something wrong with SafetyTimer call Error: invalid line <linenumber> Error: you do not own line <linenumber> Error: line <linenumber> is not an output line
Response (immediate socket)
Success Failure
Example
SafetyTimer PUMP 5000 off
This tells the server to ensure that PUMP is always switched off if its state has not been set by the client in the last 5 s. (The timer continually compares the current time with a record of when the line last had its state set, or was claimed by a client.)
If the safety timer is triggered, a warning message will be sent to the client, as in the following example:
Warning: line 6 switched OFF after 5000 ms of inactivity
Group aliases may be used, though that seems to me like an odd thing to do.
Important note: this feature only operates while the server thinks the client is connected. It provides some protection against a mis-programmed client (including a client that crashes but leaves the link to the server open) or a network failure. If the device is really critical, like an i.v. pump, you should also specify a reset state when you claim the line; for example,
LineClaim 5 output ResetOff –alias PUMP
In this situation, when the client releases the line or client-server communication is lost, the line will be reset to the off state. Use both these commands for maximum safety.
Revision history
Implemented in WhiskerServer version 1 as SetSafetyTimer. Renamed in WhiskerServer version 2.3.
See also
|