4 Protocol Examples
To manually create a data collector set with a performance counter data collector:
Figure 2: Manually creating a data collector set with a performance counter data collector
The client creates a data collector set object on the server by using CoCreateInstanceEx.
The server returns a pointer to the newly created object.
The client requests the data collector set's collection of data collector.
The server returns a pointer to the collection of data collectors belonging to the data collector set.
The client requests the creation of a Performance Counter Data Collectors.
The server creates a new Performance Counter Data Collector and retuns a pointer to its IDataCollector interface.
The client requests the IPerformanceCounterDataCollector interface of the returned data collector.
The server returns a pointer to the IPerformanceCounterDataCollector interface of the data collector.
The client requests that the server updates the list of performance counters to be collected.
The server stores that list in the Data Collector object and returns the status of the operation.
The client requests that the server adds the performance counter data collector to the data collector set collection.
The server adds the data collector to the collection and replies indicating whether the operation was successful.
The client requests that the server commits the data collector set to storage.
The server commits the data collector set and replies indicating whether the operation was successful.
The client releases a pointer to the data collector set object.
The client releases a pointer to the Data Collector Collection object.
The client releases a pointer to the data collector.
The client releases a pointer to the IPerformanceCounterDataCollector interface of the data collector.
To start a data collector set:
Figure 3: Starting a data collector set
The client creates a data collector set object on the server using CoCreateInstanceEx
The server returns a pointer to the newly created object.
The client requests that the settings of a previously committed data collector set be loaded into the returned data collector set object.
The server loads the requested data collector set from storage into memory and replies indicating whether the operation was successful.
The client requests that the data collector set start.
The server starts collecting the data described by the data collector set, and replies indicating whether the operation was successful.
The client releases pointer to the data collector set object.
To create a data collector set from an XML file:
Figure 4: Creating a data collector set from an XML file
The client creates a data collector set object on the server using CoCreateInstanceEx.
The server returns a pointer to the newly created object.
The client requests that the settings specified in the XML be loaded into the returned data collector set object.
The server parses the XML, extracts the valid properties, applies valid properties to the data collector set server, and replies indicating whether the operation was successful.
The client requests that the server commit the data collector set to storage.
The server commits the data collector set and replies indicating whether operation was successful.
The client releases a pointer to the data collector set object.