11. Subsystem “Modules' sheduling” (TModSchedul)
Subsystem “Modules' sheduling” is presented by the object TModSchedul.
The subsystem contains the control mechanism for modules contained in shared libraries.
11.1. The object of the subsystem “Modules' sheduling” (TModSchedul)
Data:
The structure of information about the shared library (struct – TModSchedul::SHD):
- void *hd; — the title of the shared library (if NULL, the library is present, but not connected);
- vector<string> use; — list of connected modules;
- time_t tm; — modification time of the library;
- string name; — full name/path of the shared library.
Public methods:
- string allowList( ) const; — The list of permitted shared libraries (modules).
- string denyList( ); — The list of prohibited shared libraries (modules).
- int chkPer( ); — The verification period of the directory with the modules (s).
- void setAllowList( const string &vl ); — Setting of the list of permitted shared libraries (modules).
- void setDenyList( const string &vl ); — Setting of the list of prohibited shared libraries (modules).
- void setChkPer( int per ); — Setting the verification period of the directory with the modules (s). If the frequency is equal to zero, the check will be disabled.
- void subStart( ); — Subsystem's start.
- void subStop( ); — Subsystem's stop.
- int loadLibS( ); — Loading the shared libraries and initialization of the modules. Return numbers loaded modules.
- SHD &lib( const string &name ); — Getting the shared library object name.
- void libList( vector<string> &list ); — The list of shared libraries list.
- int libLoad( const string &path, bool full ); — Loading the shared libraries from the specified path path. Return numbers loaded modules.
- void libAtt( const string &name, bool full = false); — Attaching of the specified shared library name.
- void libDet( const string &name ); — Detaching of the specified shared library name.