ProviewR Programmer's Reference Manual  V6.1.4
rt_mh_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_mh_appl_h
38 #define rt_mh_appl_h
39 
46 #define RS_MH_APPL_VERSION "X2.3.1"
47 
48 #include "rt_mh.h"
49 #include "rt_mh_net.h"
50 
51 #if defined __cplusplus
52 extern "C" {
53 #endif
54 
59 /* Structures */
60 
64 typedef struct mhs_ApplMessage mh_sApplMessage;
65 
70 typedef enum {
72  = (1 << 0),
79  = (1 << 1)
83 
121  mh_mEventFlags
124  pwr_tTime EventTime;
134  mh_eEvent
141  mh_eEventPrio
143  mh_mEventStatus EventStatus;
147  mh_uSupInfo SupInfo;
155 };
156 
164 
165 /*------------------------------------------------------------------------------
166 * Connects this application to the local Handler.
167 */
169  const pwr_tString80 AbortEventName, mh_eEvent AbortEventType,
170  mh_eEventPrio AbortEventPrio, mh_mEventFlags AbortEventFlags,
171  const pwr_tString80 AbortEventText, pwr_tUInt32* NoOfActMessages);
172 
173 /*------------------------------------------------------------------------------
174 * Informs the local Handler to remove this Application from its list of known
175 * applications.
176 */
178 
179 /*------------------------------------------------------------------------------
180 * Send a message to the local Handler.
181 */
183 
184 /*------------------------------------------------------------------------------
185 * This function returnes a message previously created by this application.
186 */
188 
189 /*------------------------------------------------------------------------------
190 */
192 
193 #if defined __cplusplus
194 }
195 #endif
196 
200 #endif
mh_mApplFlags
Flags governing how mh interacts with the application.
Definition: rt_mh_appl.h:70
@ mh_mApplFlags_NoAbortCleanUp
Definition: rt_mh_appl.h:71
@ mh_mApplFlags_NoAbortMsg
Definition: rt_mh_appl.h:78
pwr_tStatus mh_ApplMessage(pwr_tUInt32 *Id, mh_sApplMessage *Message)
This routine is called by an application to create and send a message.
Definition: rt_mh_appl.c:263
pwr_tStatus mh_ApplCancel(pwr_tUInt32 id, pwr_tString80 *cancelText)
Cancel a message previously created by this application.
Definition: rt_mh_appl.c:75
pwr_tStatus mh_ApplConnect(pwr_tObjid ApplObject, mh_mApplFlags Flags, const pwr_tString80 AbortEventName, mh_eEvent AbortEventType, mh_eEventPrio AbortEventPrio, mh_mEventFlags AbortEventFlags, const pwr_tString80 AbortEventText, pwr_tUInt32 *NoOfActMessages)
Connects this application to the local Handler.
Definition: rt_mh_appl.c:112
pwr_tStatus mh_ApplReturn(pwr_tUInt32 Id, pwr_tString80 *ReturnText)
Set return status on a message previously created by this application.
Definition: rt_mh_appl.c:299
pwr_tStatus mh_ApplDisconnect()
Informs the local Handler to remove this Application from its list of known applications.
Definition: rt_mh_appl.c:244
pwr_tStatus mh_ApplGetMsgInfo(pwr_tUInt32 Id, mh_sApplMessage *Message)
Fetches the properties of an earlier sent message.
Definition: rt_mh_appl.c:331
unsigned int pwr_tUInt32
32-bit unsigned integer type.
Definition: pwr.h:233
char pwr_tString80[80]
80 byte string type.
Definition: pwr.h:412
int pwr_tStatus
Status type.
Definition: pwr.h:284
char pwr_tString256[256]
256 byte string type.
Definition: pwr.h:404
The structure describing an application message.
Definition: rt_mh_appl.h:87
mh_mEventFlags EventFlags
Definition: rt_mh_appl.h:122
mh_uSupInfo SupInfo
Definition: rt_mh_appl.h:147
pwr_tObjid SupObject
Definition: rt_mh_appl.h:107
pwr_tUInt32 Id
Definition: rt_mh_appl.h:88
pwr_tObjid Object
Definition: rt_mh_appl.h:99
pwr_tString256 EventMoreText
Definition: rt_mh_appl.h:153
pwr_tString80 EventName
Definition: rt_mh_appl.h:129
mh_mEventStatus EventStatus
Definition: rt_mh_appl.h:143
pwr_tString80 EventText
Definition: rt_mh_appl.h:137
mh_eEventPrio EventPrio
Definition: rt_mh_appl.h:142
pwr_tTime EventTime
Definition: rt_mh_appl.h:124
pwr_sAttrRef EventSound
Definition: rt_mh_appl.h:152
pwr_tObjid Outunit
Definition: rt_mh_appl.h:116
mh_eEvent EventType
Definition: rt_mh_appl.h:135
Attribute reference.
Definition: pwr.h:557
Object identity type.
Definition: pwr.h:263