fesa::FesaDeviceServer Class Reference

#include <FesaDeviceServer.h>

Inheritance diagram for fesa::FesaDeviceServer:
fesa::Thread

List of all members.

Public Member Functions

 FesaDeviceServer (const std::string &name, const ProcessConfiguration *processConfiguration, SubscriptionTreeManager *subscriptionTreeManager)
 Constructor.
 ~FesaDeviceServer ()
 Destructor.
rdaData * get (const rdaIOPoint &iop, const rdaData &ctx)
 the get method is triggered by a client (over the middleware). If sucessfull, it will return the needed data package, otherwise it will throw an exception.
void set (const rdaIOPoint &iop, const rdaData &ctx, const rdaData &value)
 the set method is triggered by a client (over the middleware). If sucessfull, it will write the value to the requested place. Otherwise it will throw an exception
void monitorOn (const rdaIOPoint &iop, const rdaData &ctx, rdaValueChangeListener *listener)
 this method is triggered by a client (over the middleware), if he wants to subscribe to a speficied bundle of data
void monitorOff (const rdaIOPoint &iop, rdaValueChangeListener *listener)
 this method is triggered by a client (over the middleware), if he wants to unsubscribe to a speficied bundle of data
void start ()
bool useFastUpdate ()

Static Public Member Functions

static void initCMW ()

Private Member Functions

void run ()
 Implementation of the virtual method from Thread.
void runDeviceServer ()
 This method runs the RDADeviceServer.

Exceptions:
This function can throw different rdaInternalError and FesaExceptions.

void decodeIOPoint (const rdaIOPoint &iop, AbstractServerDeviceClass *&srvDeviceClass, Property *&prop, AbstractDevice *&device, std::string &cycleSelector)
 This method retrieves information about cycle selector, Property and Device from the IO-Point.
bool isRTProcessDown ()
 check if the RT part has crashed in the meanwhile

Private Attributes

SubscriptionTreeManagerpTreeManager_
 the SubscriptionTreeManager
bool firstUpdateAcquisitionEnabled_
 Flag to enable/diasable the firstUpdate procedure for Acquisition-Properties.
bool firstUpdateSettingEnabled_
 Flag to enable/diasable the firstUpdate procedure for Setting-Properties.
Mutex mutex_
 mutex to synchronize the shutdown

Friends

class AbstractServerEquipment

Detailed Description

Definition at line 29 of file FesaDeviceServer.h.


Constructor & Destructor Documentation

fesa::FesaDeviceServer::FesaDeviceServer ( const std::string &  name,
const ProcessConfiguration processConfiguration,
SubscriptionTreeManager subscriptionTreeManager 
)
fesa::FesaDeviceServer::~FesaDeviceServer (  ) 

Destructor.

Definition at line 60 of file FesaDeviceServer.cpp.

References fesa::AbstractMutex::lock(), mutex_, and fesa::ProcessRunUtils::shutDown().


Member Function Documentation

void fesa::FesaDeviceServer::decodeIOPoint ( const rdaIOPoint &  iop,
AbstractServerDeviceClass *&  srvDeviceClass,
Property *&  prop,
AbstractDevice *&  device,
std::string &  cycleSelector 
) [private]
rdaData * fesa::FesaDeviceServer::get ( const rdaIOPoint &  iop,
const rdaData &  ctx 
)

the get method is triggered by a client (over the middleware). If sucessfull, it will return the needed data package, otherwise it will throw an exception.

Parameters:
iop inside this, the device, property and cycleSelector is stored
ctx the filter
Returns:
the requested data
Exceptions:
This function can throw rdaIOError

Definition at line 105 of file FesaDeviceServer.cpp.

References decodeIOPoint(), fesa::ERROR_CATEGORY, FesaErrorRTProcessDown, fesa::DiagnosticUtils::framework, fesa::GET, fesa::AbstractEquipment::getDiagnostics(), fesa::FesaException::getErrorCodeAsLong(), fesa::AbstractEquipment::getInstance(), fesa::FesaException::getMessage(), isRTProcessDown(), fesa::DiagnosticUtils::DiagnosticMessage::msg, fesa::Thread::registerThreadIdName(), fesa::DiagnosticUtils::server, fesa::DiagnosticUtils::DiagnosticMessage::side, and fesa::DiagnosticUtils::DiagnosticMessage::source.

void fesa::FesaDeviceServer::initCMW (  )  [static]
bool fesa::FesaDeviceServer::isRTProcessDown (  )  [private]

check if the RT part has crashed in the meanwhile

Definition at line 329 of file FesaDeviceServer.cpp.

References fesa::EquipmentData::getInstance(), fesa::EquipmentData::hasRt_, and fesa::EquipmentData::rtUp_.

Referenced by get(), monitorOn(), and set().

void fesa::FesaDeviceServer::monitorOff ( const rdaIOPoint &  iop,
rdaValueChangeListener *  listener 
)

this method is triggered by a client (over the middleware), if he wants to unsubscribe to a speficied bundle of data

Parameters:
iop inside this, the device, property and cycleSelector is stored
listener The callback function, which is called, if new data arrives
Exceptions:
This function can throw rdaIOError exceptions

Definition at line 242 of file FesaDeviceServer.cpp.

References decodeIOPoint(), fesa::ERROR_CATEGORY, fesa::DiagnosticUtils::framework, fesa::AbstractEquipment::getDiagnostics(), fesa::FesaException::getErrorCodeAsLong(), fesa::AbstractEquipment::getInstance(), fesa::FesaException::getMessage(), fesa::DiagnosticUtils::DiagnosticMessage::msg, pTreeManager_, fesa::SubscriptionTreeManager::removeSubscriber(), fesa::DiagnosticUtils::server, fesa::DiagnosticUtils::DiagnosticMessage::side, and fesa::DiagnosticUtils::DiagnosticMessage::source.

void fesa::FesaDeviceServer::monitorOn ( const rdaIOPoint &  iop,
const rdaData &  ctx,
rdaValueChangeListener *  listener 
)
void fesa::FesaDeviceServer::run (  )  [private, virtual]

Implementation of the virtual method from Thread.

Implements fesa::Thread.

Definition at line 352 of file FesaDeviceServer.cpp.

References FesaErrorIRunningDeviceServer, and runDeviceServer().

void fesa::FesaDeviceServer::runDeviceServer (  )  [private]
void fesa::FesaDeviceServer::set ( const rdaIOPoint &  iop,
const rdaData &  ctx,
const rdaData &  value 
)

the set method is triggered by a client (over the middleware). If sucessfull, it will write the value to the requested place. Otherwise it will throw an exception

Parameters:
iop inside this, the device, property and cycleSelector is stored
ctx the filter
value the value, which has to be set
Exceptions:
This function can throw rdaIOError exceptions

Definition at line 153 of file FesaDeviceServer.cpp.

References decodeIOPoint(), fesa::ERROR_CATEGORY, FesaErrorRTProcessDown, fesa::DiagnosticUtils::framework, fesa::AbstractEquipment::getDiagnostics(), fesa::FesaException::getErrorCodeAsLong(), fesa::AbstractEquipment::getInstance(), fesa::FesaException::getMessage(), isRTProcessDown(), fesa::DiagnosticUtils::DiagnosticMessage::msg, fesa::Thread::registerThreadIdName(), fesa::DiagnosticUtils::server, fesa::DiagnosticUtils::DiagnosticMessage::side, and fesa::DiagnosticUtils::DiagnosticMessage::source.

void fesa::FesaDeviceServer::start (  ) 
bool fesa::FesaDeviceServer::useFastUpdate (  ) 

Friends And Related Function Documentation

friend class AbstractServerEquipment [friend]

Definition at line 109 of file FesaDeviceServer.h.


Member Data Documentation

Flag to enable/diasable the firstUpdate procedure for Acquisition-Properties.

Definition at line 124 of file FesaDeviceServer.h.

Referenced by FesaDeviceServer().

Flag to enable/diasable the firstUpdate procedure for Setting-Properties.

Definition at line 129 of file FesaDeviceServer.h.

Referenced by FesaDeviceServer().

mutex to synchronize the shutdown

Definition at line 134 of file FesaDeviceServer.h.

Referenced by runDeviceServer(), and ~FesaDeviceServer().

the SubscriptionTreeManager

Definition at line 119 of file FesaDeviceServer.h.

Referenced by monitorOff(), and monitorOn().


The documentation for this class was generated from the following files:

Generated on 18 Jan 2013 for Fesa by  doxygen 1.6.1