Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

RTServerImpl Class Reference

List of all members.

Detailed Description

Basic implementation of the RTServer interface.

Definition at line 26 of file RTServerImpl.hh.

Public Member Functions

 RTServerImpl (CORBA::ULong deadline_us, const CORBA::ULong *compute_us, unsigned int compute_us_length)
 Construct an RTServerImpl with the given values.

virtual void Periodic (void) throw (CORBA::SystemException)
 Consume the number of microseconds specified by rts_Compute.data[rts_Compute.index].


Protected Attributes

CORBA::ULong rts_Deadline
 The server's deadline, in microseconds.

struct {
   const CORBA::ULong *   data
   unsigned int   length
   unsigned int   index
rts_Compute
 The description of the computation to be done.


Constructor & Destructor Documentation

RTServerImpl::RTServerImpl CORBA::ULong  deadline_us,
const CORBA::ULong *  compute_us,
unsigned int  compute_us_length
 

Construct an RTServerImpl with the given values.

Parameters:
deadline_us The server's deadline, in microseconds.
compute_us An array that describes the number of microseconds of CPU to consume for each period. When the end of the array is reached, the server will cycle back to the beginning of the array. The array is kept by reference and not copied.
compute_us_length The number of elements in the 'compute_us' array.

Definition at line 186 of file RTServerImpl.cc.

References FindMHZ(), MHZ, require, rts_Compute, and rts_Deadline.

Here is the call graph for this function:


Member Function Documentation

void RTServerImpl::Periodic void   )  throw (CORBA::SystemException) [virtual]
 

Consume the number of microseconds specified by rts_Compute.data[rts_Compute.index].

Side Effects:
rts_Compute.index is incremented.
Its only purpose in life is to consume some amount of CPU time so that the broker has something to monitor and adapt to.

Definition at line 203 of file RTServerImpl.cc.

References cycle_time, rdtsc(), and us_to_cycle().

Here is the call graph for this function:


Member Data Documentation

const CORBA::ULong* RTServerImpl::data [protected]
 

The array passed into the constructor.

Definition at line 69 of file RTServerImpl.hh.

unsigned int RTServerImpl::index [protected]
 

The next index in the array to use.

Definition at line 72 of file RTServerImpl.hh.

unsigned int RTServerImpl::length [protected]
 

The number of elements in the array.

Definition at line 71 of file RTServerImpl.hh.


The documentation for this class was generated from the following files:
Generated on Mon Dec 1 16:30:39 2003 for CPU Broker by doxygen 1.3.4