From OpenSCADAWiki
Jump to: navigation, search

API of the user programming

API of the user programming of the visualization engine are represented directly by the OpenSCADA objects, which form the user interface, that is by the "Session" and "Widgets-pages". For the user, these objects provide a set of control functions:

User object model of the module VCAEngine.

Object "Session" ( this.ownerSess() )

  • string user( ) — current session user.
  • int alrmQuietance( int quit_tmpl, string wpath = "", bool ret = false ) — quiets of the violations wpath with the template quit_tmpl. If wpath is empty string then the global quietance makes. In the string wpath, by symbol ';', can be enumerated addresses of several widgets. When set the ret, the quietance return is performed.
  • int reqTm( ) — last request time in seconds from the epoch of 1/1/1970.
  • string reqUser( ) — last request user.
  • string reqLang( ) — last request language.
  • int userActTm( ) — last user action time in seconds from the epoch of 1/1/1970.
  • bool uiCmd( string cmd, string prm, string src ) — sends a UI command of the pages managing, that is: "open", "next", "prev"; for more details see in the events section. This function must be in the priority of using to the pages managing before the direct writing to the page attributes "pgOpen" and "pgOpenSrc" due it is single method of the correct work with the linked pages.
  • int period( bool isReal = false ) — getting the session processing period, isReal for the real one.