ProviewR Programmer's Reference Manual  V6.1.4
rt_appl.h
Go to the documentation of this file.
1 /*
2  * ProviewR Open Source Process Control.
3  * Copyright (C) 2005-2025 SSAB EMEA AB.
4  *
5  * This file is part of ProviewR.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License as
9  * published by the Free Software Foundation, either version 2 of
10  * the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with ProviewR. If not, see <http://www.gnu.org/licenses/>
19  *
20  * Linking ProviewR statically or dynamically with other modules is
21  * making a combined work based on ProviewR. Thus, the terms and
22  * conditions of the GNU General Public License cover the whole
23  * combination.
24  *
25  * In addition, as a special exception, the copyright holders of
26  * ProviewR give you permission to, from the build function in the
27  * ProviewR Configurator, combine ProviewR with modules generated by the
28  * ProviewR PLC Editor to a PLC program, regardless of the license
29  * terms of these modules. You may copy and distribute the resulting
30  * combined work under the terms of your choice, provided that every
31  * copy of the combined work is accompanied by a complete copy of
32  * the source code of ProviewR (the version used to produce the
33  * combined work), being distributed under the terms of the GNU
34  * General Public License plus this exception.
35  */
36 
37 #ifndef rt_appl_h
38 #define rt_appl_h
39 
40 #include "rt_errh.h"
41 
49 
52 class rt_appl {
53 public:
55  rt_appl(const char* name,
56  errh_eAnix anix,
57  double scantime = 1.0,
58  qcom_sQid qid = qcom_cNQid
59  );
60  void init();
61 
62  void register_appl(const char* name);
63  void mainloop();
64  double scantime();
65  void set_scantime(double time);
66  pwr_tOid& apploid();
67 
69 
75  virtual void open();
76 
78 
81  virtual void close();
82 
84 
89  virtual void scan();
90 
91  virtual ~rt_appl();
92 
93 private:
94  errh_eAnix m_anix;
95  double m_scantime;
96  double m_maxdelay;
97  qcom_sQid m_qid;
98  char m_name[80];
99  pwr_tOid m_apploid;
100 };
101 
102 #endif
103 
Baseclass for applications.
Definition: rt_appl.h:52
virtual void close()
Closes the application.
Definition: rt_appl.cpp:194
virtual void open()
Initialize the application.
Definition: rt_appl.cpp:190
rt_appl(const char *name, errh_eAnix anix, double scantime=1.0, qcom_sQid qid=qcom_cNQid)
Constructor.
Definition: rt_appl.cpp:54
virtual void scan()
Cyclic function.
Definition: rt_appl.cpp:198
errh_eAnix
Definition: rt_errh.h:99
Include file for Errh System log messages.
Object identity type.
Definition: pwr.h:263
Queue identity.
Definition: rt_qcom.h:125