[OPUS]

Ioavail_event - An internally handled event generated when a process exits IOWAIT state.


Availability:

This class is available for the OPUS Blackboard API. The initial OPUS 2.0 release is described here

Constructors:
Ioavail_event( )
~Ioavail_event( )

Methods:
clone( ) create copy of object
add_callback( ) assign Event callback
process( ) process this Event
pstat_mesg( ) get PSTAT status

Description

An internally handled PSTAT Event that is generated when the application's PSTAT contains a Proc_stat set to the value Proc_stat::IOWAIT. When a Ioavail_event is generated, the Opus_env object catches the exception and completes processing.

Derived from

Event

See Also:


Ioavail_event::Ioavail_event - The Ioavail_event constructor.

Synopsis


Ioavail_event::Ioavail_event(
                           Blackboard* bbrd) // I - pointer to PSTAT
                                             //     Blackboard

Ioavail_event::Ioavail_event(
                           Blackboard* bbrd,        // I - pointer to PSTAT
                                                    //     Blackboard
                           const string& s,         // I - Trigger name
                           const vector<Entry*>& v) // I - applications's
                                                    //     PSTAT

Description

These methods create either a Ioavail_event object to be used as a factory or in response to an actual event. In the former case, only the blackboard on which this event occurs need be specified-- the object can then be used to create clones whenever a real event occurs. In the case of a real event, the trigger name and the vector of entry objects that are responsible for the event also are specified.

Warning: no checks are made that the correct blackboard type and entry types are used as calling arguments.

Exceptions Thrown

none


Ioavail_event::~Ioavail_event - The Ioavail_event destructor.

Synopsis


Ioavail_event::~Ioavail_event()

Description

This method destroys the object.

Exceptions Thrown

none


Ioavail_event::clone - Create a copy of this object.

Synopsis


Event* Ioavail_event::clone() const

Event* Ioavail_event::clone(
                           const string& s,         // I - Trigger
                                                    //     name
                           const vector<Entry*>& v) // I - triggers
                           const

Description

These methods create a new Ioavail_event object off the heap using the constructor with the same signature. The caller should delete the new object when it is no longer needed.

Returns

    A pointer to the new Ioavail_event object.

Exceptions Thrown

Internal_event - if the clone method containing triggering entries is used


Ioavail_event::pstat_mesg - Get Proc_stat object for updating the application's PSTAT status field.

Synopsis


Proc_stat* Ioavail_event::pstat_mesg() const

Description

This method creates a new Proc_stat object containing Proc_stat::IDLE. The caller should delete the Proc_stat object when it is no longer needed.

Returns

    A pointer to the Proc_stat object.

Exceptions Thrown

none


Ioavail_event::add_callback - Register the callback funtion for event processing.

Synopsis


void Ioavail_event::add_callback(
                                void (*pf)(const string&, // I - callback
                                           Event*, const Opus_env&))

Description

This method takes a function pointer that will serve as a callback function for all events of this type. The callback function foo must have a signature and return type of

     void foo(const string&, Event*, const Opus_env&) 
This method is static and specifies a callback function for all File_event objects until it is replaced.

Exceptions Thrown

none


Ioavail_event::process - Process the event.

Synopsis


void Ioavail_event::process(
                           const Opus_env& oenv) // I - Opus_env object 

Description

No processing of this Event is required-- this method simply returns without doing anything.

Exceptions Thrown

none


OPUS API index · STScI Home Page · Search · Topics · Index

Copyright © 1997-2000 The Association of Universities for Research in Astronomy, Inc. All Rights Reserved.


For more information, contact opushelp@stsci.edu

Last modified: 25 April 2000