IBM Tivoli Software IBM Tivoli Software

[ Bottom of Page | Previous Page | Next Page | Contents | Index ]


Events

The following methods express functions for events configuration.

Method SendEventEx

Syntax
Object.SendEventEx(EventName As String, mapHndl As Integer)
Parameters
EventName
The name of the event to send.
mapHndl
The handle of a mapping table returned by a call to CreateMap that contains all the keys required to set the event attributes.
Description
This method sends the event named EventName and specifies its attributes.
Remarks
The event named EventName must be previously defined through a DefineEvent in the SetDefaultConfiguration Subroutine. The mapping table associated with the handle mapHndl must contain, as keys, all the attributes defined for the given event.
Error codes

TMWSERVICE_E_MAP_KEY_NOT_FOUND
TMWSERVICE_E_ANALYZER_EVENT_NOT_GOT
TMWSERVICE_E_SPAWN_EVENT_FAILED
TMWSERVICE_E_EVENT_NOT_DECLARED
TMWSERVICE_E_EVENT_PROP_NOT_FOUND
TMWSERVICE_E_EVENT_INDICATION_FAILED
S_OK

Example

Table 17. Basic Object Method event examples
Visual Basic example:

' Event definition section
'<<EVENTS_INFO>>
Svc.DefineEvent "MyEvent" , "NumAttr", "StrAttr"
'<<\EVENTS_INFO>>

.....

Dim hPropTable As Integer
hPropTable = Svc.CreateMap()

Svc.SetMapNumElement(hPropTable, "NumAttr", 1)
Svc.SetMapStrElement(hPropTable, "StrAttr", "stringVal")

Svc.SendEventEx("MyEvent, hPropTable)

JavaScript example:

// Event definition section
//<<EVENTS_INFO>>
Svc.DefineEvent("MyEvent" , "NumAttr", "StrAttr");
//<<\EVENTS_INFO>>

.....

var hPropTable;
hPropTable = Svc.CreateMap();

Svc.SetMapNumElement(hPropTable, "NumAttr", 1);
Svc.SetMapStrElement(hPropTable, "StrAttr", "stringVal");

Svc.SendEventEx("MyEvent, hPropTable);


[ Top of Page | Previous Page | Next Page | Contents | Index ]