fesa-core
4.2.0
|
This class contains all the AbstractServerDeviceClass for the equipment and validates the requests from external clients. More...
#include <AbstractServerEquipment.h>
Public Member Functions | |
void | initialize () |
this method configures the equipment component | |
void | start (RunMode runMode) |
this method starts the equipment More... | |
void | shutDown () |
Shut down the equipment component. | |
AbstractServerDeviceClass * | getServerDeviceClass (const std::string &serverDeviceClass) |
AbstractServerDeviceClass * | getDeviceClassFromDeviceName (const std::string &devicename) |
this method searches and returns the class, which is responsible for the given device More... | |
void | reportErrorToAllSubscribers (std::string Message) |
this method generates an Listener error for all subscribers of this equipment More... | |
AbstractServerController * | getServerController () |
Returns the single reference of the Server Controller. More... | |
Public Member Functions inherited from fesa::AbstractComponentEquipment | |
virtual void | specificInit ()=0 |
Custom initialization of the Equipment. | |
const std::vector < AbstractDeviceClass * > & | getDeviceClassCol () |
This method returns all abstract device classes, managed by this equipment. More... | |
AbstractDeviceClass * | getDeviceClass (const std::string &className) |
This method returns a pointer to the requested abstract device class. More... | |
const std::string & | getServerName () |
This method returns the server name. More... | |
void | registerDeviceClass (AbstractDeviceClass *abstractDeviceClass) |
This method registers abstract device class in vector abstractDeviceClassCol_. More... | |
void | deregisterDeviceClass (const std::string &className) |
this method removes the abstract class passed by parameter from vector abstractDeviceClassCol_ More... | |
bool | isFirstProcess () const |
virtual | ~AbstractComponentEquipment () |
Destructor. | |
Static Public Member Functions | |
static AbstractServerEquipment * | getInstance () |
Singleton implementation. | |
Protected Member Functions | |
AbstractServerEquipment () | |
Constructor. | |
virtual | ~AbstractServerEquipment () |
destructor | |
void | signalHandlingLoop () |
Protected Member Functions inherited from fesa::AbstractComponentEquipment | |
AbstractComponentEquipment () | |
Constructor. | |
void | mapEquipmentSharedMemory () |
void | registerSettingFields (const std::vector< AbstractField * > &fields) |
void | setupSignalHandlers (const sigset_t &sigset) const |
void | waitForSignal (int &signo) const |
Protected Attributes | |
boost::scoped_ptr < AbstractServerController > | serverController_ |
controller configuration for the equipment | |
std::map< std::string, AbstractDeviceClass * > | deviceNameToClass_ |
Protected Attributes inherited from fesa::AbstractComponentEquipment | |
std::vector < AbstractDeviceClass * > | abstractDeviceClassCol_ |
contains the complete list of device classes | |
bool | firstProcess_ |
void * | equipmentSharedMemory_ |
std::size_t | equipmentSharedMemorySize_ |
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
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 |
AbstractServerController * fesa::AbstractServerEquipment::getServerController | ( | ) |
Returns the single reference of the Server Controller.
AbstractServerDeviceClass * fesa::AbstractServerEquipment::getServerDeviceClass | ( | const std::string & | serverDeviceClass | ) |
Returns the AbstractServerDeviceClass whose name is passed by parameter
serverDeviceClass | name of the class to retrieve |
FesaException | if class is not found |
void fesa::AbstractServerEquipment::reportErrorToAllSubscribers | ( | std::string | Message | ) |
this method generates an Listener error for all subscribers of this equipment
Messsage | The error message |
|
protectedvirtual |
Waits for and treats signals. Never returns, unless a non-fatal terminating signal has been received by the process, to let it shutdown gracefully. Non-fatal terminating signals are: SIGINT, SIGTERM, SIGHUP.
Implements fesa::AbstractComponentEquipment.
|
virtual |
this method starts the equipment
runMode | indicates if thread should block on this call or keep run |
Implements fesa::AbstractComponentEquipment.
|
protected |
Maps a device name to the class containing it. Used as a cache by getDeviceClassFromDeviceName().