The following describes the standard behavior of the Subscription Template. For data objects that conform to special requirements, special handling has been defined that extends this standard behavior (see Appendix D - Special Handling).
Now that we’ve described the Subscription Request element and its attributes, let’s now look at Subscription Templates. A Subscription Template specifies the data object types and data items within those objects that are to be published for a particular Subscription, much like the Query Templates used by the STORE interface.
Here is our earlier example showing two Subscription Requests, each with their own Subscription Templates:
Subscription Request #1
Subscription Template #1a
Subscription Template #1b
Subscription Request #2
Subscription Template #2
Each Subscription Template specifies both:
-
the contents of the published data objects, by including those XML elements/attributes that are to be sent by the Publisher, but without specifying a value for the elements/attributes. The following example requests that a well object be published whenever any well object on the Publisher is changed, and that the published well objects are to contain only the country data item (and its parent items):
The published well object might contain:
UK
…
-
the selection of which data objects are to be published, by including a value with the XML elements and/or attributes. The following example requests that a well object be published whenever a well object containing a country data item of “Norway” is changed:
Norway
The structural content of the published well object(s) would be the same as in the first example above. The difference is that in the first example, a change to any well object will result in a publication, while in the second example only a change to a well with a country data item of “Norway” will result in a publication.
► The plural data object container provides for more than one Subscription Template for a given WITSML data object type within one Subscription Request.
The plural container is required even if only one instance of a data object type is specified in the Subscription Template.
8.3.1Realtime Example
The realtime object is designed to permit transmittal of data as it is being acquired (similar to a demultiplexed log). It has behavior similar to a systematically growing object (See APPENDIX D – Special Handling) but the data is defined at the individual cell level rather than at the row level and it does not have a structural range capability. The realtime header describes a table structure with each column representing a sensor channel. The channel element represents one value from one sensor at one index value. Realtime data is commonly converted to a log in order to make it persistent. The realtime header will exist until the realtime stream is finished and then the header will normally be deleted. Each individual channel value is intendded to be transient and will normally exist for only a short time.
A common scenario for accessing realtime is to use WMLS_GetFromStore to access the realtimeHeaders for a particular wellbore in order to determine what channels are available. The results of the STORE query is then used to create a template for WMLP_Subscribe.
For example, the following WMLS_GetFromStore template requests the mnemonics for each channel of a particular wellbore.
channelDefinition>
This might return the following message. Note that realtime does not contain an index channel.
WOB
channelDefinition>
SPM
channelDefinition>
Based on this result a subscription can be submitted using the following template.
WOB
channelDefinition>
SPM
channelDefinition>
The realtimeHeader data will be returned with the first data that is published but not with subsequent data. Thus the following sequence of messages might be published as a result of the above subscription.
3598.346
WOB
channelDefinition>
SPM
channelDefinition>
SPM
78.160
WOB
5.979
3578.14
SPM
78.160
WOB
5.979
3598.346
SPM
78.172
3601.285
WOB
5.967
And so on. The md element defines the node index and the mnemonic element identifies the column identifier for each data value.
Share with your friends: |