[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference csc32::consolemanager

Title:POLYCENTER Console Manager
Notice:Kits, Scans, Docs on CSC32:: as PCM$KITS:,PCM$DOCS:, PCM$SCANS:
Moderator:CSC32::BUTTERWORTH
Created:Thu Aug 06 1992
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1541
Total number of notes:6564

309.0. "How to get an ENS event asynchronously (vax/vms) ?" by LIL08::MALRAS (Knowledge is power, en France aussi) Wed Jul 20 1994 16:35

I'd like to get an ENS event asynchronously, via an AST. Is it possible ?

My understand as i read CM documentation is that it is not possible, unless
using Threads.

Thanks for a quick answer.

Jean-Francois.
T.RTitleUserPersonal
Name
DateLines
309.1I think soZENDIA::DBIGELOWInnovate, Integrate, EvaporateWed Jul 20 1994 16:5617
    Jean-Francois,
    
    My guess is that you can. I'm guessing because I am familiar with how
    the ENS actions work, but not an expert. 
    
    First, you'll need to write a permanent action routine. This will
    stay running permanently and has the capability to receive all events
    or only specific events. Now for the uncertain part. If ENS takes
    control of your program, and only gives you control when an event
    happens, then you'll have to write another program as well and
    communicate via a mailbox or pipe. this would give you the asynchronous
    behavior you are looking for.
    
    Perhaps the developer, Phil, can fill you in with a few more details.
    
    Dave
    
309.2very complicated ... may be another way ?LIL08::MALRASKnowledge is power, en France aussiWed Jul 20 1994 17:3410
Dave, you're right, but it is not I was expecting.

I always hope another (undocumented ?) way to get asynchronously an event like
VCS did.

My reason is I don't want to rewrite my whole VCS application.

Any idea ? 

JF
309.3OPG::PHILIPAnd through the square window...Wed Jul 20 1994 18:2113
  Whats complicated about it? I deliberately made it simpler
  to use that when I wrote the VCS interface to ENS! all that
  messing about reading mailboxes was too messy and got a lot
  of people into complications.

  Exactly what is your application trying to do, maybe I can
  come up with an easy way of using the interfaces we provide?

Cheers,
Phil


309.4More info ...LIL08::MALRASKnowledge is power, en France aussiThu Jul 21 1994 10:5721
My application is Fortran written.

Main module is :

	initializations ...
	 	create mbx with write attention (ast set EF_mbx)
		vcs$get_event with ast (ast set EF_ens)
		set timer with ast (ast set EF_timer)

	loop = .true.
	do while (loop)
		waitfor event_flag (EF_ens, EF_mbx, EF_timer)
		if (EF_ens) call sub_ens
		if (EF_mbx) call sub_mbx
		if (EF_timer) call sub_timer
	enddo
	end

And I'd like to migrate VCS into PCM ..., without breaking my code.

Regards. JF
309.5OPG::PHILIPAnd through the square window...Thu Jul 21 1994 11:2914
 
 Hmm, tricky, off hand, I cant think of an easy way to do what
 you want, short of performing your mbx and timer stuff inside
 an ast routine, which isnt to clever.

 I guess what you need is a way to hook stuff into our CMMainLoop
 code, like timers and other inputs.

 Well, Timers I can do for you via some undocumented stuff if you
 want, but, the other inputs stuff will have to wait until at
 least the next major release of the software.

Cheers,
Phil
309.6So waiting next release - Thanks PhilLIL08::MALRASKnowledge is power, en France aussiThu Jul 21 1994 15:210