From OpenSCADAWiki
Revision as of 16:43, 7 November 2022 by FuzzyBot (Talk | contribs) (Importing a new version from external source)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

|- ! API of the modules of subsystem "Transports" |- |Transport's type (child from TTypeTransport):

  • virtual TTransportIn *In( const string &name, const string &db ); — Create/open new "input" transport.
  • virtual TTransportOut *Out( const string &name, const string &db ); — Create/open new "output" transport.

|- |Input transport (child from TTransportIn):

  • virtual string getStatus( ); — Interface status.
  • virtual void setAddr( const string &addr ); — The transport address set. It would be redefined for processing and checking for specific to the module transport's address format.
  • virtual void start(); — Transport's start.
  • virtual void stop(); — Transport's stop.

|- |Output transport (child from TTransportOut):

  • virtual string getStatus( ); — Interface status.
  • virtual void setAddr( const string &addr ); — The transport address set. It would be redefined for processing and checking for specific to the module transport's address format.
  • virtual void start( ); — Transport's start.
  • virtual void stop( ); — Transport's stop.
  • virtual int messIO( const char *obuf, int len_ob, char *ibuf = NULL, int len_ib = 0, int time = 0 ); — Sending data via the transport. Timeout time of the connection is indicated in milliseconds.

|- ! API of the modules of subsystem "Protocols" |- |Protocol (child from TProtocol):

  • virtual void itemListIn( vector<string> &ls, const string &curIt = "" ); — The input protocol subelements list, at case the protocol allow. Used for select in object of input transport configuration.
  • virtual void outMess( XMLNode &io, TTransportOut &tro ); — Data transfer in the XML tree in to the remote system by means of transport tro and the current output protocol.
  • virtual TProtocolIn *in_open( const string &name ) — Open/create the input protocol.

|- |Input protocol (child from TProtocolIn):

  • virtual bool mess( const string &request, string &answer, const string &sender ); — Transfer of unstructured message to the protocol.

|- ! API of the modules of "Data acquisition" subsystem |- |Controller's type (child from TTypeDAQ):

  • virtual void compileFuncLangs( vector<string> &ls ); — The list of user programming languages that are supported by the module.
  • virtual void compileFuncSnthHgl( const string &lang, XMLNode &shgl ); — Syntax highlight rules shgl request for user programming language lang.
  • virtual string compileFunc( const string &lang, TFunction &fnc_cfg, const string &prog_text ); — Compilation of the user procedure and creation of the object of function's execution for the specified language of user programming.
  • virtual bool redntAllow( ); — The sign of support of the redundancy mechanisms by the module. Should by simply redefined and return true.
  • virtual TController *ContrAttach( const string &name, const string &daq_db ); — Opening/connection of the controller.

|- |Controller (child from TController):

  • virtual string getStatus( ); — Call for specific controller status get.
  • virtual void enable_( ); — Controller enable.
  • virtual void disable_( ); — Controller disable.
  • virtual void start_( ); — Controller's start.
  • virtual void stop_( ); — Controller's stop.
  • virtual void redntDataUpdate( bool firstArchiveSync = false ); — An operation of the data receiving from the redundant station execution. It is called automatically by the service task of the redundancy scheme and before starting to synchronize the archives with the parameter firstArchiveSync set.
  • virtual TParamContr *ParamAttach( const string &name, int type ); — Creation/opening of the new parameter.

|- |Controller's parameter (child from TParamContr->TValue):

  • virtual void enable( ); — Enable parameter.
  • virtual void disable( ); — Disable parameter.
  • virtual void setType( const string &tpId ); — Is called to change the parameter type tpId and can be processed in the object module for self data change.
  • virtual TVal* vlNew( ); — Call at new attribute creation. Would be redefined for specific behavior into self, inherited from TVal, class at accessing to attribute.
  • virtual void vlSet( TVal &val, const TVariant &pvl ); — Call for attribute into direct write mode TVal::DirWrite (synchronous mode or writing to internal object's buffer) at a value set, for direct writing to physical controller or object's buffer.
  • virtual void vlGet( TVal &val ); — Call for attribute into direct read mode TVal::DirRead (synchronous mode or reading from internal object's buffer) at a value get, for direct reading from physical controller or object's buffer.
  • virtual void vlArchMake( TVal &val ); — Call at a value archive creation with attribute val as the source for quality properties initialization to archive's buffer according with specific of data source and its acquisition.

|- ! API of the modules of the "Archives" subsystem |- |Archiver's type (child from TTypeArchivator):

  • virtual TMArchivator *AMess(const string &id, const string &db ); — Creation of the messages' archive.
  • virtual TVArchivator *AVal(const string &id, const string &db ); — Creation of the messages' archiver.

|- |Messages' archiver (child from TMArchivator):

  • virtual void start( ); — Archiver's start.
  • virtual void stop( ); — Archiver's stop.
  • virtual time_t begin( ); — The beginning of the data in the archive.
  • virtual time_t end( ); — The end of the data in the archive.
  • virtual void put( vector<TMess::SRec> &mess ); — Put the message to the archiver.
  • virtual void get( time_t b_tm, time_t e_tm, vector<TMess::SRec> &mess, const string &category = "", char level = 0, time_t upTo = 0 ); — Get the message from the archiver.

|- |Values' archiver (child from TVArchivator):

  • virtual void setValPeriod( double per ); — Set the periodicity of the archiver's values.
  • virtual void setArchPeriod( int per ); — Set the archiving periodicity.
  • virtual void start( ); — Start the archiver.
  • virtual void stop( bool full_del = false ); — Stop the archiver with the possibility of complete deleting if the full_del flag is set.
  • virtual TVArchEl *getArchEl( TVArchive &arch ); — Getting the arch archive, which is served by the archiver.

|- |An archive element of values (child from TVArchEl):

  • virtual void fullErase( ); — Complete deleting of the part of archive in the archiver.
  • virtual int64_t end( ); — End time of the archive in the archiver.
  • virtual int64_t begin( ); — Start time of the archive in the archiver.
  • virtual TVariant getValProc( int64_t *tm, bool up_ord ); — Request processing function of the single value from the archive.
  • virtual void getValsProc( TValBuf &buf, int64_t beg, int64_t end ); — Function of the request processing by the module to get data group values buf for set time interval.
  • virtual void setValsProc( TValBuf &buf, int64_t beg, int64_t end ); — Function of the request processing by the module to set data values buf for set time interval.

|- ! API of the modules of subsystem "User interfaces" |- |User interface (child from TUI):
It does not contain specific functions! |- ! API модулей подсистемы "Специальные" |- |Specials (child from TSpecial):
It does not contain specific functions! |}