From OpenSCADAWiki
Jump to: navigation, search

Structure of OpenSCADA task (class — TSYS::STask):

  • STask( pthread_t ithr, char ipolicy, char iprior ); — constructor of the task's descriptor for thread ithr, it's scheduling policy ipolicy and priority iprior.
  • float consumpt( ) const; — the task's last CPU time consumption, in seconds.
  • float period( ); — the task's call instant periodicity, in seconds.
  • string path; — path.
  • pthread_t thr; — thread handler.
  • uint8_t policy, phase; — scheduling policy and phase.
  • int16_t prior; — scheduling priority.
  • pid_t tid; — thread's identifier as a Linux process's ID.
  • ResString cpuSet; — used processors/cores list.
  • void *(*task) (void *); — pointer to the task.
  • void *taskArg; — arguments of the task.
  • unsigned flgs; — flags, "enum Flgs { Detached = 0x01, FinishTask = 0x02; }".
  • int64_t tm_beg, tm_end, tm_per, tm_pnt, cycleLost, lagMax, consMax; — statistic variables of the task execution.