Create a new EventSubscription.
This method is called from EvenServer.CreateEventSubscription after the EventSubscription object is constructed.
Syntax
Parameters
- _active
- FALSE if the Event Subscription is to be created inactive.
TRUE if the Event Subscriptions is to be created as active.
If the subscription is inactive, then the server will not send event notifications to the client based
on the subscription, and has no responsibility to buffer or maintain the event notifications.
Thus event notifications may be lost.
- _bufferTime
- The requested buffer time. The buffer time is in milliseconds and tells the
server how often to send event notifications. This is a minimum time - do not send event notifications
any faster that this UNLESS dwMaxSize is greater than 0, in which case the server will send an event
notification sooner to obey the dwMaxSize parameter. A value of 0 for dwBufferTime means that the server
should send event notifications as soon as it gets them. This parameter along with the dwMaxSize parameter
are used to improve communications efficiency between client and server. This parameter is a recommendation
from the client, and the server is allowed to ignore the parameter. The server will return the buffer time
it is actually providing in pdwRevisedBufferTime. If the revised buffer time does not equal the
requested buffer time, then the server must return OPC_S_INVALIDBUFFERTIME, unless dwMaxSize is also invalid
in which case the server must return OPC_S_INVALIDMAXSIZE.
- _maxSize
- The requested maximum number of events that will be sent in a single OnEvent callback.
A value of 0 means that there is no limit to the number of events that will be sent in a single callback.
Note that a value of dwMaxSize greater than 0, may cause the server to call the OnEvent callback more
frequently than specified in the dwBufferTime parameter when a large number of events are being generated
in order to limit the number of events to the dwMaxSize. This parameter is a recommendation from the client
and the server is allowed to ignore this parameter. The server will return the actual number of events it
is actually providing in pdwRevisedMaxSize. If the requested MaxSize does not equal the revised MaxSize then
the Server must return OPC_S_INVALIDMAXSIZE.
- _clientSubscription
- Client provided handle for this event subscription.
This handle is passed back in the OnEvent callback to identify the subscription object that is calling back.
The client should assign a unique value of hClientSubscription for each subscription object in order to
detect the source of the callback information.
- revisedBufferTime
- revisedMaxSize
- The maximum number of events that the server will actually be sending in a
single OnEvent callback, which may differ from dwMaxSize.
Requirements
Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows 7, Windows Server 2008 family
See Also