gtpc2m1xC/C++ Language Support User's Guide

evnqc-Query Event Status

This function queries the status of a named event. It is used with the evntc and postc functions.

Format

#include  <tpfapi.h>
int       evnqc (struct ev0bk *evninf, enum t_evn_typ type);

evninf
The evnqc parameter block. For more information about the evnqc parameter block, see struct ev0bk and struct tpf_ev0bk_list_data.

type
The type of event being completed. The argument must belong to the enumerated type t_evn_typ defined in tpfapi.h. Use one of the predefined terms:

EVENT_MSK
for mask events.

EVENT_CNT
for count events.

EVENT_CB_Dx
where x is a single hexadecimal digit (0-F) for core events.

EVENT_LIST
for list events.

Normal Return

One of the following:

Error Return

None.

Programming Considerations

Examples

The following example queries the control program about a count type event that it has created and prints "event finished" to the terminal if the function does not return EVNQC_INC.

#include <tpfeq.h>
struct ev0bk *event_ptr;

·
·
·
event_ptr->evnpstin.evnbkc1=1; evntc(event_ptr, EVENT_CNT, 'N', 250, EVNTC_NORM); if (evnqc(event_ptr,EVENT_CNT) != EVNQC_INC) printf("event finished\n");

Related Information