EUROPEAN SYNCHROTRON RADIATION FACILITY
INSTALLATION EUROPEENNE DE RAYONNEMENT SYNCHROTRON
ESRF Logo
Main Page   Namespace List   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

Starter::Starter Class Reference

Class Description: This device server is able to control Tango components (database, device servers, clients...). More...

#include <Starter.h>

List of all members.

Public Methods

void manage_PollingState_startup ()
 Manage the PollingState object startup. More...

Constructors
Miscellaneous constructors

 Starter (Tango::DeviceClass *, string &)
 Constructs a newly allocated Command object. More...

 Starter (Tango::DeviceClass *, const char *)
 Constructs a newly allocated Command object. More...

 Starter (Tango::DeviceClass *, const char *, const char *)
 Constructs a newly allocated Command object. More...

Destructor
Only one desctructor is defined for this class

 ~Starter ()
 The object desctructor. More...

Miscellaneous methods
virtual void init_device ()
 Initialize the device. More...

virtual void always_executed_hook ()
 Always executed method befor execution command method. More...

Starter methods prototypes
virtual Tango::DevState dev_state ()
 method: Starter::dev_state. More...

void dev_start_all (Tango::DevShort)
 method: Starter::dev_start_all. More...

void dev_stop_all (Tango::DevShort)
 method: Starter::dev_stop_all. More...

Tango::DevVarStringArray * dev_get_running_servers (Tango::DevBoolean)
 method: Starter::dev_get_running_servers. More...

Tango::DevVarStringArray * dev_get_stop_servers (Tango::DevBoolean)
 method: Starter::dev_get_stop_servers. More...

void dev_start (Tango::DevString)
 method: Starter::dev_start. More...

void dev_stop (Tango::DevString)
 method: Starter::dev_stop. More...

Tango::ConstDevString dev_read_log (Tango::DevString)
 method: Starter::dev_read_log. More...

void update_servers_info ()
 method: Starter::update_servers_info. More...

void start_polling_thread ()
 method: Starter::start_polling_thread. More...

void get_device_property ()
 Read the device properties from database. More...


Public Attributes

StarterUtilutil
 StarterUtil instance to be used everywhere. More...

SharedDatashared
 State polling thread shared data. More...

PollingStatepoller
 State polling thread. More...

omni_thread * polling_id
 Polling thread ID. More...

vector< ServerControledservers
 Structures defining servers to be controlled. More...

Tango::DevBoolean throwable
 Exception must be or not thrown. More...

string returned_str
 Static string to be returned. More...

Tango::DeviceProxy * dbase
 Database device (as DeviceProxy) for not implemented API commands. More...

Device properties
Device properties member data.

vector< string > startDsPath
 Path to find executable files to start device servers. More...

Tango::DevShort waitForDriverStartup
 The Starter will wait a bit before starting servers, to be sure than the drivers are started.This time is in seconds. More...

Tango::DevShort disableNotifyDaemon

Protected Methods

private methods prototypes
const bool is_running (ServerControled *)
 Check if server running. More...

void get_server_info (ServerControled *)
 Read DS info from database to know if it is controled and it's starting level. More...

void build_server_ctrl_object (void)
 Allocate and fill the servers controled object. More...

void signal_handler (long)
 signal handler for a server death. More...


Detailed Description

Class Description: This device server is able to control Tango components (database, device servers, clients...).

It is able to start or stop and to report the status of these components.


Constructor & Destructor Documentation

Starter::Starter::Starter Tango::DeviceClass *    cl,
string &    s
 

Constructs a newly allocated Command object.

Parameters:
cl  Class.
s  Device Name

Starter::Starter::Starter Tango::DeviceClass *    cl,
const char *    s
 

Constructs a newly allocated Command object.

Parameters:
cl  Class.
s  Device Name

Starter::Starter::Starter Tango::DeviceClass *    cl,
const char *    s,
const char *    d
 

Constructs a newly allocated Command object.

Parameters:
cl  Class.
s  Device name
d  Device description.

Starter::Starter::~Starter   [inline]
 

The object desctructor.


Member Function Documentation

void Starter::Starter::always_executed_hook   [virtual]
 

Always executed method befor execution command method.

void Starter::Starter::build_server_ctrl_object void    [protected]
 

Allocate and fill the servers controled object.

Tango::DevVarStringArray * Starter::Starter::dev_get_running_servers Tango::DevBoolean    all_serv
 

method: Starter::dev_get_running_servers.

And return the list of the processes which are really running.

Parameters:
argin  True for all servers. False for controled servers only.
Returns:
List of the processes which are running.
Exceptions:
DevFailed 

Tango::DevVarStringArray * Starter::Starter::dev_get_stop_servers Tango::DevBoolean    all_serv
 

method: Starter::dev_get_stop_servers.

And return the list of the processes which are not running.

Parameters:
argin  True for all servers. False for controled servers only.
Returns:
List of the processes which are not running.
Exceptions:
DevFailed 

Tango::ConstDevString Starter::Starter::dev_read_log Tango::DevString    argin
 

method: Starter::dev_read_log.

This command will read this file and return the read string from the file.

Parameters:
argin  server name and domain
Returns:
ig Starter/corvus)
Exceptions:
DevFailed 

void Starter::Starter::dev_start Tango::DevString    argin
 

method: Starter::dev_start.

Parameters:
argin  Syntax to start the Tango component
Exceptions:
DevFailed 

void Starter::Starter::dev_start_all Tango::DevShort    level
 

method: Starter::dev_start_all.

Parameters:
argin  Startup level.
Exceptions:
DevFailed 

Tango::DevState Starter::Starter::dev_state   [virtual]
 

method: Starter::dev_state.

Returns:
State Code
Exceptions:
DevFailed 

void Starter::Starter::dev_stop Tango::DevString    argin
 

method: Starter::dev_stop.

Parameters:
argin  The Tango component to be stopped.
Exceptions:
DevFailed 

void Starter::Starter::dev_stop_all Tango::DevShort    level
 

method: Starter::dev_stop_all.

Parameters:
argin  Startup Level.
Exceptions:
DevFailed 

void Starter::Starter::get_device_property  
 

Read the device properties from database.

void Starter::Starter::get_server_info ServerControled   server [protected]
 

Read DS info from database to know if it is controled and it's starting level.

Parameters:
devname  device to get info.
server  object to be updated from db read.

void Starter::Starter::init_device   [virtual]
 

Initialize the device.

const bool Starter::Starter::is_running ServerControled   server [protected]
 

Check if server running.

Try to import his device administrator.

Parameters:
devname  Device name.

void Starter::Starter::manage_PollingState_startup  
 

Manage the PollingState object startup.

void Starter::Starter::signal_handler long    signo [protected]
 

signal handler for a server death.

void Starter::Starter::start_polling_thread  
 

method: Starter::start_polling_thread.

Exceptions:
DevFailed 

void Starter::Starter::update_servers_info  
 

method: Starter::update_servers_info.

The device server must read the database to update the servers info list.

Exceptions:
DevFailed 


Member Data Documentation

Tango::DeviceProxy* Starter::Starter::dbase
 

Database device (as DeviceProxy) for not implemented API commands.

Tango::DevShort Starter::Starter::disableNotifyDaemon
 

PollingState* Starter::Starter::poller
 

State polling thread.

omni_thread* Starter::Starter::polling_id
 

Polling thread ID.

string Starter::Starter::returned_str
 

Static string to be returned.

vector<ServerControled> Starter::Starter::servers
 

Structures defining servers to be controlled.

SharedData* Starter::Starter::shared
 

State polling thread shared data.

vector<string> Starter::Starter::startDsPath
 

Path to find executable files to start device servers.

Tango::DevBoolean Starter::Starter::throwable
 

Exception must be or not thrown.

StarterUtil* Starter::Starter::util
 

StarterUtil instance to be used everywhere.

Tango::DevShort Starter::Starter::waitForDriverStartup
 

The Starter will wait a bit before starting servers, to be sure than the drivers are started.This time is in seconds.


The documentation for this class was generated from the following files: Tango Device Server User's Guide



(c) ESRF - Software Engineering Group