This class contains all the AbstractServerDeviceClass for the equipment and validates the requests from external clients. It also lets retrieve the devices by its name. More...
#include <AbstractServerEquipment.h>
Public Member Functions | |
void | initialize () |
this method configures the equipment component | |
void | start (RunMode runMode) |
this method starts the equipment | |
AbstractServerDeviceClass * | getServerDeviceClass (const std::string &serverDeviceClass) |
this method returns the AbstractServerDeviceClass of the class passed by parameter | |
AbstractServerDeviceClass * | getDeviceClassFromDeviceName (const std::string &devicename) |
this method searches and returns the class, which is responsible for the given device | |
void | reportErrorToAllSubscribers (std::string Message) |
this method generates an Listener error for all subscribers of this equipment | |
AbstractServerController * | getServerController () |
Returns the single reference of the Server Controller. | |
Static Public Member Functions | |
static AbstractServerEquipment * | getInstance () |
Singleton implementation. | |
Protected Member Functions | |
AbstractServerEquipment () | |
Constructor. | |
virtual | ~AbstractServerEquipment () |
destructor | |
void | waitSignal () |
Blocking call that waits for and treats signals. | |
const std::string | getServerNameFromConfigurationFile () |
Protected Attributes | |
AbstractServerController * | pServerController_ |
FesaDeviceServer * | pFesaDeviceServer_ |
pointer to the RDA Device Server | |
SubscriptionTreeManager * | pSubscriptionTreeManager_ |
Static Protected Attributes | |
static AbstractServerEquipment * | theInstance_ = NULL |
the single instance |
This class contains all the AbstractServerDeviceClass for the equipment and validates the requests from external clients. It also lets retrieve the devices by its name.
Definition at line 22 of file AbstractServerEquipment.h.
fesa::AbstractServerEquipment::AbstractServerEquipment | ( | ) | [protected] |
Constructor.
Definition at line 35 of file AbstractServerEquipment.cpp.
References fesa::PropertyTag::CLIENT_UPDATE_POLICY, getInstance(), getServerNameFromConfigurationFile(), fesa::ProcessConfiguration::getStringValue(), fesa::FesaDeviceServer::initCMW(), pFesaDeviceServer_, pServerController_, pSubscriptionTreeManager_, and theInstance_.
fesa::AbstractServerEquipment::~AbstractServerEquipment | ( | ) | [protected, virtual] |
destructor
Definition at line 101 of file AbstractServerEquipment.cpp.
References pFesaDeviceServer_, pServerController_, fesa::AbstractServerAction::releaseStaticObjects(), and fesa::ProcessRunUtils::shutDown().
AbstractServerDeviceClass * fesa::AbstractServerEquipment::getDeviceClassFromDeviceName | ( | const std::string & | devicename | ) |
this method searches and returns the class, which is responsible for the given device
device | DeviceNamae of the device |
Definition at line 124 of file AbstractServerEquipment.cpp.
References fesa::AbstractComponentEquipment::abstractDeviceClassCol_, FesaErrorUnknownDevice, fesa::AbstractDeviceFactory::getDevice(), fesa::FesaException::getErrorCode(), fesa::AbstractDeviceFactory::getGlobalDevice(), and fesa::AbstractDevice::getName().
Referenced by fesa::AbstractServerAction::checkInvalidatingFields(), fesa::FesaDeviceServer::decodeIOPoint(), fesa::ServerAction< DeviceType, DataType, FilterType >::execute(), and fesa::AbstractServerAction::notify().
AbstractServerEquipment * fesa::AbstractServerEquipment::getInstance | ( | ) | [inline, static] |
Singleton implementation.
Definition at line 118 of file AbstractServerEquipment.h.
References FesaErrorServerEquipmentNotCreated, and theInstance_.
Referenced by fesa::AbstractServerDeviceClass::AbstractServerDeviceClass(), AbstractServerEquipment(), fesa::AbstractServerAction::checkInvalidatingFields(), fesa::FesaDeviceServer::decodeIOPoint(), fesa::ServerAction< DeviceType, DataType, FilterType >::execute(), fesa::ServiceLocatorServerSplitImplementation::getDevice(), fesa::ServiceLocatorServerSplitImplementation::getDeviceCollection(), fesa::ServiceLocatorServerSplitImplementation::getGlobalDevice(), getServerNameFromConfigurationFile(), initialize(), fesa::AbstractServerAction::notify(), reportErrorToAllSubscribers(), fesa::ServiceLocatorServerSplitImplementation::runClassSpecificInitServer(), fesa::ServiceLocatorUnsplitImplementation::runClassSpecificInitServer(), fesa::ServiceLocatorServerSplitImplementation::runDeployUnitSpecificInitServer(), fesa::ServiceLocatorUnsplitImplementation::runDeployUnitSpecificInitServer(), start(), fesa::ServiceLocatorServerSplitImplementation::synchronizeSettingFields(), waitSignal(), and fesa::AbstractServerDeviceClass::~AbstractServerDeviceClass().
AbstractServerController * fesa::AbstractServerEquipment::getServerController | ( | ) |
Returns the single reference of the Server Controller.
Definition at line 169 of file AbstractServerEquipment.cpp.
References pServerController_.
AbstractServerDeviceClass * fesa::AbstractServerEquipment::getServerDeviceClass | ( | const std::string & | serverDeviceClass | ) | [inline] |
this method returns the AbstractServerDeviceClass of the class passed by parameter
serverDeviceClass | name of the class to retrieve |
Definition at line 110 of file AbstractServerEquipment.h.
References fesa::AbstractComponentEquipment::getDeviceClass().
Referenced by fesa::ServiceLocatorServerSplitImplementation::getDevice(), fesa::ServiceLocatorServerSplitImplementation::getDeviceCollection(), fesa::ServiceLocatorServerSplitImplementation::getGlobalDevice(), fesa::ServiceLocatorServerSplitImplementation::runClassSpecificInitServer(), fesa::ServiceLocatorUnsplitImplementation::runClassSpecificInitServer(), and fesa::ServiceLocatorServerSplitImplementation::synchronizeSettingFields().
const std::string fesa::AbstractServerEquipment::getServerNameFromConfigurationFile | ( | ) | [protected] |
Definition at line 247 of file AbstractServerEquipment.cpp.
References fesa::DiagnosticUtils::framework, fesa::ProcessConfiguration::getCMWServerName(), getInstance(), fesa::DiagnosticUtils::DiagnosticMessage::msg, fesa::DiagnosticUtils::server, fesa::DiagnosticUtils::DiagnosticMessage::side, and fesa::DiagnosticUtils::DiagnosticMessage::source.
Referenced by AbstractServerEquipment().
void fesa::AbstractServerEquipment::initialize | ( | ) | [virtual] |
this method configures the equipment component
Reimplemented from fesa::AbstractComponentEquipment.
Definition at line 52 of file AbstractServerEquipment.cpp.
References FesaErrorNoPermissionToSendSignals, FesaErrorServerProcessAlreadyExists, getInstance(), fesa::AbstractServerController::initialize(), pServerController_, fesa::EquipmentData::serverProcessID_, fesa::EquipmentData::serverUp_, and fesa::SIGFESA_CHECK_PROCESS_ALIVE.
void fesa::AbstractServerEquipment::reportErrorToAllSubscribers | ( | std::string | Message | ) |
this method generates an Listener error for all subscribers of this equipment
Messsage | The error message |
Definition at line 156 of file AbstractServerEquipment.cpp.
References fesa::AbstractComponentEquipment::getDeviceClassCol(), getInstance(), and fesa::AbstractEquipment::getServerComponent().
void fesa::AbstractServerEquipment::start | ( | RunMode | runMode | ) | [virtual] |
this method starts the equipment
runMode | indicates if thread should block on this call or keep run |
Implements fesa::AbstractComponentEquipment.
Definition at line 84 of file AbstractServerEquipment.cpp.
References fesa::blocking, getInstance(), pFesaDeviceServer_, pServerController_, fesa::FesaDeviceServer::start(), fesa::AbstractServerController::start(), and waitSignal().
void fesa::AbstractServerEquipment::waitSignal | ( | ) | [protected, virtual] |
Blocking call that waits for and treats signals.
Implements fesa::AbstractComponentEquipment.
Definition at line 175 of file AbstractServerEquipment.cpp.
References getInstance(), pSubscriptionTreeManager_, fesa::SubscriptionTreeManager::reportInternalError(), fesa::EquipmentData::serverUp_, fesa::SIGFESA_CHECK_PROCESS_ALIVE, fesa::SIGFESA_NOTIFICATION_FAILURE, and fesa::SIGFESA_RT_DOWN.
Referenced by start().
pointer to the RDA Device Server
Definition at line 96 of file AbstractServerEquipment.h.
Referenced by AbstractServerEquipment(), start(), and ~AbstractServerEquipment().
Definition at line 88 of file AbstractServerEquipment.h.
Referenced by AbstractServerEquipment(), getServerController(), initialize(), start(), and ~AbstractServerEquipment().
Definition at line 104 of file AbstractServerEquipment.h.
Referenced by AbstractServerEquipment(), and waitSignal().
fesa::AbstractServerEquipment::theInstance_ = NULL [static, protected] |
the single instance
Definition at line 102 of file AbstractServerEquipment.h.
Referenced by AbstractServerEquipment(), and getInstance().