From OpenSCADAWiki
Jump to: navigation, search
(Importing a new version from external source)
 
(Importing a new version from external source)
Line 1: Line 1:
 
|-
 
|-
! API of the modules of subsystem "Transports"
+
! API of the modules of the "Transports" subsystem
 
|-
 
|-
|'''Transport's type (child from TTypeTransport):'''
+
| Provide OpenSCADA communications through the interface, often it is the network one which is implemented by the module.
* ''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):'''
+
| '''[[Special:MyLanguage/Documents/API#TTypeTransport|TTypeTransport]]->[[Special:MyLanguage/Documents/API#TModule|TModule]]''' — the root module object of the "Transports" subsystem:
* ''virtual string getStatus( );'' — Interface status.
+
* ''virtual bool isNetwork( );'' — the sign of network implementation by this module.
* ''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 string outAddrHelp( );'' — address format help of the output transports.
* ''virtual void start();'' — Transport's start.
+
* ''virtual TTransportIn *In( const string &id, const string &stor );'' — called when a new input transport object is opened or created by this module with the identifier ''id'' and the storage ''stor''.
* ''virtual void stop();'' — Transport's stop.
+
* ''virtual TTransportOut *Out( const string &name, const string &stor );'' — called when a new output transport object is opened or created by this module with the identifier ''id'' and the storage ''stor''.
 
|-
 
|-
|'''Output transport (child from TTransportOut):'''
+
|'''[[Special:MyLanguage/Documents/API#TTransportIn|TTransportIn]]''' — the input transport object:
* ''virtual string getStatus( );'' — Interface status.
+
* ''virtual unsigned keepAliveReqs( );'' — maximum Keep Alive requests.
* ''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 unsigned keepAliveTm( );'' — keep Alive time.
* ''virtual void start( );'' — Transport's start.
+
* ''virtual string getStatus( );'' — getting the status of the input transport.
* ''virtual void stop( );'' — Transport's stop.
+
* ''virtual void start( );'' — starting the transport.
* ''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.
+
* ''virtual void stop( );'' — stopping the transport.
 +
* ''virtual int writeTo( const string &sender, const string &data );'' — sending ''data'' backward to the ''sender''. Implemented in transports with support of the initiative sending, not only at a request!
 
|-
 
|-
! API of the modules of subsystem "Protocols"
+
|'''[[Special:MyLanguage/Documents/API#TTransportOut|TTransportOut]]''' — the output transport object:
|-
+
* ''virtual string timings( );'' — transport timeouts.
|'''Protocol (child from TProtocol):'''
+
* ''virtual unsigned short attempts( );'' — connection attempts.
* ''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 string getStatus( );'' — getting the status of the transport.
* ''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 void setTimings( const string &vl, bool isDef = false );'' — setting the transport timeouts, as default one for ''isDef''.
* ''virtual TProtocolIn *in_open( const string &name )'' — Open/create the input protocol.
+
* ''virtual void setAttempts( unsigned short vl );'' — setting the connection attempts.
|-
+
* ''virtual void start( int time = 0 );'' — starting the transport with the connection timeout ''time''. When you start the output transport the actual connection to the remote station is established for the interfaces that works by the connection. At this time the errors can occur if the connection is impossible and the transport should return to the stopped state.
|'''Input protocol (child from TProtocolIn):'''
+
* ''virtual void stop( );'' — stopping the transport.  
* ''virtual bool mess( const string &request, string &answer, const string &sender );'' — Transfer of unstructured message to the protocol.
+
* ''virtual int messIO( const char *oBuf, int oLen, char *iBuf = NULL, int iLen = 0, int time = 0 );'' — sending of the data over the transport. The waiting timeout ''time'' of the connection, in milliseconds. The ''time'' in negative disables the transport's request/respond mode and allows for the independently reading/writing to a buffer IO, with the reading timeout ''time'' in absolute.
|-
+
! 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):'''<br/>
+
It does not contain specific functions!
+
|-
+
! API модулей подсистемы "Специальные"
+
|-
+
|'''Specials (child from TSpecial):'''<br/>
+
It does not contain specific functions!
+
|}
+
<section end=ModAPI />
+

Revision as of 20:41, 7 November 2022

Information about message (contribute)
This message has no documentation. If you know where or how this message is used, you can help other translators by adding documentation to this message.
Message definition (Documents/API)
|-
! API of the modules of the "Transports" subsystem
|-
| Provides OpenSCADA communications through the interface, often it is the network one which is implemented by the module.
|-
|'''[[Special:MyLanguage/Documents/API#TTypeTransport|TTypeTransport]]->[[Special:MyLanguage/Documents/API#TModule|TModule]]''' — the root module object of the "Transports" subsystem:
* ''virtual bool isNetwork( );'' — the sign of network implementation by this module.
* ''virtual string outAddrHelp( );'' — address format help of the output transports.
* ''virtual TTransportIn *In( const string &id, const string &stor );'' — called when a new input transport object is opened or created by this module with the identifier ''id'' and the storage ''stor''.
* ''virtual TTransportOut *Out( const string &name, const string &stor );'' — called when a new output transport object is opened or created by this module with the identifier ''id'' and the storage ''stor''.
|-
|'''[[Special:MyLanguage/Documents/API#TTransportIn|TTransportIn]]''' — the input transport object:
* ''virtual unsigned keepAliveReqs( );'' — maximum Keep Alive requests.
* ''virtual unsigned keepAliveTm( );'' — keep Alive time.
* ''virtual string getStatus( );'' — getting the status of the transport.
* ''virtual void start( );'' — starting the transport.
* ''virtual void stop( );'' — stopping the transport.
* ''virtual int writeTo( const string &sender, const string &data );'' — sending ''data'' backward to the ''sender''.
|-
|'''[[Special:MyLanguage/Documents/API#TTransportOut|TTransportOut]]''' — the output transport object:
* ''virtual string timings( );'' — transport timeouts.
* ''virtual unsigned short attempts( );'' — connection attempts.
* ''virtual string getStatus( );'' — getting the status of the transport.
* ''virtual void setTimings( const string &vl, bool isDef = false );'' — setting the transport timeouts, as default one for ''isDef''.
* ''virtual void setAttempts( unsigned short vl );'' — setting the connection attempts.
* ''virtual void start( int time = 0 );'' — starting the transport with the connection timeout ''time''. When you start the output transport the actual connection to the remote station is established for the interfaces that works by the connection. At this time the errors can occur if the connection is impossible and the transport should return to the stopped state.
* ''virtual void stop( );'' — stopping the transport. 
* ''virtual int messIO( const char *oBuf, int oLen, char *iBuf = NULL, int iLen = 0, int time = 0 );'' — sending of the data over the transport. The waiting timeout ''time'' of the connection in milliseconds. The ''time'' in negative disables the transport's request/respond mode and allows for the independently reading/writing to a buffer IO, with the reading timeout ''time'' in absolute.
Translation|-
! API of the modules of the "Transports" subsystem
|-
| Provide OpenSCADA communications through the interface, often it is the network one which is implemented by the module.
|-
| '''[[Special:MyLanguage/Documents/API#TTypeTransport|TTypeTransport]]->[[Special:MyLanguage/Documents/API#TModule|TModule]]''' — the root module object of the "Transports" subsystem:
* ''virtual bool isNetwork( );'' — the sign of network implementation by this module.
* ''virtual string outAddrHelp( );'' — address format help of the output transports.
* ''virtual TTransportIn *In( const string &id, const string &stor );'' — called when a new input transport object is opened or created by this module with the identifier ''id'' and the storage ''stor''.
* ''virtual TTransportOut *Out( const string &name, const string &stor );'' — called when a new output transport object is opened or created by this module with the identifier ''id'' and the storage ''stor''.
|-
|'''[[Special:MyLanguage/Documents/API#TTransportIn|TTransportIn]]''' — the input transport object:
* ''virtual unsigned keepAliveReqs( );'' — maximum Keep Alive requests.
* ''virtual unsigned keepAliveTm( );'' — keep Alive time.
* ''virtual string getStatus( );'' — getting the status of the input transport.
* ''virtual void start( );'' — starting the transport.
* ''virtual void stop( );'' — stopping the transport.
* ''virtual int writeTo( const string &sender, const string &data );'' — sending ''data'' backward to the ''sender''. Implemented in transports with support of the initiative sending, not only at a request!
|-
|'''[[Special:MyLanguage/Documents/API#TTransportOut|TTransportOut]]''' — the output transport object:
* ''virtual string timings( );'' — transport timeouts.
* ''virtual unsigned short attempts( );'' — connection attempts.
* ''virtual string getStatus( );'' — getting the status of the transport.
* ''virtual void setTimings( const string &vl, bool isDef = false );'' — setting the transport timeouts, as default one for ''isDef''.
* ''virtual void setAttempts( unsigned short vl );'' — setting the connection attempts.
* ''virtual void start( int time = 0 );'' — starting the transport with the connection timeout ''time''. When you start the output transport the actual connection to the remote station is established for the interfaces that works by the connection. At this time the errors can occur if the connection is impossible and the transport should return to the stopped state.
* ''virtual void stop( );'' — stopping the transport. 
* ''virtual int messIO( const char *oBuf, int oLen, char *iBuf = NULL, int iLen = 0, int time = 0 );'' — sending of the data over the transport. The waiting timeout ''time'' of the connection, in milliseconds. The ''time'' in negative disables the transport's request/respond mode and allows for the independently reading/writing to a buffer IO, with the reading timeout ''time'' in absolute.

|- ! API of the modules of the "Transports" subsystem |- | Provide OpenSCADA communications through the interface, often it is the network one which is implemented by the module. |- | TTypeTransport->TModule — the root module object of the "Transports" subsystem:

  • virtual bool isNetwork( ); — the sign of network implementation by this module.
  • virtual string outAddrHelp( ); — address format help of the output transports.
  • virtual TTransportIn *In( const string &id, const string &stor ); — called when a new input transport object is opened or created by this module with the identifier id and the storage stor.
  • virtual TTransportOut *Out( const string &name, const string &stor ); — called when a new output transport object is opened or created by this module with the identifier id and the storage stor.

|- |TTransportIn — the input transport object:

  • virtual unsigned keepAliveReqs( ); — maximum Keep Alive requests.
  • virtual unsigned keepAliveTm( ); — keep Alive time.
  • virtual string getStatus( ); — getting the status of the input transport.
  • virtual void start( ); — starting the transport.
  • virtual void stop( ); — stopping the transport.
  • virtual int writeTo( const string &sender, const string &data ); — sending data backward to the sender. Implemented in transports with support of the initiative sending, not only at a request!

|- |TTransportOut — the output transport object:

  • virtual string timings( ); — transport timeouts.
  • virtual unsigned short attempts( ); — connection attempts.
  • virtual string getStatus( ); — getting the status of the transport.
  • virtual void setTimings( const string &vl, bool isDef = false ); — setting the transport timeouts, as default one for isDef.
  • virtual void setAttempts( unsigned short vl ); — setting the connection attempts.
  • virtual void start( int time = 0 ); — starting the transport with the connection timeout time. When you start the output transport the actual connection to the remote station is established for the interfaces that works by the connection. At this time the errors can occur if the connection is impossible and the transport should return to the stopped state.
  • virtual void stop( ); — stopping the transport.
  • virtual int messIO( const char *oBuf, int oLen, char *iBuf = NULL, int iLen = 0, int time = 0 ); — sending of the data over the transport. The waiting timeout time of the connection, in milliseconds. The time in negative disables the transport's request/respond mode and allows for the independently reading/writing to a buffer IO, with the reading timeout time in absolute.