Subtype of the DD class that implements a DD system, which is located on a remote host.
Inheritance:
Public Methods
-
Creating and deleting DD systems
-
Operations on the remote pool
-
Access to events in the remote pool
-
Miscellanous member functions. Currently not yet implemented
-
Functions that return information about the pool
-
int testTrf( int nWords, int* piArray, int nTimes )
- Sends a test block to the DD server.
Public Members
-
enum eServerCommands
- ddn commands are enumated and represented as integers
-
enum eEndianessCheck
- a 32 byte word that is used to determine the endianess of the remote host
-
enum eSocketSizes
- the receive and send socket sizes
Inherited from DD:
Public Fields
-
static const char* const pccDefaultDDName
-
static 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
-
static void printUnsupportedOperation( const char* operation )
Public Members
-
enums as static data members
Protected Fields
-
BOOL is_local
-
char* name
-
char* config_file
-
char* dd_filename
-
static 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).
enum eServerCommands
- ddn commands are enumated and represented as integers
enum eEndianessCheck
- a 32 byte word that is used to determine the endianess of the remote host
enum eSocketSizes
- the receive and send socket sizes
Creating and deleting DD systems
rDD( char* name, const char* mode, char* config_file, char* dd_filename = DEFAULT_DD_FILENAME) throw( DD_Exception )
- creator - called by DD::create_dd
rDD( char* name, const char* mode, char* config_file, const char* dd_filename = DD::pccDefaultDDFileName )
- creator w/o exception - called by DD::create_dd
~rDD()
- dtor
Operations on the remote pool
Fifo* 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.
int delete_fifo( const char* fifo_name = NULL )
- Deletes a fifo. See DD::delete_fifo
Fifo_system* get_fifo_system()
- Returns a pointer to the fifo system. For an rDD returns always NULL. See DD::delete_fifo
int fifo_exists( const char* fifoname ) const
- Returns true if the fifo exists on the remote host
int fifo_active( const char* fifoname ) const
- Returns true if the fifo on the remote host is active
int flush( const int nMsec = eWaitFlush, const int brc_flush = 0 )
- Flushes the remote DD pool - not implemented yet
int wait4proc( const int nMsec = eWait4ProcDefault )
- Waits until all processes are waiting for events.
See DD::wait4proc for details.
int wakeup()
- Sends a wakeup command to the remote DD.
See DD::wakeup for details
int prepare_shutdown()
- Invokes prepare_shutdown on the remote host.
See DD::prepare_shutdown for details.
Access to events in the remote pool
int 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
int 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
int ins_fev( Fifo_entry &fev )
- Inserts a new fev into the pool. See DD::ins_fev for details
int rel_fev( Fifo_entry &fev )
- Releases a fifo events. See DD::rel_fev for details.
int get_fev( Fifo_entry &fev, const int iWait = -1, const char* fifo_name = NULL)
- Retrieves a fifo event. See DD::get_fev for details
int 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
int put_fev( Fifo_entry &fev, const char* fifo_name = NULL )
- Puts a fifo event into the pool. See DD::put_fev for details
int 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
int brc_fev( Fifo_entry &fev, const int nMsec_wait = 0 )
- Broadcasts a fifo event into the pool. See DD::brc_fev for details
int enable_events( const char* fifo_name = NULL )
- Enables the flow of events into the Fifo. See DD::enable_events for details
int disable_events( const char* fifo_name = NULL )
- Disables the flow of events into the Fifo. See DD::disable_events for details
int 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.
int 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.
Miscellanous member functions. Currently not yet implemented
int set_brccmd( int cmd, DD_BRCCMD_FCN cmd_fcn )
- Sets the broadcast flag. See DD::set_brccmd for details
int set_protection( Fifo::eFifo_protection protection )
- Sets the protection on the remote fifo. See DD::set_protection for details.
Db* get_data_buffer()
- Returns a pointer to the data buffer of the system. Returns always NULL if it is a remote pool.
dd_dcom_str* get_dcom_addr()
- Returns a pointer to the dcom strcuture. Returns always NULL if it is a remote pool.
int get_ddpid() const
- Returns the pid index of the client.
int get_ddmpid() const
- Returns the master index of the client.
Functions that return information about the pool
int get_free_buffers( int &free_buffers ) const
- Returns the number of free buffers in the system .
int get_status() const
- Returns the status. See DD::get_status for details.
int sameEndianess()
- Returns true if the remote host has the same endianess. See DD::sameEndianness for details
int setEventDataSwap( BOOL bValue )
- Determines whether the event data between remote hosts has to be swapped too.
See DD::setEventDataSwap for details
int 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++.