ProviewR Programmer's Reference Manual
V6.1.4
|
Functions | |
pwr_tStatus | mh_ApplCancel (pwr_tUInt32 id, pwr_tString80 *cancelText) |
Cancel a message previously created by this application. More... | |
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. More... | |
pwr_tStatus | mh_ApplDisconnect () |
Informs the local Handler to remove this Application from its list of known applications. More... | |
pwr_tStatus | mh_ApplMessage (pwr_tUInt32 *Id, mh_sApplMessage *Message) |
This routine is called by an application to create and send a message. More... | |
pwr_tStatus | mh_ApplReturn (pwr_tUInt32 Id, pwr_tString80 *ReturnText) |
Set return status on a message previously created by this application. More... | |
pwr_tStatus | mh_ApplGetMsgInfo (pwr_tUInt32 Id, mh_sApplMessage *Message) |
Fetches the properties of an earlier sent message. More... | |
pwr_tStatus mh_ApplCancel | ( | pwr_tUInt32 | id, |
pwr_tString80 * | cancelText | ||
) |
Cancel a message previously created by this application.
This call can be used to cancel a message before the cause of it has disappeared. It will be handled as if it were a return message with the exception that the event list will show it to be a cancel message instead.
id | The identity of the message to cancel. |
cancelText | A string that will be associated with the cancel event. |
Definition at line 75 of file rt_mh_appl.c.
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 * | activeMessages | ||
) |
Connects this application to the local Handler.
To be able to generate messages the application must first call mh_ApplConnect. See mh_examples.c
applObject | Supplies the object id of the $appl-object for the application, or if no object exists, a value in the range [1000..2000]. This argument is used to identify the application and must be different for all application programs in the system, otherwise complete chaos can be the result. This identity may also be used to identify the origin of the messages. In this way a restarted application can find out if it has any active messages. |
flags | see mh_mApplFlags N.B.! Ignored for this release |
abortEventName | If the application terminates abnormally, an alarm message with this text as the event name will be generated. N.B.! Ignored for this release |
abortEventType | ZZZ |
abortEventPrio | If the application terminates abnormally, an alarm message with this priority will be generated. N.B.! Ignored for this release |
abortEventFlags | If the application terminates abnormally, an alarm message with this priority will be generated. N.B.! Ignored for this release |
abortEventText | If the application terminates abnormally, an alarm message with this arbitrary text as the event text will be generated. N.B.! Ignored for this release |
activeMessages | When restarting an application there might exist active messages originating from it, this parameter returns the number of such messages. Use mh_ApplGetMsgInfo to acquire more information about these. |
Definition at line 112 of file rt_mh_appl.c.
Referenced by ra_appl::open().
pwr_tStatus mh_ApplDisconnect | ( | ) |
Informs the local Handler to remove this Application from its list of known applications.
This routine must be called before an application attached to mh exits. All active messages originating from the application will be cancelled.
Definition at line 244 of file rt_mh_appl.c.
pwr_tStatus mh_ApplGetMsgInfo | ( | pwr_tUInt32 | id, |
mh_sApplMessage * | message | ||
) |
Fetches the properties of an earlier sent message.
see mh_examples.c
id | The identity of the message, about which you want information. If you supply an identity not known, data for the message with the closest (larger) identity will be returned. This means that if you supply 0, the data for the oldest still active message will be returned. The identity of the message will be found in Message.id. |
message | The requested information will be returned here. See mhs_ApplMessage, If no message is found, the contents of the structure will be undefined. |
Definition at line 331 of file rt_mh_appl.c.
pwr_tStatus mh_ApplMessage | ( | pwr_tUInt32 * | id, |
mh_sApplMessage * | message | ||
) |
This routine is called by an application to create and send a message.
see mh_examples.c
id | The identity of the message created. The application must save this id to be able to send return and acknowledgement messages. |
message | A structure containing the properties of the message. The application must fill this in before calling mh_ApplMessage, See mhs_ApplMessage for the details. |
Definition at line 263 of file rt_mh_appl.c.
pwr_tStatus mh_ApplReturn | ( | pwr_tUInt32 | id, |
pwr_tString80 * | returnText | ||
) |
Set return status on a message previously created by this application.
id | The identity of the message, to which the return message applies. |
returnText | The text string appearing on the second row in the alarm window. |
Definition at line 299 of file rt_mh_appl.c.