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

ztt::dcs::FedServer Class Reference

#include <FedServer.hpp>

List of all members.


Detailed Description

This Server provides the contact to the PVSS-Client of the DCS-Group. The PVSS has a Module which acts as a DIM-Client. It is part of the interComLayer. The FedServer has different states:

Author:
Sebastian Bablok, Christian Kofler


Public Member Functions

 FedServer (InterCom *pInterCom, boost::shared_ptr< DataAccess > pDA)
virtual ~FedServer ()
int publishServices ()
virtual void commandHandler ()
int executeCommand (char *pTarget, char *pIncomingCmnd, int size)
FedMessengergetMessenger ()
int getState () const
void exitHandler ()
int broadcastCommand (void *cmnd, int size)


Constructor & Destructor Documentation

ztt::dcs::FedServer::FedServer InterCom pInterCom,
boost::shared_ptr< DataAccess pDA
[inline]
 

Constructor for the FED - DIMServer (contacting PVSS).

Parameters:
pInterCom pointer to the InterCom - object, that handles this layer.
pDA pointer to the DataAccess - object, that handles the data access (DB or from file).

virtual ztt::dcs::FedServer::~FedServer  )  [virtual]
 

Destructor of the FED - DIMServer.


Member Function Documentation

int ztt::dcs::FedServer::broadcastCommand void *  cmnd,
int  size
 

Function sends received command further to all registered FeeServers.

Parameters:
cmnd the command, to send further
size the size of the command
Returns:
number of FeeServers, to which the command was sent.

int ztt::dcs::FedServer::executeCommand char *  pTarget,
char *  pIncomingCmnd,
int  size
 

Executes an incomming command from FedClient (RPC - call) and expects the result for further delivery as return value.

Parameters:
pTarget the FeeServer to which the command should be sent.
pIncomingCmnd the data of the incoming command
size the size of the incoming command in bytes
Returns:
the id of the send command to the FeeServer.

void ztt::dcs::FedServer::exitHandler  )  [inline]
 

The exit handler has to be overwritten to avoid an exit() call from the DIM framework. Whenever an exit Command is sent, this handler will be called.

A call of addExitHandler(this) is neccessary (e.g. in publishServices()) to satisfy C-Style baseframe.

FedMessenger* ztt::dcs::FedServer::getMessenger  ) 
 

Getter - method for the FedMessenger.

Returns:
pointer to the FedMessenger.

int ztt::dcs::FedServer::getState  )  const [inline]
 

Getter for the State of the FedServer.

Returns:
state of the FedServer.

int ztt::dcs::FedServer::publishServices  ) 
 

Publishes all services that the FeeClient has been subscribed to and creates a RPC - Service for each FeeServer, the FeeClient is connected to. The service objects are stored into the mpFedServiceCollection, the RPC - Services in mpFedRpcCollection.

Returns:
number of service and RPC - service, that have been published


The documentation for this class was generated from the following file:
Generated on Fri Mar 30 02:54:34 2007 for InterComLayer by doxygen 1.3.5