| > Hi all,
> I've written an action-routine and wonder how X is involved,
> since we have to link it with X-libraries).
> If I remember correct, the recomendations, when using X, is not
> to use AST:s. Is this correct? If it is, can I use the
> 'work-procedure'-mechanism in X within an action-routine?
This is news to me. The EVentlist action routine ( an X-application as
you probably know) utilizes the PCM API which relies heavily on AST's
to communicate with the ENS Daemon.
> What I want to do in the action-routine is the following:
> 1. when an event is received there's some setup done.
> 2. The event is processed
> 3. a link to the DECmcc system is established
> 4. The processed event is sent to DECMcc
> 5. disconnect the link.
> The ting is that steps 3-5 are quite slow, and when a burst of
> events are comming I don't want to do steps 3 and 5 over and over
> again, rather I'd like to keep sending the events as they come
> and when there are no more events to send (i.e. no events within
> a specified time-frame) the link is disconnected.
> I've been thinking on using threads, or a work-procedure or an
> AST-routine triggered by a timer....
> Can this be done? How should I proceed? WHich route to take?
> Thanks for any comments
> /Nils
Nils,
Why can't you just leave the link up? If you have to disconnect the
link I see no reason why you can't use a timer routine. Your event
received callback will have to do two things:
1. Cancel an outstanding timer.
2. if there was no timer, then the link is probably gone so reestablish
the link
3. Send the event to MCC
4. Restart the timer
Regs,
Dan
2. send the event
|