Logo Search packages:      
Sourcecode: tango version File versions  Download package

Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | Friends

Tango::Util Class Reference

#include <utils.h>

Collaboration diagram for Tango::Util:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void build_first_pool_conf ()
int check_dev_poll (vector< string > &, vector< string > &, DeviceImpl *)
void check_pool_conf (DServer *, unsigned long)
void clean_attr_polled_prop ()
void clean_dyn_attr_prop ()
void clr_heartbeat_th_ptr ()
void clr_poll_th_ptr ()
void create_event_supplier ()
int create_poll_thread (const char *dev_name, bool startup, int smallest_upd=-1)
vector< string > & get_all_dyn_attr_names ()
vector< string > & get_cmd_line_name_list ()
DbServerCacheget_db_cache ()
int get_db_svr_version ()
int get_dev_entry_in_pool_conf (string &)
string & get_dyn_att_dev_name ()
vector< string > & get_full_polled_att_list ()
TangoMonitorget_heartbeat_monitor ()
PollThCmdget_heartbeat_shared_cmd ()
int get_heartbeat_thread_id ()
PollThreadget_heartbeat_thread_object ()
Interceptorsget_interceptors ()
vector< string > & get_poll_pool_conf ()
vector< string > & get_polled_dyn_attr_names ()
int get_polling_thread_id ()
int get_polling_thread_id_by_name (const char *)
PollingThreadInfoget_polling_thread_info_by_id (int)
PollThreadget_polling_thread_object ()
vector< PollingThreadInfo * > & get_polling_threads_info ()
void * get_py_interp ()
CreatePyLockget_py_lock_creator ()
SubDevDiagget_sub_dev_diag ()
string & get_svr_port_num ()
int get_th_polled_devs (string &, vector< string > &)
void get_th_polled_devs (long, vector< string > &)
bool is_dev_already_in_pool_conf (string &, vector< string > &, int)
bool is_py_dbg ()
bool is_py_ds ()
bool is_server_event_loop_set ()
bool is_svr_shutting_down ()
bool is_svr_starting ()
void poll_status (bool status)
bool poll_status ()
void polling_configure ()
void remove_dev_from_polling_map (string &dev_name)
void remove_polling_thread_info_by_id (int)
void set_db_svr_version ()
void set_interceptors (Interceptors *in)
void set_py_dbg ()
void set_py_ds ()
void set_py_interp (void *ptr)
void set_py_lock_creator (CreatePyLock *py)
void set_shutdown_server (bool val)
void set_svr_shutting_down (bool val)
void set_svr_starting (bool val)
void shutdown_server ()
void split_string (string &, char, vector< string > &)
void stop_all_polling_threads ()
void stop_heartbeat_thread ()
void unvalidate_db_cache ()
void upd_polling_prop (vector< DevDbUpd > &, DServer *)
Destructor

Only one destructor is defined for this class

 ~Util ()
Get/Set instance data
CORBA::ORB_ptr get_orb ()
PortableServer::POA_ptr get_poa ()
void set_trace_level (int level)
int get_trace_level ()
string & get_ds_inst_name ()
string & get_ds_exec_name ()
string & get_ds_name ()
string & get_host_name ()
string & get_pid_str ()
TangoSys_Pid get_pid ()
long get_tango_lib_release ()
string & get_version_str ()
string & get_server_version ()
void set_server_version (const char *vers)
void set_class_list (vector< DeviceClass * > *list)
void add_class_to_list (DeviceClass *cl)
const vector< DeviceClass * > * get_class_list ()
void set_serial_model (SerialModel ser)
SerialModel get_serial_model ()
EventSupplierget_event_supplier ()
Database related methods
void connect_db ()
void reset_filedatabase ()
Databaseget_database ()
void unregister_server ()
Device reference related methods
vector< DeviceImpl * > & get_device_list_by_class (const string &class_name)
vector< DeviceImpl * > & get_device_list_by_class (const char *class_name)
DeviceImplget_device_by_name (const string &dev_name)
DeviceImplget_device_by_name (const char *dev_name)
DServerget_dserver_device ()
vector< DeviceImpl * > get_device_list (const string &name)
Device pattern related methods
void server_init (bool with_window=false)
void server_run ()
void server_cleanup ()
void server_set_event_loop (bool(*f_ptr)())
Polling related methods
void trigger_cmd_polling (DeviceImpl *dev, const string &name)
void trigger_attr_polling (DeviceImpl *dev, const string &name)
template<typename T >
void fill_attr_polling_buffer (DeviceImpl *dev, string &att_name, AttrHistoryStack< T > &data)
template<typename T >
void fill_cmd_polling_buffer (DeviceImpl *dev, string &cmd_name, CmdHistoryStack< T > &data)
void set_polling_threads_pool_size (long thread_nb)
long get_polling_threads_pool_size ()

Static Public Member Functions

Singleton related methods

These methods follow the singleton design pattern (only one instance of a class)

static Utilinit (int argc, char *argv[])
static TANGO_IMP_EXP Utilinstance (bool exit=true)

Static Public Attributes

Class data members
static int _tracelevel = 0
static TANGO_IMP bool _UseDb = true
static TANGO_IMP bool _FileDb = false
static TANGO_IMP bool _daemon = false
static TANGO_IMP long _sleep_between_connect = 60

Protected Member Functions

 Util (int argc, char *argv[])

Private Member Functions

void check_args (int, char *[])
void create_CORBA_objects ()
void display_help_message ()
void effective_job (int, char *[])
DeviceImplfind_device_name_core (string &)
void init_host_name ()
void misc_init ()
void print_err_message (const string &mess, Tango::MessBoxType type=Tango::STOP)
void print_usage (char *)
void server_already_running ()

Static Private Member Functions

static void print_err_message (const char *, Tango::MessBoxType type=Tango::STOP)

Private Attributes

PortableServer::POA_var _poa
vector< DeviceClass * > cl_list
const vector< DeviceClass * > * cl_list_ptr
string database_file_name
Databasedb
bool display_help
string ds_exec_name
string ds_instance_name
string ds_name
UtilExtext
string hostname
CORBA::ORB_var orb
TangoSys_Pid pid
string pid_str
string server_version
string version_str

Static Private Attributes

static bool _constructed = false
static TANGO_IMP Util_instance = NULL

Friends

class Tango::ApiUtil
class Tango::AutoTangoMonitor

Detailed Description

This class is a used to store TANGO device server process data and to provide the user with a set of utilities method. This class is implemented using the singleton design pattern. Therefore a device server process can have only one instance of this class and its constructor is not public.

Author:
taurel
Revision:
15556

Definition at line 372 of file utils.h.


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

Generated by  Doxygen 1.6.0   Back to index