beautypg.com

Eventread – Visara Master Console Center Scripting Guide User Manual

Page 218

background image

Chapter 6 Obsolete Material

Scripting Guide

218

EVENTREAD

Syntax:

EVENTREAD(%QueueIdArray,$EventArray[,%Wait])==>%Status

Description:

Returns the next event from any of the specified event queues.

Action:

The next event from any of the specified queues is returned in the event

array. If a timeout is specified, the command times out if no event is

found within the given time; otherwise it waits indefinitely for the next
event.

Parameters:

%QueueIdArray. Normal numeric array. Contains the queue IDs from

which the event must come from. These are the unique queue IDs
created by EVENTOPEN().
$EventArray. Associative string array. This parameter is part of the
return. Any existing values in this array are first cleared before the new

event data is put into it. The array is associatively indexed with an

event field name and assigned the event field value. All events contain
the following fields:
%Wait. Number of seconds to wait for an event. Less than 0 indicates

don’t wait, 0 indicates wait forever, and greater than 0 indicates the
timeout period. If no timeout is specified, the default is 0.

Field Name
description
hostName

nativeId

osName

queue

systemSource

timeStamp

Description
A description of the event (string).
The name of the host computer that

generated the event (string).
The id of the event. Depending on the

source of the event, this could be a simple

number, or a complex identifier containing
the host, the date and time, an event ID, etc

(string).
The MCC OS name that corresponds to the
‘hostName’ field. The system looks at the

‘hostname=’ entries in the config/system.cfg
file, and sets ‘osName’ to the corresponding

OS. If there is no entry for ‘hostName’, the

field is set to the empty string (string).
The queue that the event arrived on

(number).
Indicates what system generated the event.
This field is returned as a number. Manifest

constants should be used for comparison, e.g.

PATROL_EVENTS (number).
Indicates when the event was generated.

The time is measured as epoch seconds.

Refer to Date/Time on page 40 for more
information.

%Wait. Number of seconds to wait for an event. Less than 0 indicates
don’t wait, 0 indicates wait forever, and greater than 0 indicates the

timeout period. If no timeout is specified, the default is 0.