Professional Documents
Culture Documents
Virtual
Instruments
April 2002
Revision 1.0
Important Information
The IVI Event Server Specification (IVI-3.7) is authored by the IVI Foundation member companies. For a
vendor membership roster list, please visit the IVI Foundation web site at www.ivifoundation.org, or
contact the IVI Foundation at 2515 Camino del Rio South, Suite 340, San Diego, CA
92108.
The IVI Foundation wants to receive your comments on this specification. You can contact the Foundation
through email at ivilistserver@ivifoundation.org, through the web site at
www.ivifoundation.org, or you can write to the IVI Foundation, 2515 Camino del Rio
South, Suite 340, San Diego, CA 92108. Warranty
The IVI Foundation and its member companies make no warranty of any kind with regard to this material,
including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose.
The IVI Foundation and its member companies shall not be liable for errors contained herein or for
incidental or consequential damages in connection with the furnishing, performance, or use of this material.
Trademarks
Product and company names listed are trademarks or trade names of their respective companies.
3. General Requirements...................................................................13
3.1 Nonfunctional Requirements.......................................................................................................... 13
3.2 Use Cases ....................................................................................................................................... 13
3.2.1 Actor: Client wanting to receive events (Sink Client)...................................................... 13
3.2.2 Actor: Client wanting to send events (Source Client) ...................................................... 13
3.2.3 Actor: Client wanting to retrieve the events (Retrieve Client) ......................................... 13
3.2.4 Actor: Client wanting to manage the events (Event Manager Client).............................. 14
13. Limitations......................................................................................58
13.1 Distributed Systems........................................................................................................................ 58
Revision Number
Date of Revision Revision Notes
Revision 1.0 Apri 11, 2002 Accepted all changes. This is the final version.
1.1 Introduction
In a measurement system, there often exist multiple components that need to communicate with each other.
When measurement solutions from multiple vendors are integrated together, differences in how messages
and events are handled can cause serious interoperability problems. A centralized event (messaging) server
that provides a standard way of communicating events, overcomes interoperability problems and hides the
complexity of managing multiple connections and multiple types of events from client components.
In simple systems, there may exist other ways of event communications, e.g., via in-process callbacks. In
more complex measurement systems, however, a centralized event server provides considerable value
especially in the case of cross-process or cross-machine communications with multiple components.
Moreover, the existence of a centralized event server does not prevent simpler communication mechanisms
to be used in some parts of the system.
To give an example of a complex measurement system, assume there are four major components in the
system, a Graphic User Interface (GUI) application program, a measurement server, and two measurement-
specific drivers. The components may reside in the same process or in different processes. While
responding to user interactions, the GUI program starts a separate task that issues an operation command on
the measurement server and then continues to respond to user interactions. To execute the command, the
measurement server starts two parallel lengthy tasks, one for each measurement-specific driver. When
either measurement-specific driver finishes its task, it will notify the measurement server via an event that
it has completed its task and the data is available. When the measurement server has finished combining
the data and other processing, it will notify the GUI via an event that it has completed its task and it is
ready for the next operation. When an error occurs in either measurement-specific driver, the driver sends
an error event to the measurement server. The measurement server inspects the error event and may
ultimately send an operation-failed event to the GUI. During all these interactions, there is a requirement
that all events be logged for later inspections.
The IVI foundation Event Server addresses the needs of many complex systems. This purpose of this
specification is to capture the requirements and top-level design of the Event Server. The Application
Programming Interface (API) of the current Event Server is also documented in this specification.
This document describes the requirements and top-level design of the IVI Event Server that will be
provided by the IVI foundation. Following the introduction, the general requirements of the system are
listed. The top-level architecture design is given with a component diagram and terminologies used.
Capabilities of major components in the architecture are also described. Detailed descriptions of all the
interface properties and functions follow. A sample use scenario diagram is then given. Next, the
requirements on clients that use the IVI Event Server in a system are listed. The document ends with the
limitations on the current release of the IVI Event Server and an appendix of its Interface Definition
Language (IDL) file.
1.3 References
Event Type Events can be categorized into status, warning, debug, error and
event. To give some examples, an “operation-completion” event is
a status event; an “operation-failed” event is an error event; a
“parameter out of range” event could be either a warning event or
an error event; a debug tracing message could be sent as an debug
event; a time-critical trigger message could be sent as an “event”
type event.
Source Client A source is similar to the Subject in the Observer pattern.1 It calls
the Event Server to send any events that the Sinks might be
interested in. A client can be both a source and a sink.
Retrieve Client A retrieve client is a client that wants to retrieve events from the
Event Server log file, in forward or backward order.
Event Manager Client An event manager client is a client that queries or modifies the
connections of the source and sink clients of the Event Server.
Use Case A use case describes a particular, observable system behavior. The
set of the use cases define the functional system requirements.
1
E. Gamma, R. Helm, R. Johnson, and J. Vlissides, “Design Patterns”, Addison Wesley, 1995.
IVI-3.7: IVI Event Server Specification 8 IVI Foundation
1.5 Implementation
The IVI Foundation supplied implementation of the Event Server is available from the IVI Foundation web
site.
This is a simplified view of the Event Server architecture. Interfaces used solely between the Event Server
components are not shown in the diagram.
IUnknown IUnknown
IIviEventSource IIviEventServer
IVI Event Server
Source Client
In Proc
IIviEventManager
IUnknown
IUnknown
IUnknown
IIviEventManager
IIviEventCallback
IIviEventServer
IVI Event Server
IIviEventServer
IIviEventCallbackFast In Proc IVI Event
Sink Client IIviEventManager Server
IUnknown
IUnknown
IIviEventServer
IVI Event Server
In Proc
IIviEventCallback
Source and IIviEventManager
Sink Client
IUnknown
IUnknown
Log File
IIviEventEntry
IUnknown IVI Event
IIviEventEntry
IVI Event Entry
Entry
IIviEventCallback Event
Manager
Client
This is an in-process component, i.e., it runs in the client’s process space. All clients in a process are
attached to a single instance of Event Server In Proc component. The clients will directly talk to this in-
process component, not with the out-of-process Event Server.
There is a single out-of-process component called “EventServer” on one machine. When the system is
extended into distributed system, there will be a single master Event Server in the whole system and a slave
Event Server on each machine.
2.2.3 IIviEventServer
Both Event Server In Proc and Event Server implement the same interface called “IIviEventServer”. A
source client uses this interface on Event Server In Proc to send events. The Event Server In Proc uses this
interface on Event Server to forward the events to the Event Server. This interface is also used for a client
to retrieve events from the log file.
2.2.5 IIviEventSource
A source client that wishes to receive event level change notifications may implement this interface. For
example, a sink client can request its source to stop sending any events if the source has implemented this
interface. This is not a required interface for a source.
IVI Event Entry and its IIviEventEntry interface provide a full set of query and manipulation functions for
an event.
1. The first release of Event Server will be used in a single-computer system. The design of Event Server
shall allow easy extensibility into a distributed system.
2. The Event Server shall work on any Windows Operating systems with DCOM enabled, currently Win9x,
WinNT, and Win2000.
3. Performance of the Event Server is important since it effects how customer will perceive the whole system.
4. Event handling of one client shall not significantly influence the performance of the other clients.
5. Event Server shall provide reliable services to the clients. Even when the machine or the network cannot
absorb events faster than the rate of event posting, events shall not be lost.
6. Event Server shall not use unnecessary system resources when there is no event activities or no clients
requesting the service.
7. Events shall be able to hold any 32-bit error value from any clients.
8. Events shall be identifiable by its originating location.
9. Events shall be categorized into different types; each may have different requirements on event handling,
e.g., persistency or speed.
This section describes the common use cases of the Event Server. The terminologies used in the use cases
are defined in Section 1.4, Definitions of Terms and Acronyms.
3.2.4 Actor: Client wanting to manage the events (Event Manager Client)
• Get the identification information of all source clients.
• Get the identification information of all sink clients.
• Get the event information of all source clients
• Get the event information of all sink clients.
• Set the event information for a source client.
• Set the event information for a sink client.
4.1 IIviEventServer
Description
There are two connect and two disconnect functions. If a component is both an event source and an event
sink, it calls both sets of connect and disconnect functions.
Before a source can send an event, it calls this function to connect itself to the Event Server. With this
function, the source client passes its own location information to the Event Server. It also specifies its
preferred settings for certain events. The source does not need to specify all the events it will send.
Parameters
Return Values
The IVI-3.2: Inherent Capabilities Specification defines general status codes that this function can return.
Compliance Notes
The source does not have to specify the settings for each event. In that case, the default settings in the
following table will be used.
Description
Before a sink can receive an event, it must call this function to connect itself to the Event Server. With this
function, the sink client passes its own location information to the Event Server and also specifies its
interested events.
Parameters
Return Values
The IVI-3.2: Inherent Capabilities Specification defines general status codes that this function can return.
Description
A source client (or a source and sink client) calls this function when it has finished using the Event Server
and before the client exits.
Parameters
Return Values
The IVI-3.2: Inherent Capabilities Specification defines general status codes that this function can return.
Description
A sink client (or a source and sink client) will call this function when it has finished using the Event Server
and before the client exits.
Parameters
Return Values
The IVI-3.2: Inherent Capabilities Specification defines general status codes that this function can return.
Description
A source uses this function to send an event. This is the fast way to send an event with minimal
information.
Parameters
Inputs Description Data Type
EventCode This is a numeric code for the event. Event Sever will long
attempt to interpret this code as an HRESULT. The
most significant bit will be translated and converted to
either IviEventServerStatus (when the bit is 0) or
IviEventServerError (when the bit is 1). The select code
will contain this converted value. To send other types of
events, a client shall use SendEventEx.
Description This is a text description of the event. The parameter BSTR
can be NULL.
SourceCookie This identifies the source connection. long
Return Values
The IVI-3.2: Inherent Capabilities Specification defines general status codes that this function can return.
Description
A source uses this function to send an event. This is a slower version of SendEvent since it carries more
information.
Parameters
Return Values
The IVI-3.2: Inherent Capabilities Specification defines general status codes that this function can return.
Description
A client uses this interface function to retrieve the next event that has already been persisted.
Parameters
Inputs Description Data Type
EID This value uniquely identifies every event that is stored [in, out]
in the log file. long *
To get the first event, a client passes in zero as (*EID).
The server returns the first event in the log file and
updates the returned value of (*EID) to uniquely identify
the subsequent event in the log file. Thus by calling this
interface function in a loop and passing in an initial
value of zero, a client can traverse the entire length of
the log file from the first event to the last. After the last
event is retrieved, (*EID) is set to zero again and the first
event is returned.
Return Values
The IVI-3.2: Inherent Capabilities Specification defines general status codes that this function can return.
Description
A client uses this interface function to retrieve the previous event that has already been persisted. This
function is the reverse of GetNextEvent.
Parameters
Return Values
The IVI-3.2: Inherent Capabilities Specification defines general status codes that this function can return.
Description
A sink client uses this function to inform its sources the types of events that they should be sending. A
source can ignore this command, since there is nothing enforced by the Event Server. The Event Server
will send this change request via the IIviEventSource interface of the source client if it exists.
Parameters
One would turn on the appropriate bit to indicate sending certain level of events. The bits can be or’ed
together to indicate multiple levels of events.
Return Values
The IVI-3.2: Inherent Capabilities Specification defines general status codes that this function can return.
Description
This function is used by an Event Manager client to query all the existing source connections in the system.
Each source is identified by location information supplied at the client connection time. The array of
cookies further uniquely identifies the connections.
HRESULT GetEventSourceLocations(
[in, out, unique] SAFEARRAY(BSTR) * HostNames,
[in, out, unique] SAFEARRAY(long) * ProcessIds,
[in, out, unique] SAFEARRAY(BSTR) * SubSystemNames,
[in, out, unique] SAFEARRAY(BSTR) * RoleNames,
[in, out, unique] SAFEARRAY(BSTR) * ViewNames,
[in, out, unique] SAFEARRAY(long) * SourceCookies);
Parameters
Inputs Description Data Type
Refer to The parameters are made [in, out] to accommodate the
Output memory leak bug in Visual Basic.
parameters
table
Return Values
The IVI-3.2: Inherent Capabilities Specification defines general status codes that this function can return.
Description
Parameters
Return Values
The IVI-3.2: Inherent Capabilities Specification defines general status codes that this function can return.
Description
This function is used by an Event Manager client to query the preference settings of a particular source
connection.
Parameters
Return Values
The IVI-3.2: Inherent Capabilities Specification defines general status codes that this function can return.
Description
This function is used by an event manager client to query the interested events of a particular sink
connection.
Parameters
Inputs Description Data Type
Refer to The parameters are made [in, out] to accommodate the
Output memory leak bug in Visual Basic.
parameters
table
Return Values
The IVI-3.2: Inherent Capabilities Specification defines general status codes that this function can return.
Description
This function is used by an event manager client to change the preference settings of a particular source
connection.
Parameters
Return Values
The IVI-3.2: Inherent Capabilities Specification defines general status codes that this function can return.
Description
This function is used by an event manager client to change the interests of a particular sink connection.
Parameters
Outputs Description Data Type
Return Values
The IVI-3.2: Inherent Capabilities Specification defines general status codes that this function can return.
This component implements the same interfaces as the Event Server In Proc component. Since the clients
always talk to the Event Sever In Proc component directly, the Event Server interfaces are not described in
this document.
A sink client is responsible to return from the callback function as soon as possible. Moderate amount of
delay in a callback thread, however, will likely only influence the performance of one client process.
6.1 IIviEventCallback
Description
Each sink client who wishes to receive callbacks implements either IIviEventCallback or
IIviEventCallbackFast interface. If a sink client implements both interfaces, the Event Server will choose
the faster IIviEventCallbackFast interface. A sink client who wishes to query for location information of
the incoming event should implement IIviEventCallback interface. Through the IIviEventEntry interface
pointer, the sink client can query for the host name, the subsystem name, the process ID, the role name, and
the view name, timestamp, etc.
Parameters
Return Values
The IVI-3.2: Inherent Capabilities Specification defines general status codes that this function can return.
If the function returns any standard COM exception codes, the server will retry later with the next event.
After a predetermined number of retries, the server will drop this sink connection. The events will still be
persisted if requested and will be sent to other working sink clients.
Description
A sink client who only cares about the select code, the event code and the event message should implement
IIviEventCallbackFast.
Parameters
Inputs Description Data Type
SelectCode Refer to SendEvent function. long
EventCode Refer to SendEvent function. long
Description This is string description of the event sent by the source. BSTR
Return Values
The IVI-3.2: Inherent Capabilities Specification defines general status codes that this function can return.
If the function returns any standard COM exception codes, the server will retry later with the next event.
After a predetermined number of retries, the server will drop this sink connection. The events will still be
persisted if requested and will be sent to other working sinks.
7.1 IIviEventSource
Description
A source client who wishes to receive event level control from its clients should implement
IIviEventSource interface. When a sink requests an event level change through
ChangeMySourceEventLevel(), the Event Server invokes this function.
Parameters
Return Values
The IVI-3.2: Inherent Capabilities Specification defines general status codes that this function can return.
If the function returns any standard COM exception codes, the server will retry later with the next event
change request. After a predetermined number of retries, the server will drop this source connection. The
events sent previously will still be persisted if requested and will be sent to any working sinks.
This component provides a full set of query and manipulation functions for an event.
8.1 IIviEventEntry
TimeStamp
Description
Set/Get the timestamp of an event. DATE is a standard OLE automation data type for expressing date and
time. The time includes hours, minutes, and seconds. To set/get the number of nanoseconds, use the
property “Nanoseconds”. The timestamp of an event entry is automatically set when it is first created,
however, a client may wish to change the timestamp by setting the TimeStamp property.
Nanoseconds
Description
Set/Get the nanoseconds portion of the timestamp for an event. The nanoseconds portion of the timestamp
of an event entry is automatically set when it is first created, however, a client may wish to change it by
setting this property.
Description
Description
SelectCode
Description
Set/Get the select code of the event.
Most bits of the select code are reserved for future use. The select code definition is currently the same as
the Event Type. See Section 9, IVI Event Server Attribute Values Definitions.
EventCode
Description
Set/Get the event code of the event. The event code is a numeric number for the event.
EventType
Description
Set/Get the event type of the event. The event type is part of the select code of an event.
Most bits of the Select Code are reserved for future use, so the current Select Code definitions are the same
as Event Type definitions.
Name Identifier Description
Status Type IviEventServerStatus Events that indicate the status of an operation when
there is no error condition, for example, an “operation
completed” event is a status event.
Event Type IviEventServerEvent Events that are time-critical. For example, a trigger
event.
Warning IviEventServerWarning Events that indicate warning conditions, for example,
Type a “parameter out of range” event could be a warning
event.
Error Type IviEventServerError Events that indicate error conditions, for example, an
“operation failed” event is an error event.
Debug Type IviEventServerDebug Events for debugging purposes, for example, traces
inserted by the developers.
HostName
Description
ProcessId
Description
SubsystemName
Description
Set/Get the name of the subsystem that the event belongs to, e.g., “Measurement Subsystem A”.
RoleName
Description
Set/Get the name of the role that the event belongs to, e.g., “ Spectrum Analyzer”.
ViewName
Description
Set/Get the name of the source that the event belongs to, e.g., “ Spectrum Analyzer B”.
Description
This function configures the location attributes of an event. These attributes are the host name, the process
identifier, the subsystem name, the role name and the view name.
Parameters
Inputs Description Data Type
HostName The name of the host machine. If NULL or empty BSTR
string is specified as input, then the host name will
be automatically generated by the Event Server In
Proc.
ProcessId The ID of the process that the event belongs to. If a long
value of zero or less is specified, then it will be
automatically generated by the Event Server In
Proc.
SubSystemName The name of the subsystem that the event belongs BSTR
to, e.g., “Measurement Subsystem A”.
RoleName The name of the role that the event belongs to, e.g., BSTR
“ Spectrum Analyzer”.
ViewName The name of the source that the event belongs to, BSTR
e.g., “Spectrum Analyzer B”.
Return Values
The IVI-3.2: Inherent Capabilities Specification defines general status codes that this function can return.
Description
Set the extra information of the event. SetInfo and GetInfo are intentionally not made into properties
because of problems related to SAFEARRAYs in Visual Basic.
Parameters
Return Values
The IVI-3.2: Inherent Capabilities Specification defines general status codes that this function can return.
Description
Get the extra information carried with an event entry. SetInfo and GetInfo are intentionally not made into
properties because of problems related to SAFEARRAYs in Visual Basic.
Parameters
Outputs Description Data Type
Infos See SetInfo. [out, retval]
SAFEARRAY(
BSTR) *
Return Values
The IVI-3.2: Inherent Capabilities Specification defines general status codes that this function can return.
Description
This function returns the event as a formatted text string. The string will include all the information carried
with the event entry.
Parameters
Outputs Description Data Type
formatted The returned formatted string. [out, retval]
BSTR *
Return Values
The IVI-3.2: Inherent Capabilities Specification defines general status codes that this function can return.
This section specifies the actual value for each defined attribute value.
Event Type
Property: EventType
Select Code
Property: SelectCode
Most bits of the Select Code are reserved for future use. Currently it is defined the same as for the Event
Type Property.
This section specifies the actual values for each function parameter that defines values.
Connect Source
Parameter: Latency
GetEventSourceInfo
Parameter: Latency
The same as defined for the Latency parameter of Connect Source function.
ChangeMySourceEventLevel
Parameter: LevelVector
One would turn on the appropriate bit to indicate sending certain level of events. For example, "send
everything except debug events" would be 0x000F (i.e., 0x0001 | 0x0002 | 0x0004 | 0x0008); "Send
everything" would be 0x001F (i.e., 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010); "Send nothing" would be
0x0000.
Measurement Measurement
GUI Event Server In Proc
Server Specific RCM
ConnectSink
ConnectSink
ConnectSource
ConnectSource
SendEvent
EventCallbackFast
SendEvent
EventCallbackFast
DisconnectSource
DisconnectSink
DisconnectSource
DisconnectSink
The threading models of all Event Server components, Event Server In Proc, Event Entry, and Event Server
are “Both”. To maximize performances, the Event Server components are initialized in the Free-Threaded
COM apartment.
To be a source client of the Event Server, the client does not need to be a COM component unless it wishes
to implement the IIviEventSource interface to receive event level change notifications. Currently, any
Win32 applications accepting OLE automation data types can call the IIviEventServer interface functions
to connect to the Event Server and send events.
If the source client does implement the IiviEventSource interface and connects to the Event Source with a
reference to this interface, the source client shall place the DisconnectSource call in a separate method that
will be called before FinalRelease. This will allow the Event Server to release its reference on the source.
To be a sink client of the Event Server, the client shall be a COM component that implements either the
IIviEventCallback or the IIviEventCallbackFast interface.
The sink client shall place the DisconnectSink call in a separate method that will be called before its
FinalRelease. This rule allows the Event Server to release its reference on the sink.
Distributed machines are not supported in this release of Event Server. Adding this support will introduce
new issues like DCOM security and system configuration.
import "oaidl.idl";
import "ocidl.idl";
typedef
[
public,
v1_enum,
HELP_EVENT_SERVER(LATENCY_ENUM)
]
enum IviEventServerLatencyEnum
{
IviEventServerLatencyLow = 1,
IviEventServerLatencyMedium = 2,
IviEventServerLatencyHigh = 3
} IviEventServerLatencyEnum;
typedef
[
public,
v1_enum,
HELP_EVENT_SERVER(LEVELVECTOR_ENUM)
]
enum IviEventServerLevelVectorEnum
{
IviEventServerLevelVectorStatus = 0x00000001,
IviEventServerLevelVectorEvent = 0x00000002,
IviEventServerLevelVectorWarning = 0x00000004,
IviEventServerLevelVectorError = 0x00000008,
IviEventServerLevelVectorDebug = 0x00000010
} IviEventServerLevelVectorEnum;
typedef
[
public,
v1_enum,
HELP_EVENT_SERVER(EVENTTYPE_ENUM)
]
enum IviEventServerEventTypeEnum
{
IviEventServerEventTypeStatus = 0x10000000,
IviEventServerEventTypeEvent = 0x20000000,
IviEventServerEventTypeWarning = 0x40000000,
IviEventServerEventTypeError = 0x80000000,
IviEventServerEventTypeDebug = 0x08000000
} IviEventServerEventTypeEnum;
helpstring("IIviEventEntry Interface"),
pointer_default(unique)
]
interface IIviEventEntry : IUnknown
{
[propput, helpstring(“property SetTimeStamp”)]
HRESULT TimeStamp(DATE timestamp);
[propget, helpstring(“property GetTimeStamp”)]
HRESULT TimeStamp([out, retval] DATE * timestamp);
[helpstring("method ConfigureLocation")]
HRESULT ConfigureLocation(BSTR hostName, long processId,
BSTR subSystemName,BSTR roleName,
BSTR viewName);
[helpstring("method SetInfo")]
[helpstring("method FormatEventEntry")]
HRESULT FormatEventEntry([out, retval] BSTR * formatted);
}
[
object,
uuid(21442235-1FDD-11d2-B0C8-0060B01A08CB),
helpstring("IIviEventCallback Interface"),
pointer_default(unique)
]
interface IIviEventCallback : IUnknown
{
[helpstring("method EventCallback")]
HRESULT EventCallback([in] IIviEventEntry * EventEntry);
};
[
object,
uuid(81AF9E1F-35E5-11d2-A614-0060B01A08CB),
helpstring("IIviEventCallbackFast Interface"),
pointer_default(unique)
]
interface IIviEventCallbackFast : IUnknown
{
[helpstring("method EventCallbackFast")]
HRESULT EventCallbackFast(long SelectCode,
long EventCode, BSTR description);
};
[
object,
uuid(701F8253-9442-11d2-A62D-0060B01A08CB),
helpstring("IIviEventSource Interface"),
pointer_default(unique)
]
interface IIviEventSource : IUnknown
{
[helpstring("method EventLevelChanged")]
HRESULT EventLevelChanged(
BSTR sinkHostName, long sinkProcessId,
BSTR sinkSubSystemName, BSTR sinkRoleName,
IVI Foundation 61 IVI-3.7: IVI Event Server Specification
BSTR sinkViewName, long levelVector);
};
[
object,
uuid(427B4383-2C92-11D2-98BC-0060B0A3F2B3),
helpstring("IIviEventServer Interface"),
pointer_default(unique)
]
interface IIviEventServer : IUnknown
{
[helpstring("method ConnectSource")]
HRESULT ConnectSource(
[in, unique] IIviEventSource * Source,
BSTR HostName, long ProcessId,
BSTR SubSystemName,
BSTR RoleName,
BSTR ViewName,
[in, unique] SAFEARRAY(IIviEventEntry * ) * Events,
[in, unique] SAFEARRAY(IviEventServerLatencyEnum) *
Latencies,
[in, unique] SAFEARRAY(VARIANT_BOOL) * Orders,
[in, unique] SAFEARRAY(VARIANT_BOOL) * Logs,
[in, out] long * SourceCookie);
[helpstring("method ConnectSink")]
HRESULT ConnectSink(
[in, unique] IUnknown * IUnkSink,
BSTR HostName, long ProcessId,
BSTR SubSystemName, BSTR RoleName,
BSTR ViewName,
[in, unique] SAFEARRAY(IIviEventEntry *) *InterestedEvents,
[in, out] long * SinkCookie);
[helpstring("method DisconnectSource")]
HRESULT DisconnectSource(long SourceCookie);
[helpstring("method DisconnectSink")]
HRESULT DisconnectSink(long SinkCookie);
[helpstring("method SendEvent")]
HRESULT SendEvent(long EventCode, BSTR Description,
long SourceCookie);
[helpstring("method SendEventEx")]
HRESULT SendEventEx(long SelectCode, long EventCode,
BSTR description, [in, unique] SAFEARRAY(BSTR) * Infos,
long SourceCookie);
[helpstring("method GetNextEvent")]
HRESULT GetNextEvent([in, out] long * EID,
[out, retval] IIviEventEntry ** EventEntry);
[helpstring("method GetPreviousEvent")]
HRESULT GetPreviousEvent([in, out] long * EID,
[out, retval] IIviEventEntry ** EventEntry);
[helpstring("method ChangeMySourceEventLevel")]
HRESULT ChangeMySourceEventLevel(
long Cookie,
long LevelVector);
};
helpstring("IIviEventManager Interface"),
pointer_default(unique)
]
interface IIviEventManager : IUnknown
{
[helpstring("method GetEventSourceLocations")]
HRESULT GetEventSourceLocations(
[in, out, unique] SAFEARRAY(BSTR) * HostNames,
[in, out, unique] SAFEARRAY(long) * ProcessIds,
[in, out, unique] SAFEARRAY(BSTR) * SubSystemNames,
[in, out, unique] SAFEARRAY(BSTR) * RoleNames,
[in, out, unique] SAFEARRAY(BSTR) * ViewNames,
[in, out, unique] SAFEARRAY(long) * SourceCookies
);
[helpstring("method GetEventSinkLocations")]
HRESULT GetEventSinkLocations(
[in, out, unique] SAFEARRAY(BSTR) * HostNames,
[in, out, unique] SAFEARRAY(long) * ProcessIds,
[in, out, unique] SAFEARRAY(BSTR) * SubSystemNames,
[in, out, unique] SAFEARRAY(BSTR) * RoleNames,
[in, out, unique] SAFEARRAY(BSTR) * ViewNames,
[in, out, unique] SAFEARRAY(long) * SinkCookies
);
[helpstring("method GetEventSourceInfo")]
HRESULT GetEventSourceInfo(
long SourceCookie,
[in, out, unique] SAFEARRAY(IIviEventEntry * ) * Events,
[in, out, unique] SAFEARRAY(IviEventServerLatencyEnum) *
Latencies,
[in, out, unique] SAFEARRAY(VARIANT_BOOL) * Orders,
[in, out, unique] SAFEARRAY(VARIANT_BOOL) * Logs
);
[helpstring("method GetEventSinkInfo")]
HRESULT GetEventSinkInfo(
long SinkCookie,
[in, out, unique] SAFEARRAY(IIviEventEntry *)*
InterestedEvents
);
[helpstring("method SetEventSourceInfo")]
HRESULT SetEventSourceInfo(
long SourceCookie,
[in, unique] SAFEARRAY(IIviEventEntry * ) * Events,
[in, unique] SAFEARRAY(IviEventServerLatencyEnum) *
Latencies,
[in, unique] SAFEARRAY(VARIANT_BOOL) * Orders,
[in, unique] SAFEARRAY(VARIANT_BOOL) * Logs
);
[helpstring("method SetEventSinkInfo")]
HRESULT SetEventSinkInfo(
long SinkCookie,
[in, unique] SAFEARRAY(IIviEventEntry *) * InterestedEvents
);
};
[
uuid(27C46644-3070-11D2-B0D9-0060B01A08CB),
IVI Foundation 63 IVI-3.7: IVI Event Server Specification
version(1.0),
helpstring("IviEventServerDLL 1.0 Type Library")
]
library IVIEVENTSERVERDLLLib
{
importlib("stdole32.tlb");
importlib("stdole2.tlb");
interface IIviEventCallback;
interface IIviEventCallbackFast;
interface IIviEventSource;
[
uuid(3881DE8C-2702-11D2-98BA-0060B0A3F2B3),
helpstring("IviEventServerDLL Class")
]
coclass IviEventServerDLL
{
[default] interface IIviEventServer;
interface IIviEventManager;
};
[
uuid(8602A19E-2BAF-11D2-B0D9-0060B01A08CB),
helpstring("IviEventEntry Class")
]
coclass IviEventEntry
{
[default] interface IIviEventEntry;
};
};