class rDD

Subtype of the DD class that implements a DD system, which is located on a remote host.

Inheritance:


Public Methods

[more] Creating and deleting DD systems
[more] Operations on the remote pool
[more] Access to events in the remote pool
[more] Miscellanous member functions. Currently not yet implemented
[more] Functions that return information about the pool
[more]int testTrf( int nWords, int* piArray, int nTimes )
Sends a test block to the DD server.

Public Members

[more]enum eServerCommands
ddn commands are enumated and represented as integers
[more]enum eEndianessCheck
a 32 byte word that is used to determine the endianess of the remote host
[more]enum eSocketSizes
the receive and send socket sizes


Inherited from DD:

Public Fields

ostatic const char* const pccDefaultDDName
ostatic const char* const pccDefaultDDFileName

Public Methods

Member functions for FIFO manipulations

Coordination and control of the DD system

Inserting and accessing events in the pool

Member functions to set/get process specific parameters

Miscellanous member functions

ostatic void printUnsupportedOperation( const char* operation )

Public Members

enums as static data members

Protected Fields

oBOOL is_local
ochar* name
ochar* config_file
ochar* dd_filename
ostatic const char* dd_version


Documentation

Subtype of the DD class that implements a DD system, which is located on a remote host. This class is a proxy class for the DD system on the remote host.
During the creation of the rDD object, an attempt is made to talk to the DD_demon on the remote host. If this is successful, the demon will fork off a DD_server, which establishes a socket connection to the client.
The rDD object then translates all the member functions into a request to this server, which in turn invokes the corresponding member function of his local lDD object.
For example:
Client invokes rdd->get_fev which sends the command eCmdReqFev over TCP/IP to the server, which interprets the command, calls ldd->get_fev and returns the fev object through the socket to the client.
Other classes involved in this passing of commands and data through the socket are:
ddn_cmd encapsulates a command to the server.
ddnFifo_entry which aggregates the Fifo_entry
otnetObject (in package OTOOLS) which provides the abstract interface of a class that is sent through a socket (pretty much like the serializable interface in Java).

oenum eServerCommands
ddn commands are enumated and represented as integers

oenum eEndianessCheck
a 32 byte word that is used to determine the endianess of the remote host

oenum eSocketSizes
the receive and send socket sizes

o Creating and deleting DD systems

o rDD( char* name, const char* mode, char* config_file, char* dd_filename = DEFAULT_DD_FILENAME) throw( DD_Exception )
creator - called by DD::create_dd

o rDD( char* name, const char* mode, char* config_file, const char* dd_filename = DD::pccDefaultDDFileName )
creator w/o exception - called by DD::create_dd

o ~rDD()
dtor

o Operations on the remote pool

oFifo* create_fifo( const char* fifo_name, const char* type = "DYN", Fifo_mode* mode = NULL, int slot_nb = -1)
Creates a fifo to the remote DD pool. In case of a local DD pool the pointer points directly to the fifo in shared memory. This is not possible in the case of a remote DD pool. The routine therefore creates a fifo of type "PROXY", which is just a pointer to a location in memory. This proxy object does not have the full capability of a DD fifo. This means that in the case of a remote pool, the client can still test the return value of this function to check that the DD pool has been created properly. However he can no longer use this pointer to find out more information about the Fifo.
Returns:
Pointer to the PROXY fifo or NULL.

oint delete_fifo( const char* fifo_name = NULL )
Deletes a fifo. See DD::delete_fifo

oFifo_system* get_fifo_system()
Returns a pointer to the fifo system. For an rDD returns always NULL. See DD::delete_fifo

oint fifo_exists( const char* fifoname ) const
Returns true if the fifo exists on the remote host

oint fifo_active( const char* fifoname ) const
Returns true if the fifo on the remote host is active

oint flush( const int nMsec = eWaitFlush, const int brc_flush = 0 )
Flushes the remote DD pool - not implemented yet

oint wait4proc( const int nMsec = eWait4ProcDefault )
Waits until all processes are waiting for events. See DD::wait4proc for details.

oint wakeup()
Sends a wakeup command to the remote DD. See DD::wakeup for details

oint prepare_shutdown()
Invokes prepare_shutdown on the remote host. See DD::prepare_shutdown for details.

o Access to events in the remote pool

oint req_fev( const int size, Fifo_entry &fev, const int mode = SLEEP, const int min_cnt = 1 )
Requests a new fev from the pool. See DD::req_fev for details

oint req_nfev( int &nEvent, const int size[], Fifo_entry fev[], const int mode = SLEEP, const int min_cnt = 1 )
Requests an array of new fev from the pool. See DD::req_nfev for details

oint ins_fev( Fifo_entry &fev )
Inserts a new fev into the pool. See DD::ins_fev for details

oint rel_fev( Fifo_entry &fev )
Releases a fifo events. See DD::rel_fev for details.

oint get_fev( Fifo_entry &fev, const int iWait = -1, const char* fifo_name = NULL)
Retrieves a fifo event. See DD::get_fev for details

oint get_nfev( int &nEvents, Fifo_entry fev[], const int iWait = -1, const char* fifo_name = NULL)
Retrieves an array of fifo event. See DD::get_nfev for details

oint put_fev( Fifo_entry &fev, const char* fifo_name = NULL )
Puts a fifo event into the pool. See DD::put_fev for details

oint put_nfev( int &nEvents, Fifo_entry fev[], const char* fifo_name = NULL )
Puts an array of fifo event into the pool. See DD::put_nfev for details

oint brc_fev( Fifo_entry &fev, const int nMsec_wait = 0 )
Broadcasts a fifo event into the pool. See DD::brc_fev for details

oint enable_events( const char* fifo_name = NULL )
Enables the flow of events into the Fifo. See DD::enable_events for details

oint disable_events( const char* fifo_name = NULL )
Disables the flow of events into the Fifo. See DD::disable_events for details

oint set_reqcnt(const int req_cnt, const char* fifo_name = NULL)
Sets the request count of the fifo on the remote host. See DD::set_reqcnt for details.

oint set_prescale(const int prescale, const char* fifo_name = NULL)
Sets the prescale count of the fifo on the remote host. See DD::set_prescale for details.

o Miscellanous member functions. Currently not yet implemented

oint set_brccmd( int cmd, DD_BRCCMD_FCN cmd_fcn )
Sets the broadcast flag. See DD::set_brccmd for details

oint set_protection( Fifo::eFifo_protection protection )
Sets the protection on the remote fifo. See DD::set_protection for details.

oDb* get_data_buffer()
Returns a pointer to the data buffer of the system. Returns always NULL if it is a remote pool.

odd_dcom_str* get_dcom_addr()
Returns a pointer to the dcom strcuture. Returns always NULL if it is a remote pool.

oint get_ddpid() const
Returns the pid index of the client.

oint get_ddmpid() const
Returns the master index of the client.

o Functions that return information about the pool

oint get_free_buffers( int &free_buffers ) const
Returns the number of free buffers in the system .

oint get_status() const
Returns the status. See DD::get_status for details.

oint sameEndianess()
Returns true if the remote host has the same endianess. See DD::sameEndianness for details

oint setEventDataSwap( BOOL bValue )
Determines whether the event data between remote hosts has to be swapped too. See DD::setEventDataSwap for details

oint testTrf( int nWords, int* piArray, int nTimes )
Sends a test block to the DD server. Can be used to test the network connection and its rate. This function is only known to the rDD class.


This class has no child classes.
Author:
C.Witzig
Date: Dec 23, 98
Version:
Last update May 23, 99

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.