2. The overall structure of the system. Modularity (TSubSYS, TModule)
The root, from which we construct the whole system is the object of TSYS. The root contains a subsystem (TSubSYS). Subsystems can be: the ordinary and modular. The difference between the modular subsystems is clearly shown in Fig. 1. Thus, the modular subsystems necessarily contain a list of modular structures (TModule), such as subsystem TArchiveS contain modular objects TTypeArchivator. At the same time, the normal subsystem does not contain such objects. For example TSecurity subsystem (Figure 2).
Fig. 2. Hierarchical structure of OpenSCADA.
In the process of initializing the root (TSYS) the global variable SYS is defined. The variable SYS can be used for direct access to the root of the system from any of its node. Initialization of the root is performed only one time from the main calling function. After starting the management is captured by the system object till stop. The root object concentrate all system functions of the OpenSCADA system.
Extension of the root object (TSYS) is the object TMess, which performs the functions of service of the flow of system messages. The object is accessible through the global variable Mess, which is initialized by the root of the system. The object contains the functions of encoding, decoding, and localization of messages.
In the subsystems (TSubSYS) the functions typical for each subsystem individually with the general access for all subsystems are carried out through the object TSubSYS. Modular subsystem is able to extend its functionality by means of modules. For this purpose, modular subsystem provides access to the modules of its type in the form of modular objects.
Module is the component of the modular subsystem. In general, for all modules and subsystems, the module provides information about itself, its origin and export functions. Individual module implements the functionality according to its own needs.
2.1. The root object system (TSYS)
Data:
Information variables of the program:
- PACKAGE_LICENSE Distribution license of the program
- PACKAGE_DESCR Brief description of the program
- PACKAGE_AUTHOR Author of the program
- PACKAGE_SITE Web site of the program support
Methods for coding of symbol sequences (enum TSYS::Code):
- PathEl element of the path (the characters: '/' and '%' to the form '%2f');
- HttpURL address of the browser (http url);
- Html special characters for use in html;
- JavaSc end of line character for JavaScript;
- SQL SQL-query value;
- Custom selective coding of the specified characters;
- base64 Mime encoding in the standard Base64;
- FormatPrint Coding/masking of the formating elements for functions like "printf";
- oscdID coding of the nodes' identifiers.
- Bin Encoding of the binary data in text and vice versa.
- Reverse Invert the order of characters in the line.
- ShieldSimb Shielded symbols like "\n" encoding to real code.
- ToLower Convert to lower case.
Types of representations of the integer in the function TSYS::int2str(), and TSYS::ll2str() (enum TSYS::IntView):
- Dec decimal;
- Oct octal;
- Hex hexadecimal.
Structure of redundant station (class TSYS::SStat):
- int8_t lev; station level;
- bool isLive; flag "Station Alive";
- float cnt; counter of requests to the remote station or timer of a re-connection try;
- SStat( int8_t ilev, bool iisLive = false, float icnt = 0 ) station object constructor with level ilev, initiated as "Alive" iisLive and counter icnt;
- SStat( ) constructor by default, initiated as as a missed and an inactive station;
- bool isActive( ) station is active.
Structure of OpenSCADA task (class TSYS::STask):
- STask( pthread_t ithr, char ipolicy, char iprior ); constructor of the task's descriptor for thread ithr, it's scheduling policy ipolicy and priority iprior.
- float consumpt( ) const; the task's last CPU time consumption, in seconds.
- float period( ); the task's call instant periodicity, in seconds.
- string path; path.
- pthread_t thr; thread handler.
- uint8_t policy, prior; scheduling policy and priority.
- pid_t tid; thread's identifier as a Linux process's ID.
- ResString cpuSet; used processors/cores list.
- void *(*task) (void *); pointer to the task.
- void *taskArg; arguments of the task.
- unsigned flgs; flags, "enum Flgs { Detached = 0x01, FinishTask = 0x02; }".
- int64_t tm_beg, tm_end, tm_per, tm_pnt, cycleLost, lagMax, consMax; statistic variables of the task execution.
Templates/definitions:
- USER_FILE_LIMIT The limit to files size for user's loading (1 MB).
- STR_BUF_LEN Standard length of string buffers (10000).
- NSTR_BUF_LEN Standard length of string buffers, for numbers (100).
- STD_WAIT_DELAY Standard quantum of the waiting time cycles (100 ms).
- STD_CACHE_LIM Standard cache limit (100).
- STD_WAIT_TM Standard interval of the event waiting (10 ms).
- STD_INTERF_TM Timeout, maximum time, waiting for the interface reaction (5 s).
- BUF_ARCH_NM The archive buffer name ("<buffer>").
- ALRM_ARCH_NM The alarms table name ("<alarms>").
- __func__ The full name of the calling function.
- vmin (a,b) Determination of the minimum value.
- vmax (a,b) Definition of the maximum value.
Public methods:
- TSYS( int argi, char **argb, char **env ); The initializing constructor.
- void unload( ); Unload subsystems.
- int start( ); Start of the system. The function is finished only with the finishing of the system. The return code is returned.
- void stop( int sig = SIGUSR1 ); Stop program by the signal sig, by default it is SIGUSR1 and SIGUSR2 reserved for projects manager.
- int stopSignal( ); The return code in the case of system shutdown. Can be used as a sign of "System shutdown" of the various subsystems.
- string id( ); station ID.
- string name( ); Localized name of the station.
- string user( ); The system user on behalf of which the system is running .
- string host( ); Host name for the station run.
- void list( vector<string> &list ) const; A list of registered subsystems in the system.
- bool present( const string &name ) const; Check the availability of the subsystem.
- void add( TSubSYS *sub ); Add/registration of the subsystem.
- void del( const string &name ); Removing the subsystem.
- AutoHD<TSubSYS> at( const string &name ) const; Connection to the specified subsystem.
- AutoHD<TUIS> ui( ); Direct access to the subsystem "User interfaces".
- AutoHD<TArchiveS> archive( ); Direct access to the subsystem "Archives".
- AutoHD<TBDS> db( ); Direct access to the subsystem "Databases".
- AutoHD<TControllerS> daq( ); Direct access to the subsystem "Data acquisition".
- AutoHD<TProtocolS> protocol( ); Direct access to the subsystem "Protocols".
- AutoHD<TTransportS> transport( ); Direct access to the subsystem "Transports".
- AutoHD<TSpecialS> special( ); Direct access to the subsystem "Special".
- AutoHD<TModSchedul> modSchedul( ); Direct access to the subsystem "Module".
- AutoHD<TSesurity> sesurity( ); Direct access to the subsystem "Security".
- string workDir( ); Working directory of the station.
- string modDir( ); Directories with the modules of OpenSCADA, separated by ';', they can include a files' template into the end (/my/modules/path/lib*.so).
- string icoDir( ); Directory of the icons of OpenSCADA.
- string docDir( ); Directory of the documents of OpenSCADA.
- void setWorkDir( const string &wdir, bool init = false ); Setting the working directory of the station.
- void setModDir( const string &mdir, bool init = false ); Specifying the directories of the modules of OpenSCADA.
- void setIcoDir( const string &idir, bool init = false ); Specifying of the directory of icons of OpenSCADA.
- void setDocDir( const string &idir, bool init = false ); Specifying of the directory of documents of OpenSCADA.
- string cfgFile( ); Name of configuration file of the system.
- XMLNode &cfgRoot( ); Parsed structure of the configuration file.
- XMLNode *cfgNode( const string &path, bool create = false ); Node of configuration getting by it path path. Elements of the path creation by it miss create.
- void modifCfg( bool chkPossibleWR = false ); Configuration mark to modification or write possibility chkPossibleWR, for next saving to file.
- string workDB( ); The full name of the working database.
- string selDB( ); Chosen DB. Used for selective loading from the specified database in the subsystem "DB".
- string mainCPUs( ); Used processors list.
- bool clockRT( ); The Real-time clock selection for the tasks planning, else used the monotonic one (by defaults).
- bool saveAtExit( ); Sign - "Save configuration on exit".
- int savePeriod( ); Frequency of the automatically saving the station in the database (seconds).
- void setWorkDB( const string &wdb ); Setting of the full name of the working database.
- void setSelDB( const string &vl ); Installation of the selected database for the specified boot.
- void setMainCPUs( const string &vl ); Setting of used processors list.
- void setClockRT( bool vl ); Setting of the Real-time clock selection for the tasks planning.
- void setSaveAtExit( bool vl ); Setting of the sign - "Save configuration on exit".
- void setSavePeriod( int vl ); Set the frequency of the automatically saving of the station to the database (seconds).
- bool chkSelDB( const string &wDB ); The function of checking for compliance of the specified database wDB with the selected "selDB()".
- string optDescr( ); Localized help on the options of the command line and parameters of the configuration file.
- static void sighandler( int signal ); Function of the default handler of the signals of the system as a whole.
- unsigned long long sysClk( ); The estimated frequency of the processor on which the system works (Hz).
- void clkCalc( ); Calculation of frequency of the processor on which the system works. It is called periodically for the systems with variable CPU frequency.
- unsigned long long shrtCnt( ); The function of the measurement of small intervals of time by the counter of the CPU cycles. Returns the value of the counter of CPU cycles.
- static long HZ( ); Time of the system teak of the CPU.
- void taskCreate( const string &path, int priority, void *(*start_routine)(void *), void *arg, int wtm = 5, pthread_attr_t *pAttr = NULL, bool *startSt = NULL ); Create task (thread) with id path, priority (-1...99), task's function start_routine and it argument arg, and also wait for user's code start by flag startSt.
- void taskDestroy( const string &path, bool *endrunCntr = NULL, int wtm = 5, bool noSignal = false ); Destroy task with id path, start control flag startCntr. Use noSignal for exclude signal SIGALRM send to the task.
- double taskUtilizTm( const string &path, bool max = false ); Utilization of CPU time, in seconds, for task path or it's maximum max.
- static bool taskEndRun( ); Check for the task endrun by signal SIGUSR1.
- static const STask& taskDescr( ); Get reference to the task's descriptor.
- static int sysSleep( float tm ); System sleep in seconds up to nanoseconds (1e-9).
- time_t sysTm( ); System time fast access, from updated cell
- static int64_t curTime( ); The actual time in microsecond from the beginning of the era (01.01.1970).
- string prjUserDir( ); Directory of the user projects.
- bool prjCustMode( ); Custom mode of projects.
- void setPrjCustMode( bool vl ); Set for custom mode of projects.
- string prjNm( ); Project name of the configuration.
- void setPrjNm( const string &vl ); Set project name of the configuration.
- bool prjSwitch( const string &prj, bool toCreate = false ); Switch to project prj.
- int prjLockUpdPer( ); Get project lock updating period, zero for the lock disable.
- bool prjLock( const char *cmd ); Project lock process for the command cmd ("hold", "free", "update").
- static void taskSleep( int64_t per, const string &cron = "", int64_t *lag = NULL ); The function of the flow sleep by the grid of absolute time with the period per in the nanosecond or for the scheduled time cron. If set lag then to it will return different value from real and planed wake up time (lost cycles).
- static time_t cron( const string &vl, time_t base=0 ); Planning the execution time on the format of the standard Cron vl beginning at the basic time base or at the current time if the base is not specified.
- static bool eventWait( bool &m_mess_r_stat, bool exempl, const string &loc, time_t time=0 ); Function of the event waiting exempl for the variable m_mess_r_stat within a specified time interval time for the source loc.
- bool cntrEmpty( ); Debug counters checking to empty.
- double cntrGet( const string &id ); Debug counter id getting.
- void cntrSet( const string &id, double vl ); Debug counter id setting to value vl.
- void cntrIter( const string &id, double vl ); Debug counter id iteration to value vl.
- bool rdEnable( ); Redundancy enabled, at least one redundancy station presented.
- bool rdActive( ); Redundancy active, at least one active station presented.
- void rdStList( vector<string> &ls ); List of ls stations into the redundancy.
- SStat rdSt( const string &id ); Get copy of state structure of the redundancy station id.
- map<string, SStat> rdSts( ); Get copy of list of state structures of redundancy stations.
- int rdStLevel( ); Current station level into the redundancy system.
- void setRdStLevel( int vl ); Set current station level into the redundancy system.
- float rdTaskPer( ); Period of execution of the redundancy processing task.
- void setRdTaskPer( float vl ); Set period of execution of the redundancy processing task.
- int rdRestConnTm( ); Time of the retry attempts to reconnect to the backup station after its loss in seconds.
- void setRdRestConnTm( int vl ); Set time of the retry attempts to reconnect to the backup station after its loss in seconds.
- string rdStRequest( XMLNode &req, const string &st = "" ); Common request req to pointed redundancy station st.
- static string int2str( int val, IntView view=Dec ); Transformation of a signed integer to the string of the type of view view.
- static string uint2str( unsigned val, IntView view=Dec ); Transformation of unsigned integer to the string type of view view.
- static string ll2str( long long val, IntView view=Dec ); Transformation of a long integer (64bit) to the string type of view view.
- static string real2str( double val, int prec=15, char tp='g'); Real transformation with an accuracy prec signs and type tp to the string.
- static double realRound( double val, int dig=0, bool toint=false ); Rounding the real number to the specified digit dig after the decimal point with the possibility of transformation to integer after rounding toint.
- static string atime2str( time_t tm, const string &format = "" ); Astronomic UNIX time tm conversion to string, by format format of POSIX-function "strftime()".
- static string time2str( double tm ); Convert time interval, in seconds, to string like "1hour 23min 10sec".
- static string cpct2str( double cnt ); Traffic counter cnt (bytes) convert to string like "12.5KiB".
- static double str2real( const string &val ); String transformation to the real.
- static string addr2str( void *addr ); Convert addresses into string.
- static void *str2addr( const string &str ); Convert string into the address.
- static string strTrim( const string &val, const string &cfg = " \n\t\r" ); Deletes from the original string val pointed into cfg (mostly empty) characters at the beginning and end of it.
- static string strSepParse( const string &path, int level, char sep, int *off=NULL ); Parsing of the string path into the components separated by the dividing symbol sep, beginning with the offset off and controlling the offset of the element end in itself.
- static string strParse( const string &str, int level, const string &sep, int *off = NULL, bool mergeSepSymb = false ); Parse function's "strSepParse()" expanded version which allow using multi-symbols separators and one symbols merging.
- static string strLine( const string &str, int level, int *off = NULL ); Parsing text lines for different ways to the end of a line (CR, LF and CR/LF).
- static string pathLev( const string &path, int level, bool decode = true, int *off = NULL ); The allocation of the elements of the path path with the ability of their decode, starting with the offset off and controlling the offset of the element end in itself.
- static string path2sepstr( const string &path, char sep = '.' ); Transformation the path into string with the separator sep of the elements.
- static string sepstr2path( const string &str, char sep = '.' ); Transformation of the string with the separator sep of the elements into the path.
- static string strEncode( const string &in, Code tp, const string &opt1 = "" ); Encoding of the string by the specified rule tp and option opt1 (symbols by "Custom").
- static string strDecode( const string &in, Code tp = Custom, const string &opt1 = "" ); Decoding of the string in by the specified rule tp and option opt1 (separator or "<text>" for "Bin").
- static string strMess( const char *fmt, ... ); static string strMess( unsigned len, const char *fmt, ... ); Formation of the string by the template fmt and arguments. It is implemented on the basis of "printf". For the length limit variant exceeding mark by append "...".
- static string strLabEnum( const string &base ); Individual string labels from base forming by increment at end. Supported numbering into decimal, hexadecimal (prefix "0x") or octal (prefix "0") notation.
- string strCompr( const string &in, int lev=-1); Compression of the string in with the compression level lev.
- string strUncompr( const string &in ); Decompression of the string in.
- static inline uint16_t getUnalign16( const void *p ); static inline uint32_t getUnalign32( const void *p ); static inline uint64_t getUnalign64( const void *p ); Unaligned read for unsigned
- static inline int getUnalignInt( const void *p ); Unaligned read for integer from buffer by offset.
- static inline float getUnalignFloat( const void *p ); Unaligned read by real "float" from buffer by offset.
- static inline double getUnalignDbl( const void *p ); Unaligned read by real "double" from buffer by offset.
- static uint16_t i16_LE( uint16_t in ); static uint32_t i32_LE( uint32_t in ); static uint64_t i64_LE( uint64_t in ); Byte order conversion for integer in from Little-Endian (LE) to internal represent.
- static uint16_t i16_BE( uint16_t in ); static uint32_t i32_BE( uint32_t in ); static uint64_t i64_BE( uint64_t in ); Byte order conversion for integer in from Big-Endian (BE) to internal represent.
- static float floatLE( float in ); static double doubleLE( double in ); Real number in conversion from internal to format IEEE754 Little-Endian (LE).
- static float floatLErev( float in ); static double doubleLErev( double in ); Real number in conversion from format IEEE754 Little-Endian (LE) to internal.
- static float floatBE( float in ); static double doubleBE( double in ); Real number in conversion from internal to format IEEE754 Big-Endian (BE).
- static float floatBErev( float in ); static double doubleBErev( double in ); Real number in conversion from format IEEE754 Big-Endian (BE) to internal.
- string getCmdOpt( int &curPos, string *argVal = NULL ); static string getCmdOpt_( int &curPos, string *argVal, int argc, char **argv ); Command line parameters parsing by cursor scanning curPos. Return argument name and it's possible value into argVal. Implement formats for short keys: "-v", "-v val", "-abcv", "-abcv val"; and long keys: "--var", "--var=val", "--var val".
- string cmdOpt( const string &opt, const string &setVl = "" ); Get command-line option opt. Set it at setVl if pointing.
- static void ctrListFS( XMLNode *nd, const string &fsBase, const string &fileExt = "" ); Browsing list for file system's items from base fsBase, for the files with extensions fileExt in list "png;jpeg;gif;".
- ResRW &cfgRes( ); Access to config file tree resource locking.
Public attributes:
- static bool finalKill Sign "The final killing of". It is used for forced disconnection of blocked objects on the the final stage of shutdown.
Short calls for global functions into "OSCADA" namespace:
- template <class fVal> fVal fmin( fVal a, fVal b ); template <class fVal> fVal fmax( fVal a, fVal b ); functional templates for obtain of two values minimum and maximum.
- inline string i2s( int val, TSYS::IntView view = TSYS::Dec ) > TSYS::int2str(val, view);
- inline string u2s( unsigned val, TSYS::IntView view = TSYS::Dec ) > TSYS::uint2str(val, view);
- inline string ll2s( long long val, TSYS::IntView view = TSYS::Dec ) > TSYS::ll2str(val, view);
- inline string r2s( double val, int prec = 15, char tp = 'g' ) > TSYS::real2str(val, prec, tp);
- inline double rRnd( double val, int dig = 0, bool toint = false ) > TSYS::realRound(val, dig, toint);
- inline string atm2s( time_t tm, const string &format = "" ) > TSYS::atime2str(tm, format);
- inline string tm2s( double tm ) > TSYS::time2str(tm);
- inline int s2i( const string &val ) > atoi(val.c_str());
- inline long long s2ll( const string &val ) > atoll(val.c_str());
- inline double s2r( const string &val ) TSYS::str2real(val);
- inline string sTrm( const string &val, const string &cfg = " \n\t\r") > TSYS::strTrim(val, cfg);
2.2. Object of the messages system (TMess)
Data:
Types (levels) of messages (enum TMess::Type):
- Debug (0) debug;
- Info (1) information;
- Notice (2) the notification;
- Warning (3) warning;
- Error (4) error;
- Crit (5) critical situation;
- Alert (6) alert;
- Emerg (7) emergency.
Direction for the messages (enum TMess::Direct):
- DIR_SYSLOG (0x1) to SYSLOG;
- DIR_STDOUT (0x2) to standard output;
- DIR_STDERR (0x4) to standard errors output;
- DIR_ARCHIVE (0x8) to messages archive.
The structure of the message (class TMess:: SRec):
- time_t time; time of the message;
- int utime; microsecond of the message time;
- string categ; category of messages (usually the way inside the system);
- int8_t level; the level of the message;
- string mess; message.
Templates:
- _( mess ) Wrapper over the translation of the messages function for the provision of the accepted by the most of the programs translation of the messages.
- trL(base,lng); trU(base,usr); trLU(base,lng,usr) Wrappers over the text variables dynamic translation functions by language and user.
- trSetL(base,lng,mess); trSetU(base,usr,mess); trSetLU(base,lng,usr,mess) Wrapper over the text variables dynamic translation set functions by language and user.
- FTM(rec); FTM2(tm, utm) Get a full time of the message, in microseconds, using the two fields of time of the message structure.
- mess_lev() The system's messages level. Often used for debug mode check (=Debug).
- message( cat, lev, fmt, args ... ) Formation of the the full message.
- mess_debug( cat, fmt, args ... ) Formation of the debug message.
- mess_info( cat, fmt, args ... ) Formation of the information message.
- mess_note( cat, fmt, args ... ) Formations of the message - notification.
- mess_warning( cat, fmt, args ... ) Formation of the warning message.
- mess_err( cat, fmt, args ... ) Formation of the error message.
- mess_crit( cat, fmt, args ... ) Formation of the critical condition message.
- mess_alert( cat, fmt, args ... ) Formation of the alarm message.
- mess_emerg( cat, fmt, args ... ) Formation of the emergency message.
- message_( cat, lev, fmt, args ... ) Formation of the the full message (selected level and debug categories are ignored).
- mess_debug_( cat, fmt, args ... ) Formation of the debug message (selected level and debug categories are ignored).
- mess_info_( cat, fmt, args ... ) Formation of the information message (selected level is ignored).
- mess_note_( cat, fmt, args ... ) Formations of the message - notification (selected level is ignored).
- mess_warning_( cat, fmt, args ... ) Formation of the warning message (selected level is ignored).
- mess_err_( cat, fmt, args ... ) Formation of the error message (selected level is ignored).
- mess_crit_( cat, fmt, args ... ) Formation of the critical condition message (selected level is ignored).
- mess_alert_( cat, fmt, args ... ) Formation of the alarm message (selected level is ignored).
- mess_emerg_( cat, fmt, args ... ) Formation of the emergency message (selected level is ignored).
Public methods:
2.3. Object subsystem (TSubSYS)
Inherits: | TCntrNode. |
Inherited: | TArchiveS, TProtocolS, TBDS, TFunctionS, TSesurity, TModShedul, TTransportS, TUIS, TSpecialS, TControllerS. |
Public methods:
- TSubSYS( const char *id, const char *name, bool mod = false ); Initialize the constructor. Sign mod indicates that subsystem is module one.
- string subId( ); ID of the subsystem.
- string subName( ); Localized name of the subsystem.
- bool subStartStat( ); Sign of the subsystem execution.
- bool subModule( ) const; Sign of the modularity of the subsystem.
- virtual int subVer( ); Version of the subsystems.
- virtual void subStart( ); Start of the the subsystem.
- virtual void subStop( ); Stop of the subsystem.
- void modList( vector <string> &list ); List list of the modules of the modular subsystem.
- bool modPresent( const string &name ); Check for the availability of the module name.
- void modAdd( TModule *modul ); Add/registration of the module modul.
- void modDel( const string &name ); Deleting of the module name.
- AutoHD <TModule> modAt( const string &name ) const; Connection to the module name.
- virtual void perSYSCall( unsigned int cnt ); Periodic call from system thread, with period 10 seconds and seconds counter cnt.
- virtual bool rdProcess( XMLNode *reqSt = NULL ); Processing of redundancy of the subsystem, calls from the system's task of redundancy. reqSt pass a result of a state request to the redundancy station for this subsystem.
- TSYS &owner( ) const; The system - the owner of the subsystem.
2.4. Object Module (TModule)
Inherits: | TCntrNode. |
Inherited: | TProtocol, TTypeBD, TTypeArchive, TTypeTransport, TUI, Tspecial, TTypeDAQ. |
Data:
The data structure which identifies the module (class TModule::SAt):
- SAt( const string &iid, const string &itype = "", int itver = 0 ); initialize the constructor;
- bool operator ==(const TModule::SAt &amst ) const; comparison function identifiers modules;
- string id; the identifier of the module;
- string type; the type of module (subsystem);
- int tVer; version of the type of module (subsystem) to which the module is designed.
The structure of exported functions (class TModule::ExpFunc):
- string prot; a prototype of the function;
- string dscr; localized description of the function;
- void (TModule::*ptr) (); relative address of the function (with respect to the object module).
Public methods:
- TModule( const string &id ); Initialize the constructor of module id.
- string modId( ); ID of the module.
- string modName( ); Localized name of the module.
- virtual void modStart( ); Start of the module.
- virtual void modStop( ); Stop of the module.
- virtual void modInfo( vector<string> &list ); A list of information items list of the module.
- virtual string modInfo (const string &name ); Getting the contents of the specified information item name. For get the item on different language, at dynamic messages translation, you can set the name in way "{Name}:{lang}".
- virtual void perSYSCall( unsigned int cnt ); Periodic call from system thread, with period 10 seconds and seconds counter cnt.
- void modFuncList( vector<string> &list ); The list of exported functions list of the module.
- bool modFuncPresent( const string &prot ); Check the availability of the specified function by its prototype prot.
- ExpFunc &modFunc (const string & prot); Get the information about exported function of the module prot.
- bool modFunc( const string &prot, void (TModule::**offptr)(), bool noex = false ); Getting the relative address offptr of the exported function prot. Returns "true" for successful and the non-exceptional mode noex.
- const char *I18N( const char *mess ); Localization of modular message mess in accordance with the current locale.
- TSubSYS &owner( ) const; Subsystem - the owner of the module.
Protected Attributes:
- string mModName; Name of the module.
- string mModDescr; Description of the module.
- string mModType; Type of module.
- string mModVers; Version of the module.
- string mModAutor; Author of the module.
- string mModLicense; License of the module.
- string mModSource; Source/origin of the module.
Protected methods are:
- void modInfoMainSet( const string &name, const string &type, const string &vers, const string &author, const string &descr, const string &license, const string &source ); Main module information set.
- void modFuncReg (ExpFunc * func); Registration of the exported by module functions.