From OpenSCADAWiki
Jump to: navigation, search

Public methods:

  • TController( const string &name_c, const string &daq_db, TElem *cfgelem ); — Initializing constructor of the controller.
  • string DAQPath( ); — Getting for DAQ-address of the element.
  • string id( ) const; — Controller ID.
  • string workId( ); — Work ID of the controller, including the ID of the module.
  • string name( ); — Controller's name.
  • string descr( ); — Controller's description.
  • int64_t timeStamp( ); — Timestamp of the object changing as maximum of timestamps of the included parameter objects.
  • virtual string getStatus( ); — Request function of the controller status.
  • string DB( bool qTop = false ) const; — Storage name of the controller's instance, qTop for the storage queue top.
  • string tbl( ) const; — Name of the table of DB of the controller's instance.
  • virtual string tbl( const TTypeParam &tP ) const; — Name of the table of DB of the parameter's instance for the parameter type tP.
  • string fullDB( bool qTop = false ) const; — The full name of the table of storage of the controller's instance, qTop for the storage queue top.
  • void setName( const string &nm ); — Set the controller's name.
  • void setDescr( const string &dscr ); — Set the controller's description.
  • void setDB( const string &vl, bool qTop = false ); — Setting of the storage name of the controller's instance, qTop for the storage queue top.
  • bool toEnable( ); — Sign "To enable the controller".
  • bool toStart( ); — Sign "To start the controller".
  • bool enableStat( ) const; — Status "Enable".
  • bool startStat( ); — Status "Run".
  • int messLev( ); — Messages level of diagnostic information.
  • void start( ); — Controller's start.
  • void stop( ); — Controller's stop.
  • void enable( ); — Controller's enabling.
  • void disable( ); — Controller's stopping.
  • void list( vector<string> &list ) const; — Parameter's list in the controller.
  • bool present( const string &id ) const; — Check for the availability of the parameter id.
  • string add( const string &id, unsigned type ); — Addition the parameter id of the type type. Returns the end created identifier.
  • void del( const string &id, int flags = NodeNoFlg ); — Deleting the parameter id, according the {TCntrNode,TParamContr}::EnDisFlag flags.
  • AutoHD<TParamContr> at( const string &id, const string &who = "th_contr" ) const; — Connection to the controller's parameter id.
  • bool redntUse( Redundant md = Asymmetric ); — Redundancy state for mode md.
  • void setRedntUse( bool vl ); — Changing of the getting the data from the backup station mode.
  • Redundant redntMode( ); — Redundancy mode ("<high>", "<low>", "<optimal>", {ForceStation}), enabling.
  • void setRedntMode( Redundant vl ); — Setting of the redundancy mode, enabling.
  • string redntRun( ); — Configuration of the preferred execution.
  • void setRedntRun( const string &vl ); — Setting the configuration of the preferred execution.
  • virtual void redntDataUpdate( ); — Operation of the data receiving from the backup station, called automatically by the service procedure of the redundancy scheme of the subsystem.
  • virtual string catsPat( ); — List of the regular expression rules, separated by '|', for matching by category the messages generated by the object.
  • virtual void messSet( const string &mess, int lev, const string &type2Code = "OP", const string &prm = "", const string &cat = "" ); — Formation of the DAQ-sourced messages for the parameter object prm ({PrmId}), or the controller object in whole if the parameter object is not specified, for the message mess, level lev and for the type code type2Code. This function generates the messages with the unified DAQ-transparency category {type2Code}{ModId}:{CntrId}[.{prm}][:{cat}].
  • void alarmSet( const string &mess, int lev = -TMess::Crit, const string &prm = "", bool force = false ); — Formation of alarms (a violation) for the parameter object prm ({PrmId}\n{PrmNm}), or the controller object in whole if the object is not specified, the message mess and level lev. The negative value of the level lev is used to set and positive for removal of the violation. This function generates the violation and message with the category al{ModId}:{CntrId}[.{prm}] and the text {CntrNm} > {PrmNm}: {MessText}. The alarms clearance, as the setting also, works in the toggling mode, so means of passing the clearance messages to the message buffer, and the same clearance, only at the according violations presence, what may be disabled setting force.
  • TTypeDAQ &owner( ) const; — The type of the data source (module) - the owner of the controller.