ProviewR Programmer's Reference Manual  V6.1.4
Public Member Functions | List of all members

A simple c++ application example. More...

Inheritance diagram for ra_appl:
rt_appl

Public Member Functions

 ra_appl ()
 Pointer to database value Av1.
 
void open ()
 Initialize the application. More...
 
void close ()
 Closes the application. More...
 
void scan ()
 Cyclic function. More...
 
int mh_send (const char *text, mh_eEventPrio prio)
 Send alarm. More...
 
- Public Member Functions inherited from rt_appl
 rt_appl (const char *name, errh_eAnix anix, double scantime=1.0, qcom_sQid qid=qcom_cNQid)
 Constructor. More...
 

Detailed Description

A simple c++ application example.

ra_appl is a subclass to rt_appl and implements the virtual functions open(), close(), and scan().

The open function fetches pointer to the digita value object Dv1 and Dv2, and to the alalog value object Av1. It also connects to the message handler.

The scan function is called cyclically and sets one value to Av1 if Dv1 is high and another value if Dv1 is low. When Dv2 goes high an alarm is sent.

The close function unreferences the fetched pointers.

Link the program with g++ -o $pwrp_exe/ra_appl ra_appl.cpp $pwr_obj/pwr_msg_rt.o $pwr_obj/pwr_msg_co.o -I$pwr_inc -L$pwr_lib -lpwr_rt -lpwr_co -lpwr_msg_dummy -lrt

See also
ra_appl.cpp

Definition at line 43 of file ra_appl.cpp.


The documentation for this class was generated from the following file: