Privacy and Security Notice

Archived Messages for CDEV_1997@cebaf.gov: Re: timeout in ScriptService "send"

Re: timeout in ScriptService "send"

Walt Akers (akers@CEBAF.GOV)
Thu, 20 Mar 1997 14:28:15 -0500 (EST)

MIME-version: 1.0
Content-type: TEXT/PLAIN; CHARSET=US-ASCII

>
> Walt,
> I've been working with the ScriptService and have a comment about
> the timeout used in the send method.
>
> For my application I'd like to use the ScriptService to
> perform routine observatory operations that may take a long (> several
> minutes) to complete - such as moving the telescope to a "parked"
> position. In such cases I believe that I really do want to block on
> the send since I may want to automatically sequence other operations
> after the telecope move is complete.
>
> Is there a specific reason for the use of a timeout with the
> Script Service?
>
> Aloha,
> Peregrine
>
Yes... In the event that a transmission error or a network error
or some sort of endless loop or something happens, a timeout
prevents CDEV from waiting forever for the event to complete...

However, in the case of the ScriptService, it would not be
unreasonable to remove the timeout period from the service... (As
long as you don't have any screens that need updating)

The preferred approach would be to create a callback object that sets
a semaphore - use sendCallback to transmit the message - and then wait
for the semaphore to be set... You could test the semaphore inside
a loop that does CDEV polling and display updates...

Walt

--
=============================================================
Walt Akers Voice: (757)269-7669 E-Mail: akers@cebaf.gov
Thomas Jefferson National Accelerator Facility
12000 Jefferson Avenue, MS 16A
Newport News, Va 23606
=============================================================