• Enform related

    From Pradeep Kumar@21:1/5 to All on Fri Mar 26 07:14:26 2021
    Hi
    Can we write enform in which the data comes in real time and continues until we stop . any idea

    Kumar

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Keith Dick@21:1/5 to kumar.pra...@gmail.com on Fri Mar 26 08:35:21 2021
    On Friday, March 26, 2021 at 7:14:28 AM UTC-7, kumar.pra...@gmail.com wrote:
    Hi
    Can we write enform in which the data comes in real time and continues until we stop . any idea

    Kumar

    I do not recall any option in Enform that offers that capability.

    The only approach that occurs to me is that if Enform can accept a process name as its data file, then you probably could write a process that reads the data file you are interested in and uses the records read from the data file as the contents of
    replies to $RECEIVE. This program you would write could react to getting EOF on the data file by pausing for a short time, then trying to read from the data file again.

    Writing that program would be pretty simple for anyone who is familiar with writing a server program -- there just would be no data in the "requests" it reads from its $RECEIVE. The thing I don' t know is whether ENFORM would accept a process name for
    its data file.

    If ENFORM does not accept a process name for its data file, going further into speculative territory, it might be possible to have that program that you would write make use of the feature that allows it to receive and respond to DEVICEINFO requests to
    get it to respond with the device type of a disk file (or some other device type that ENFORM would accept). I don't remember whether that device type masquerading feature allows a process to pretend to be a disk file.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Henrik_Paludan=2DM=C3=B8r@21:1/5 to All on Mon Apr 5 11:43:05 2021
    fredag den 26. marts 2021 kl. 15.14.28 UTC+1 skrev kumar.pra...@gmail.com:
    Hi
    Can we write enform in which the data comes in real time and continues until we stop . any idea

    Kumar
    Hi Kumar.
    i think you will not have success with this approach. Rather, you might want to look into writing a report program that uses the ctrl-27 faciities to "wake up" when a file is changed. that way, you can continouosly write from the file, even if it is
    still being written.

    //Henrik P

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Keith Dick@21:1/5 to kilg...@gmail.com on Mon Apr 5 12:51:34 2021
    On Monday, April 5, 2021 at 11:43:06 AM UTC-7, kilg...@gmail.com wrote:
    fredag den 26. marts 2021 kl. 15.14.28 UTC+1 skrev kumar.pra...@gmail.com:
    Hi
    Can we write enform in which the data comes in real time and continues until we stop . any idea

    Kumar
    Hi Kumar.
    i think you will not have success with this approach. Rather, you might want to look into writing a report program that uses the ctrl-27 faciities to "wake up" when a file is changed. that way, you can continouosly write from the file, even if it is
    still being written.

    //Henrik P

    If you are willing to write a non-Enform report program, I believe it is not necessary to utilize the Control 27 feature in such a program to make it work well. A simple approach of delaying a short time when the read of the next record from the input
    file returns the EOF status code, then trying to read from the input file again should work very well. Making the delay time be some constant value around 0.1 second to 1 second probably would work well, and would be very simple to implement.

    If you find that checking for a new input record that frequently when no new data is arriving puts more of a load on the system than you want to accept (I kind of doubt that would be a problem), it is not very much more complicated to make the delay time
    start as, for example, 0.1 second, and if you get EOF for 5 consecutive read attempts, switch the delay time to a larger value, perhaps 5 seconds or 10 seconds. That should reduce any system load from polling for new input to a completely insignificant
    level. (If you take the adjustable delay approach, be sure to set the delay time back to the low value whenever you have a read that actually returns a record rather than EOF).

    There certainly are use cases where Control 27 is very useful. However, I don't believe this is one of them..

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)