piel_evntactn

This function searches for one or more events in the Event Logger. The search is specified by the action parameter. For non-exact searches, the search continues until no possible locations are left.

An event is selected based on the passed type and/or group unless these parameters are set to -1, in which case all events regardless of type and/or group are returned.

C format

int32 piel_evntactn(

int32 PIPTR * time,

int32 PIPTR * number,

int32 PIPTR * group,

int32 PIPTR * type,

int32 len,

char PIPTR * msg,

int32 action,

int32 timeout );

Returns

>0

System error

Success

-1

Illegal time

-2

Illegal type

-3

Illegal group

-5

Illegal timeout

-6

Illegal action

-10

Input buffer error

-20

No event found

-100

Timeout

-10008 Unsupported call (PI API 2016 or later)

Arguments

time (passed, returned)

Event time stamp

number (passed, returned)

Event number

group (passed, returned)

Event group (valid values are 0-1000). Set to -1 to search all groups.

type (passed, returned)

Event type (valid values are 0-1000). Set to -1 to search all types.

len (passed)

Size of the message buffer (needed for msg return). Delimiters and null terminators count as characters.

msg (passed, returned)

Message, null terminated

action (passed)

Action to be executed (see defines below)

timeout (passed)

Timeout period in seconds to wait for the Event Logger to respond

Usage Notes

This function is currently supported only on PI 2 Servers. PI 3 Servers will return –20.

The action codes to be used with piel_evntactn are defined in piapi.h as:

#define ELEQSEARCH 1

#define ELGESEARCH 2

#define ELLESEARCH 3

#define ELGTSEARCH 4

#define ELLTSEARCH 5

#define ELEDIT 6

#define ELDELETE 7

An initial search is issued with number set to 0 to establish an anchor point from which successive searches can be made. Each subsequent call may pass the returned number as the starting point for the next search where the action codes are applied.

On the initial search, only action codes 2 and 3 may be used to establish the anchor point.

On each call, the group and type fields are used to filter the results. As these values are returned, they should be refreshed before each subsequent call to avoid losing the wild card effect.

Due to case sensitivity, make certain capitalization is preserved when calling these routines.

PI API 2016 for Windows Integrated Security

piel_evntactn() is not supported and will return -10008 (Unsupported call).

Enabling Operational Intelligence