Uniface on GitHub
Fixes and Updates
Author: firstname.lastname@example.org (robatwork)
We have an 9.06 Uniface application running on Linux (Centos 6.5), is there an ASN setting similar to $timeout to enable an apexit after x seconds of inactivity. Rob
There is not. Please tell us more about your problem so we can help you think of alternative solutions.
Hi Rob, The $timeout ASN setting is indeed only available on MS Windows and Open VMS (in character mode) and has a limitation of 1 to 60 minutes, allthough I have made an alternative once that covered 1 minute up until (almost) infinity by adding some code to the startup shell and the async trigger. This alternative also only works on Windows, because it still uses the $timeout setting (fixed at 1 minute and then multiplied) as a base, sorry.... But like Theo says, tell us more about what you're trying to achieve and we'll think along with you for alternatives. I'm not completely sure if the Asynchronus Interrrupt trigger works on non-Windows platforms, but if it does, I'm thinking of an alternative using postmessage statements, or something along that line.
Hi, We are using the CHR interface on the Centos box for an RF warehousing app, we just want to log the session off after x minutes of inactivity. Regards Rob
Hello Arjen, Sound interesting, would you share your code extending the $timeout? Regards Jean-Luc
You would have to build a solution yourself, maybe something like this: Use the UTIMER component to send messages to a component at regular intervals. You would have to make some sort of activity counter. Maybe a global variable that you increase each time there is activity. When you get the message you can check if your counter has gone up. If not then you terminate the application. Determining what you see as "activity" will be the most difficult part.
Hi Jean-Luc, Please check the Community Samples section... Best regards, Arjen
Hi Arjen, Found it. We'll have a look into this. Thanks Jean-Luc
In addition to the sample I have uploaded, I would like to add that I have chosen my 'base frequency' to be 1 minute, so that the sample is more understandable to everybody. The downside of this 1 minute base frequency is that long time-outs are a sort of addition of several 1 minute cycles, which could lead to less precision for the long haul. As the community samples are a kind of open source, everybody is free to change the base frequency for example to a 15 min. base. In this case multiplying the base frequency by 16 would lead to a 4 hour time out (16 x 15 = 120). Increasing the base frequncy would lead to better accuracy in the long run, but of course less precise definition of the time out (15 min blocks instead of 1 min blocks). Steps to change to a 15 min. base frequency:
© 2021 Uniface Privacy & Cookies | Privacy Statement | Legal